/* ==========================================================================
   TAUSHINI DESIGN SYSTEM
   Stage 1 — Colors, Typography, Buttons, Cards, Spacing
   ========================================================================== */

/* ---- 1. COLOR TOKENS ---- */
:root {
    --taushini-ivory: #F7F2EA;
    --taushini-white: #FFFFFF;
    --taushini-terracotta: #B55A3A;
    --taushini-maroon: #5E1F1F;
    --taushini-jute: #9C8060;
    --taushini-charcoal: #2B2622;
    --taushini-gold: #B08D57;
    --taushini-mist: #EDE7DC;

    --taushini-font-serif: 'Fraunces', Georgia, serif;
    --taushini-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --taushini-font-serif-bn: 'Tiro Bangla', serif;
    --taushini-font-sans-bn: 'Hind Siliguri', sans-serif;

    --taushini-radius: 2px;
    --taushini-space-unit: 8px;
}

/* ---- 2. BASE ---- */
body {
    background-color: var(--taushini-ivory);
    color: var(--taushini-charcoal);
    font-family: var(--taushini-font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* Bengali text auto-switches to the Bengali pairing */
[lang="bn"], .bn-text {
    font-family: var(--taushini-font-sans-bn);
}
[lang="bn"] h1, [lang="bn"] h2, [lang="bn"] h3,
.bn-text.bn-heading {
    font-family: var(--taushini-font-serif-bn);
}

/* ---- 3. TYPOGRAPHY ---- */
h1, h2, h3, h4,
.entry-title, .woocommerce-loop-product__title, .product_title {
    font-family: var(--taushini-font-serif);
    color: var(--taushini-charcoal);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

h1, .site-title { font-size: clamp(32px, 4vw, 52px); }
h2 { font-size: clamp(26px, 3vw, 34px); }
h3 { font-size: clamp(20px, 2.4vw, 24px); }

p, li, .woocommerce ul.products li.product .price {
    font-family: var(--taushini-font-sans);
}

a {
    color: var(--taushini-maroon);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--taushini-terracotta);
}

/* ---- SIMPLE HOMEPAGE HEADER ----
   Used only by the Taushini Homepage template, which bypasses Astra's
   header.php entirely (see template-homepage.php for why). This is a
   lightweight, fully custom header — logo + nav + icons — styled independently. */
.taushini-simple-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: var(--taushini-white); /* deliberately distinct from the ivory hero below it */
    border-bottom: 1px solid var(--taushini-mist);
}
.taushini-simple-header__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.taushini-simple-header__logo {
    font-family: var(--taushini-font-serif);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--taushini-charcoal) !important;
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
    padding-bottom: 6px;
    display: inline-block;
}
.taushini-simple-header__logo::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 34px;
    height: 2px;
    background-color: var(--taushini-gold);
}
.taushini-simple-header__right {
    display: flex;
    align-items: center;
    gap: 40px;
}
.taushini-simple-header__nav ul {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.taushini-simple-header__nav a {
    font-family: var(--taushini-font-sans);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--taushini-charcoal) !important;
    text-decoration: none;
}
.taushini-simple-header__nav a:hover {
    color: var(--taushini-terracotta) !important;
}

/* Icon group, inline within the header row (not floating/absolute) */
.taushini-simple-header__icons {
    display: flex;
    align-items: center;
    gap: 18px;
}
.taushini-simple-header__icons a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--taushini-charcoal);
}
.taushini-simple-header__icons a:hover {
    color: var(--taushini-terracotta);
}
.taushini-simple-header__icons svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}
.taushini-cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--taushini-terracotta);
    color: var(--taushini-ivory);
    font-size: 10px;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--taushini-font-sans);
}

