/**
 * BookRivo CSS Module 01: Foundations & Design Tokens
 *
 * Unified design tokens, self-hosted WOFF2 fonts, global reset, typography, container, buttons & form controls.
 *
 * @package BookRivo
 * @since 1.0.0
 */

/* ==========================================================================
   SELF-HOSTED WOFF2 FONTS (Noto Sans Bengali - Single Global Font)
   ========================================================================== */
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/noto-sans-bengali-bengali-wght.woff2') format('woff2');
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1, U+11DF0-11DF1;
}
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/noto-sans-bengali-latin-ext-wght.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/noto-sans-bengali-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Primary Brand & Accent Palette */
  --bookrivo-forest: #18392f;
  --bookrivo-forest-green: #18392f;
  --bookrivo-primary: #18392f;
  --bookrivo-forest-dark: #10271f;
  --bookrivo-forest-light: #244a3b;
  --bookrivo-gold: #ba9054;
  --bookrivo-antique-gold: #ba9054;
  --bookrivo-accent: #ba9054;
  --bookrivo-gold-hover: #a27844;
  --bookrivo-gold-soft: #f5ebd8;

  /* Surface & Border Tokens */
  --bookrivo-ivory: #faf8f2;
  --bookrivo-warm-ivory: #faf8f2;
  --bookrivo-cream: #f2f0e8;
  --bookrivo-cream-soft: #faf8f2;
  --bookrivo-white: #ffffff;
  --bookrivo-paper-white: #ffffff;
  --bookrivo-ink: #24352d;
  --bookrivo-ink-black: #24352d;
  --bookrivo-muted: #70796f;
  --bookrivo-muted-gray: #70796f;
  --bookrivo-line: #e8e7df;
  --bookrivo-border: #e8e7df;
  --bookrivo-border-light: #f0efe8;
  --bookrivo-border-subtle: #e8e7df;
  --bookrivo-sale-red: #ba6549;

  /* Layout, Radius, Shadows & Typography */
  --bookrivo-container-max: 1232px;
  --bookrivo-radius: 8px;
  --bookrivo-shadow: 0 16px 45px rgba(24, 57, 47, 0.08);
  --bookrivo-shadow-card: 0 8px 24px rgba(24, 57, 47, 0.06);
  --bookrivo-font-bengali: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bookrivo-font-body: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bookrivo-font-heading: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bookrivo-font-display: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bookrivo-font-editorial: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Mobile Navigation & Floating Controls */
  --bookrivo-mobile-nav-height: 56px;
  --bookrivo-whatsapp-size: 50px;
  --bookrivo-whatsapp-spacing-bottom: 20px;
  --bookrivo-whatsapp-spacing-right: 16px;

  /* Single Product & Component Shorthand Aliases */
  --green: var(--bookrivo-forest);
  --green2: var(--bookrivo-forest-light);
  --gold: var(--bookrivo-gold);
  --paper: var(--bookrivo-ivory);
  --line: var(--bookrivo-line);
  --text: var(--bookrivo-ink);
  --muted: var(--bookrivo-muted);
  --cream: var(--bookrivo-cream);
}
/* ==========================================================================
   GLOBAL RESET & CONTAINER
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 130px;
}

body {
  margin: 0;
  background-color: var(--bookrivo-white);
  color: var(--bookrivo-ink);
  font-family: var(--bookrivo-font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--bookrivo-font-heading);
}

input, select, textarea, button, optgroup {
  font-family: var(--bookrivo-font-body);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.bookrivo-container {
  width: min(1232px, calc(100% - 56px));
  margin-inline: auto;
}

/* Accessible focus ring: suppress on mouse clicks, preserve on keyboard navigation */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible),
summary:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--bookrivo-gold, #c79a57);
  outline-offset: 3px;
  border-radius: 4px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--bookrivo-gold, #c79a57);
  outline-offset: 1px;
}

/* ==========================================================================
   BUTTONS & FORM CONTROLS
   ========================================================================== */
.bookrivo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--bookrivo-radius);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.bookrivo-btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background-color: var(--bookrivo-forest);
  color: var(--bookrivo-white);
}

.btn-primary:hover {
  background-color: var(--bookrivo-forest-light);
  color: var(--bookrivo-white);
}

.btn-outline {
  background-color: transparent;
  border-color: #c9d2c5;
  color: var(--bookrivo-forest);
}

.btn-outline:hover {
  background-color: var(--bookrivo-ivory);
  border-color: var(--bookrivo-forest);
}

.btn-gold {
  background-color: var(--bookrivo-gold);
  color: var(--bookrivo-white);
}

.btn-gold:hover {
  background-color: var(--bookrivo-gold-hover);
}


/* ==========================================================================
   GLOBAL CONTAINMENT & 3RD PARTY BLOCK OVERFLOW FIXES
   ========================================================================== */
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.swiper,
.swiper-container,
.swiper-wrapper,
.pdp-gallery-swiper,
.bookrivo-book-summary-grid,
.bookrivo-single-book-gallery {
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.woocommerce-product-gallery__image,
.swiper-slide {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.wc-block-grid__products,
ul.wc-block-grid__products,
.wc-block-grid {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.wc-block-grid__product,
li.wc-block-grid__product {
  max-width: 100% !important;
  box-sizing: border-box !important;
}


/* Container Responsive Widths */
@media (max-width: 1200px) {
  .bookrivo-container {
    width: min(1200px, calc(100% - 48px));
  }
}
@media (max-width: 1050px) {
  .bookrivo-container {
    width: min(100% - 40px, 1200px);
  }
}
@media (max-width: 768px) {
  html {
    scroll-padding-top: 80px;
  }
  .bookrivo-container {
    width: calc(100% - 32px);
  }
}
@media (max-width: 380px) {
  .bookrivo-container {
    width: calc(100% - 24px);
  }
}