/* Search overlay (same as before) */
.taushini-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(43,38,34,0.5);
    z-index: 10001;
    padding-top: 12vh;
}
.taushini-search-overlay.is-open {
    display: block;
}
.taushini-search-overlay__box {
    max-width: 600px;
    margin: 0 auto;
    background: var(--taushini-ivory);
    padding: 32px;
    border-radius: var(--taushini-radius);
}
.taushini-search-overlay input[type="search"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 18px;
    border: 1px solid var(--taushini-jute);
    border-radius: var(--taushini-radius);
    font-family: var(--taushini-font-sans);
}
.taushini-search-overlay__close {
    display: block;
    text-align: right;
    margin-bottom: 12px;
    cursor: pointer;
    color: var(--taushini-ivory);
    font-size: 14px;
}

@media (max-width: 900px) {
    .taushini-simple-header__inner {
        flex-wrap: wrap;
    }
    .taushini-simple-header__right {
        width: 100%;
        justify-content: space-between;
        gap: 16px;
    }
    .taushini-simple-header__nav ul {
        gap: 20px;
    }
}

/* ---- FULL-BLEED FIX ----
   The viewport-breakout trick (100vw/-50vw) was fighting against Astra's own
   container/sidebar layout and making things worse. This instead directly
   resets Astra's known wrapper elements to full width — but ONLY on the
   Taushini Homepage template, using a class we add ourselves via functions.php
   (body_class filter) rather than guessing WordPress's auto-generated
   page-template-*.php class name. */
body.taushini-homepage-active #primary,
body.taushini-homepage-active #content,
body.taushini-homepage-active .ast-container,
body.taushini-homepage-active .site-content,
body.taushini-homepage-active .ast-separate-container .ast-article-single,
body.taushini-homepage-active .content-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 100% !important;
}
body.taushini-homepage-active #secondary,
body.taushini-homepage-active .sidebar {
    display: none !important;
}
.taushini-full-bleed {
    width: 100%;
}

/* ---- 4. SECTION SPACING ---- */
.taushini-section {
    padding: 96px 0;
}
@media (max-width: 768px) {
    .taushini-section {
        padding: 56px 0;
    }
}
.taushini-section--mist {
    background-color: var(--taushini-mist);
}
.taushini-container {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

/* ---- 5. BUTTONS ---- */
/* Primary — matches WooCommerce's .button / .added_to_cart / checkout buttons */
.button, button, input[type="submit"],
.wp-block-button__link,
.woocommerce a.button, .woocommerce button.button,
.woocommerce #respond input#submit,
.taushini-btn-primary {
    background-color: var(--taushini-terracotta) !important;
    color: var(--taushini-ivory) !important;
    border: none !important;
    border-radius: var(--taushini-radius) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
    font-weight: 600;
    padding: 14px 32px !important;
    transition: background-color 0.2s ease, transform 0.15s ease;
    cursor: pointer;
}
.button:hover, button:hover, input[type="submit"]:hover,
.wp-block-button__link:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
.taushini-btn-primary:hover {
    background-color: var(--taushini-maroon) !important;
    color: var(--taushini-ivory) !important;
}

/* Secondary — outline style */
.taushini-btn-secondary {
    background-color: transparent !important;
    color: var(--taushini-charcoal) !important;
    border: 1px solid var(--taushini-charcoal) !important;
    border-radius: var(--taushini-radius);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
    font-weight: 600;
    padding: 13px 31px;
    transition: all 0.2s ease;
}
.taushini-btn-secondary:hover {
    background-color: var(--taushini-charcoal) !important;
    color: var(--taushini-ivory) !important;
}

/* Tertiary — text link CTA (e.g. "Discover Our Story") */
.taushini-btn-text {
    display: inline-block;
    font-family: var(--taushini-font-sans);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    color: var(--taushini-charcoal);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.taushini-btn-text:hover {
    color: var(--taushini-terracotta);
    border-bottom-color: var(--taushini-terracotta);
}

/* ---- 6. PRODUCT CARDS (WooCommerce loop items) ---- */
.woocommerce ul.products li.product {
    background: transparent;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: block;
}
.woocommerce ul.products li.product img {
    background-color: var(--taushini-mist);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--taushini-radius);
    transition: transform 0.4s ease;
}
.woocommerce ul.products li.product:hover img {
    transform: scale(1.03);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px;
    margin-top: 14px;
    margin-bottom: 4px;
}
.woocommerce ul.products li.product .price {
    color: var(--taushini-charcoal);
    font-size: 15px;
}
.woocommerce ul.products li.product .price ins {
    color: var(--taushini-terracotta);
    text-decoration: none;
}
.woocommerce ul.products li.product .price del {
    color: var(--taushini-jute);
    opacity: 0.7;
}

/* Sale / New badges */
.woocommerce span.onsale {
    background-color: var(--taushini-terracotta) !important;
    color: var(--taushini-ivory) !important;
    border-radius: var(--taushini-radius);
    font-family: var(--taushini-font-sans);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    min-height: unset;
    min-width: unset;
    padding: 5px 10px;
    top: 10px;
    left: 10px;
}

/* Wishlist icon slot (used once wishlist plugin is added in a later stage) */
.taushini-wishlist-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(247, 242, 234, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.woocommerce ul.products li.product:hover .taushini-wishlist-icon {
    opacity: 1;
}
@media (max-width: 768px) {
    .taushini-wishlist-icon { opacity: 1; }
}

/* ---- 7. PRODUCT GRID RESPONSIVE COLUMNS ---- */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px 24px;
    align-items: stretch !important;
}
@media (max-width: 992px) {
    .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
}
.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

/* Keep the "Add to cart" / "Read more" button aligned on one line across a
   row, even when product titles wrap to a different number of lines
   (e.g. a short one-line title next to a longer two-line title). Each card
   becomes a flex column so the button is always pushed to the same bottom
   edge instead of sitting directly under whatever height the title took. */
.woocommerce ul.products li.product {
    display: flex !important;
    flex-direction: column;
    align-self: stretch !important;
    height: auto !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: flex !important;
    flex-direction: column;
    flex: 1 0 auto;
}
/* This theme (Astra) actually renders its own markup for the loop item —
   .astra-shop-thumbnail-wrap (image) and .astra-shop-summary-wrap (category,
   title, price, button) as two sibling divs inside li.product — rather than
   the plain WooCommerce .woocommerce-loop-product__link wrapper targeted
   above. The button lives inside .astra-shop-summary-wrap, so THAT is the
   element that needs to become the stretching flex column. */
.woocommerce ul.products li.product .astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column;
    flex: 1 0 auto;
}
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .button {
    margin-top: auto;
    align-self: flex-start;
}

/* ---- 8. MATERIAL TAG (small label under product title) ---- */
.taushini-material-tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--taushini-jute);
    margin-top: 2px;
}

/* ---- 9. DIVIDER / MOTIF ---- */
.taushini-divider {
    width: 48px;
    height: 2px;
    background-color: var(--taushini-gold);
    margin: 20px auto;
}

/* ---- 10. PREVENT HORIZONTAL OVERFLOW ---- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
img, video {
    max-width: 100%;
    height: auto;
}

/* ---- 11. FLOATING WHATSAPP BUTTON (site-wide) ---- */
.taushini-floating-whatsapp {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 9999;
    transition: transform 0.2s ease;
}
.taushini-floating-whatsapp:hover {
    transform: scale(1.08);
}
.taushini-floating-whatsapp svg {
    width: 32px;
    height: 32px;
}
@media (max-width: 600px) {
    .taushini-floating-whatsapp {
        width: 50px;
        height: 50px;
        right: 14px;
        bottom: 14px;
    }
    .taushini-floating-whatsapp svg {
        width: 28px;
        height: 28px;
    }
}
/* Keep clear of the sticky mobile Add-to-Cart bar on single product pages */
body.single-product .taushini-floating-whatsapp {
    bottom: 84px;
}
