/* ============================================================
   Nobo Deal — Islamic Theme v3 (Worker-2 layer)
   Emerald & Gold · loaded LAST (after islamic-theme.css)
   ────────────────────────────────────────────────────────────
   ⚠ INTEGRATION: add this <link> as the FINAL stylesheet in
   <head> of layouts/app.blade.php, i.e. AFTER islamic-theme.css
   AND after the inline <style> block. Cascade order is what
   makes this layer win ties; `!important` is used ONLY where
   islamic-theme.css / Bootstrap utilities already use it.
   ────────────────────────────────────────────────────────────
   What this layer does:
   1. Mobile 2-col product/featured/related/brand/combo grids
   2. Button system v3 — NO black buttons: white + gold/emerald
      outline, deep-emerald hover with colored glow
   3. Smooth scroll (+ prefers-reduced-motion reset)
   4. Glow/hover polish for cards + navbar links
   Tokens reused: --nd-emerald, --nd-emerald-deep, --nd-gold,
   --nd-gold-dark, --nd-gold-bright, --nd-cream, --nd-ink,
   --nd-shadow-soft/lift/gold (defined in islamic-theme.css).
   ============================================================ */

/* ============================================================
   SECTION 1 — Mobile 2-column product grids (≤ 575.98px)
   Real markup (grep evidence):
   - .row.shop-grid            → shop/collection/brand/search
     children: col-xl-3 col-lg-4 col-md-4 col-sm-6 mb-4
   - .row.brand-grid           → brands page
     children: col-xl-3 col-lg-4 col-md-6 col-sm-6 mb-4
   - .featured-products .row   → home featured (col-xl-2 … col-sm-6)
   - .related-products .row    → product detail related
   - .all-categories .row      → home "All Categories" grid
   - .combos-area .row         → combos page (col-xl-4 col-lg-6 col-md-6)
   - .banner-grid-area .row    → home banner grid (col-lg-3 col-md-6)
   - .shop-by-brand .row       → home brand cards (col-lg-3 col-md-4 col-6)
   All of these carry NO col-6/col-12 on xs → they collapse to
   a single column; the rules below force 2 columns.
   ============================================================ */
@media (max-width: 575.98px) {

  /* Generic CSS-grid fallback (spec'd; not currently in markup) */
  .product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .product-grid .col-12 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  /* Bootstrap row/col pattern: any .col-6 child = half width */
  .row > .col-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  /* ---- Real grids: force every product card column to 2-up ---- */
  .shop-grid > [class*="col-"]:not(.col-12),
  .brand-grid > [class*="col-"]:not(.col-12),
  .featured-products .row > [class*="col-"]:not(.col-12),
  .related-products .row > [class*="col-"]:not(.col-12),
  .all-categories .row > [class*="col-"]:not(.col-12),
  .combos-area .row > [class*="col-"]:not(.col-12),
  .banner-grid-area .row > [class*="col-"]:not(.col-12),
  .shop-by-brand .row > [class*="col-"]:not(.col-12) {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
    min-width: 0 !important;
    margin-bottom: 10px !important;   /* beats Bootstrap .mb-4 utility (!important) */
  }

  /* Empty-state columns inside product grids stay full width */
  .shop-grid > .col-12,
  .brand-grid > .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  /* Tighten Bootstrap gutters → real ~10px gap between cards */
  .shop-grid,
  .brand-grid,
  .featured-products .row,
  .related-products .row,
  .all-categories .row,
  .combos-area .row,
  .banner-grid-area .row,
  .shop-by-brand .row {
    --bs-gutter-x: 10px;
  }

  /* ---- Product cards: ~140px image, 13px title, 14px price ---- */
  .tp-product-card { padding: 10px; }
  .nd-home .tp-product-card .product-media img,
  .tp-product-card.style-6 .product-media img {
    height: 140px;
    object-fit: cover;
  }
  .nd-home .tp-product-card .product-details,
  .tp-product-card.style-6 .product-details { padding: 10px 10px 12px; }
  .nd-home .tp-product-card .product-name a,
  .tp-product-card.style-6 .product-name a { font-size: 13px; }
  .nd-home .tp-product-card .product-brand-label { font-size: 9.5px; margin: -1px 0 6px; letter-spacing: 1px; }
  .nd-home .tp-product-card .product-price,
  .tp-product-card .product-price { gap: 5px; margin-bottom: 8px; }
  .nd-home .tp-product-card .new-price,
  .tp-product-card .new-price { font-size: 14px; }
  .tp-product-card .old-price { font-size: 12px; }
  .tp-product-card .save-label { font-size: 10px; padding: 2px 7px; }
  .nd-home .tp-product-card .product-card-action .theme-btn,
  .tp-product-card.style-6 .theme-btn {
    font-size: 12px;
    padding: 7px 8px;
    white-space: nowrap;
  }

  /* ---- Category cards (home swiper + All Categories grid) ---- */
  .category-card .category-img img,
  .nd-home .category-card .category-img img { height: 100px; }
  .nd-home .category-card .category-info { padding: 10px 10px 12px; }
  .nd-home .category-card .category-info h5 a,
  .category-card .category-info h5 a { font-size: 13px; }

  /* ---- Brand cards (brands page + home "Shop by Brand") ---- */
  .brand-card-media { height: 105px; }
  .brand-card-body { padding: 12px 10px 16px; }
  .brand-card-name { font-size: 16px !important; }   /* beats home page media rule (0,2,0) */
  .brand-card-tag { font-size: 11px; margin-bottom: 10px; }
  .brand-count-badge { font-size: 10px; padding: 4px 9px; top: 8px; right: 8px; }
  .brand-card .brand-view-btn { font-size: 12px; padding: 7px 14px; }
  .nd-home .brand-card-arch img { max-height: 46px; }
  .nd-home .single-brand { padding: 10px; min-height: 72px; }
  .nd-home .single-brand img { max-height: 42px; }

  /* ---- Combo cards (combos page) ---- */
  .nd-combo-media img { height: 140px; }
  .nd-combo-body { padding: 12px 12px 14px; }
  .nd-combo-name a { font-size: 14px; }
  .nd-combo-card .new-price { font-size: 15px; }
  .nd-combo-price .old-price { font-size: 12px; }
  .nd-combo-desc {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .nd-combo-badge { font-size: 10px; padding: 4px 8px; top: 8px; left: 8px; }
  .nd-combo-body .theme-btn { padding: 8px 14px; font-size: 12.5px; }
  .nd-save-label { font-size: 11px; margin-left: 4px; padding: 1px 6px; }
}

/* ============================================================
   SECTION 2 — Button system v3 (NO black buttons)
   Base classes found in blades: .theme-btn, .theme-btn.secondary
   (plus .btn-primary/.btn-dark/.btn-dark-light/.btn-outline-*
   from demo.css/style.css for safety). islamic-theme.css paints
   these gold/emerald with !important → overrides below must use
   !important AND load last (they do).
   Default: WHITE bg + gold (or emerald) border + colored text.
   Hover:   deep emerald (never #000) + colored glow + lift.
   ============================================================ */
.theme-btn,
.theme-btn.btn-outline,
.single-slider .theme-btn,
.btn-outline-primary,
.btn-primary,
.btn-dark,
.btn-dark.btn-solid,
.btn-dark-light,
.btn-black {
  background: #ffffff !important;              /* kill gold-gradient solid */
  color: var(--nd-emerald-deep) !important;    /* colored text */
  border: 1.5px solid var(--nd-gold) !important;  /* colored border */
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(201, 162, 75, .22) !important;
  transition: background .25s ease, color .25s ease, border-color .25s ease,
              box-shadow .25s ease, transform .25s ease !important;
}
/* Emerald variant (secondary / outline CTA) */
.theme-btn.secondary {
  background: #ffffff !important;
  color: var(--nd-emerald) !important;
  border-color: var(--nd-emerald) !important;
  box-shadow: 0 4px 14px rgba(11, 92, 67, .18) !important;
}

/* Hover: deep emerald + gold glow (kills #000 / #454545 / #666) */
.theme-btn:hover,
.theme-btn.btn-outline:hover,
.single-slider .theme-btn:hover,
.btn-outline-primary:hover,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus,
.btn-dark:hover,
.btn-dark:active,
.btn-dark:focus,
.btn-dark.btn-solid:hover,
.btn-dark-light:hover,
.btn-dark-light:active,
.btn-dark-light:focus,
.btn-black:hover {
  background: var(--nd-emerald-deep) !important;   /* emerald, never black */
  color: #ffffff !important;
  border-color: var(--nd-emerald-deep) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(201, 162, 75, .55) !important;  /* gold glow */
}
/* Secondary hover: emerald glow */
.theme-btn.secondary:hover {
  background: var(--nd-emerald-deep) !important;
  color: #ffffff !important;
  border-color: var(--nd-emerald-deep) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11, 92, 67, .45) !important;    /* emerald glow */
}

/* Kill pure-black leftovers found in demo.css */
.newsletter-popup .close-popup-btn,
.newsletter-popup .close-popup-btn:hover {
  background: var(--nd-emerald-deep) !important;
  border: 1.5px solid var(--nd-gold);
  color: #ffffff !important;
}
.btn-close:hover .close-icon::before,
.btn-close:hover .close-icon::after {
  background-color: var(--nd-emerald-deep) !important;
}

/* ---- Glow utilities ---- */
.btn-glow {
  transition: background .25s ease, color .25s ease, border-color .25s ease,
              box-shadow .25s ease, transform .25s ease !important;
}
.btn-glow:hover { transform: translateY(-2px); }
.glow-gold { box-shadow: 0 6px 18px rgba(201, 162, 75, .55) !important; }
.glow-gold:hover { box-shadow: 0 10px 26px rgba(201, 162, 75, .7) !important; }
.glow-emerald { box-shadow: 0 6px 18px rgba(11, 92, 67, .45) !important; }
.glow-emerald:hover { box-shadow: 0 10px 26px rgba(11, 92, 67, .6) !important; }

/* ---- Focus-visible ring (gold) ---- */
.theme-btn:focus-visible,
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-dark:focus-visible,
.btn-outline-primary:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(201, 162, 75, .6);
  outline-offset: 2px;
}

/* ============================================================
   SECTION 3 — Smooth scroll (+ reduced-motion fallback)
   ============================================================ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;   /* sticky header offset for anchors */
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
    scroll-padding-top: 0;
  }
}

/* ============================================================
   SECTION 4 — Glow / hover polish
   Cards: lift (existing) + colored gold glow + gold hairline ring.
   Navbar links: soft gold text-glow on hover/active.
   ============================================================ */
.nd-home .tp-product-card:hover,
.tp-product-card.style-6:hover,
.product-card:hover,
.nd-combo-card:hover,
.brand-card:hover,
.category-card:hover,
.banner-grid-item:hover,
.offer-banner:hover,
.single-brand:hover {
  border-color: rgba(201, 162, 75, .55);
  box-shadow: var(--nd-shadow-lift),
              0 0 0 1px rgba(201, 162, 75, .35),
              0 14px 30px rgba(201, 162, 75, .22) !important;
}

/* Navbar links: gold glow on hover / active (additive over theme) */
#main-nav > ul > li > a {
  transition: color .25s ease, background .25s ease, text-shadow .3s ease !important;
}
#main-nav > ul > li:hover > a,
#main-nav > ul > li > a.active {
  text-shadow: 0 0 10px rgba(227, 200, 126, .65), 0 0 22px rgba(201, 162, 75, .4);
}
.header-top a:hover { text-shadow: 0 0 8px rgba(227, 200, 126, .5); }

/* "View All" title links: soft gold ring on hover */
.nd-home .title-link:hover,
.title-link:hover {
  box-shadow: 0 0 0 3px rgba(201, 162, 75, .15), 0 4px 14px rgba(201, 162, 75, .3);
}

/* ===== Preloader v3.2: simple clean fade in -> show -> fade out ===== */
.preloader { background: #ffffff !important; }            /* clean, no pattern */
.preloader::before, .preloader::after { display: none !important; }  /* remove spinning rings */
.preloader img {
    width: 150px !important;
    max-width: 50vw !important;
    height: auto !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    animation: ndFadeIn .8s ease both !important;          /* fade in */
}
@keyframes ndFadeIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
.preloader.loaded { opacity: 0 !important; visibility: hidden !important; transition: opacity .6s ease, visibility .6s !important; } /* fade out */

/* ===== Top bar slim (less vertical space) ===== */
.header-top { padding: 4px 0 !important; }
.header-top-inner { min-height: 30px !important; }
.ht-item { font-size: 12px !important; gap: 6px !important; }
.ht-pill { padding: 3px 11px !important; font-size: 11.5px !important; }
@media (max-width: 767.98px) {
    .header-top { padding: 3px 0 !important; }
    .header-top-inner { min-height: 26px !important; }
    .ht-pill { padding: 3px 8px !important; font-size: 11px !important; }
    .ht-item { font-size: 11px !important; }
}

/* ===== Header v3.3: full-right top bar + smaller logo + slim header ===== */
/* Top bar: EVERYTHING pushed to far right corner */
.header-top .container { display: flex !important; justify-content: flex-end !important; }
.header-top-inner { justify-content: flex-end !important; margin-left: auto !important; }
.header-top-contacts { margin-left: auto !important; }
.header-top-actions { margin-left: 0 !important; }
/* Logo: smaller + clean (no box / shadow) */
.header-middle .logo.logo-home a { padding: 2px 6px !important; background: transparent !important; box-shadow: none !important; }
.logo-home .site-logo, .header-middle .logo .site-logo { width: 160px !important; max-height: 54px !important; }
/* Header-middle: slim (less vertical space) */
.header-middle { padding: 10px 0 !important; }
@media (max-width: 991.98px) {
  .logo-home .site-logo, .header-middle .logo .site-logo { width: 140px !important; max-height: 48px !important; }
  .header-middle { padding: 9px 0 !important; }
}
@media (max-width: 767.98px) {
  /* Android/mobile: much smaller logo */
  .logo-home .site-logo, .header-middle .logo .site-logo { width: 110px !important; max-height: 40px !important; }
  .header-middle { padding: 8px 0 !important; }
}

/* ============================================================
   SECTION 5 - v4: quantity number black + order page readability
   Worker-1 (2026-08-12). APPENDED - no existing rule changed.
   BUG FIXED: qty number (পরিমাণ - 1 +) showed WHITE/invisible on
   the product page (light/cream backgrounds).
   Real markup evidence (grep of blades, same commit):
   - product.blade.php : .quantity-selector > input.form-control.qty-input  (#productQty)
   - buy.blade.php     : .quantity-selector > input.form-control.qty-input  (#summaryQty)
                         + input.form-control[name="quantity"]               (#formQty)
                         + totals: #lineTotal #subtotal #shippingFee #grandTotal #submitTotal
   - checkout.blade.php: totals: #subtotalDisplay #shippingFeeDisplay #grandTotalDisplay #submitTotal
   - receipt.blade.php : totals live in .cart-totals .d-flex > span (no ids)
   ============================================================ */

/* ---- 1) Qty inputs: force BLACK text on WHITE bg everywhere.
        Covers generic selectors AND every real qty input found. ---- */
.quantity-selector .qty-input,
.qty-input,
input[name="quantity"],
.cart-qty input,
#productQty,
#summaryQty,
#formQty {
  color: #000000 !important;
  background: #ffffff !important;
  -webkit-text-fill-color: #000000 !important;
  caret-color: #000 !important;
}
/* Number-spinner arrows inherit black (Chrome/Safari quirk guard) */
.quantity-selector .qty-input::-webkit-inner-spin-button,
.quantity-selector .qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
  opacity: 1 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* ---- 2) Qty +/- buttons: emerald bg + gold text is already
        readable (no black-on-black found in markup) -> only a
        defensive guarantee, keeps the existing look. ---- */
.quantity-selector .qty-btn {
  color: var(--nd-gold-bright) !important;
  -webkit-text-fill-color: var(--nd-gold-bright) !important;
}
.quantity-selector .qty-btn:hover {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ---- 3) Order totals: force dark ink #222831 so no total/price
        is ever invisible on cream/white panels.
        Includes the generic classes from the fix spec PLUS the
        REAL ids/classes found in buy/checkout/receipt. ---- */
.grand-total,
.order-total,
.subtotal,
.shipping-fee,
.line-total,
#lineTotal,
#subtotal,
#shippingFee,
#grandTotal,
#submitTotal,
#subtotalDisplay,
#shippingFeeDisplay,
#grandTotalDisplay,
.cart-totals .d-flex span,
.cart-item-price,
.cart-item-price span {
  color: #222831 !important;
}
/* Receipt totals row: beat .receipt-box .cart-totals .fw-bold (gold-dark) */
.receipt-box .cart-totals .d-flex span {
  color: #222831 !important;
}
/* #submitTotal sits INSIDE a .theme-btn button -> inherit the
   button color (emerald on white, white on emerald hover) so the
   button text stays legible in BOTH states. */
.theme-btn #submitTotal {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}
/* ===== v5.2: page fade-in (0.45s) + bottom-up reveal (design-safe) ===== */
@keyframes ndPageIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: ndPageIn .45s ease both; }
html.js-enabled [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1); }
html.js-enabled [data-reveal="left"] { transform: translateX(-28px); }
html.js-enabled [data-reveal="right"] { transform: translateX(28px); }
html.js-enabled [data-reveal="zoom"] { transform: scale(.92); }
html.js-enabled [data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    body { animation: none; }
    html.js-enabled [data-reveal] { opacity: 1; transform: none; transition: none; }
}
/* ===== v5.2: quantity selector BIG & clearly visible ===== */
.quantity-selector .qty-btn { width: 50px !important; height: 50px !important; font-size: 26px !important; line-height: 1 !important; border-radius: 12px !important; box-shadow: 0 4px 12px rgba(7,59,46,.18) !important; }
.quantity-selector .qty-input { width: 84px !important; height: 50px !important; font-size: 22px !important; font-weight: 800 !important; color: #000 !important; background: #fff !important; border: 2.5px solid var(--nd-gold) !important; border-radius: 12px !important; text-align: center !important; box-shadow: 0 0 0 3px rgba(201,162,75,.18) !important; }
@media (max-width: 575.98px) { .quantity-selector .qty-btn { width: 44px !important; height: 44px !important; font-size: 22px !important; } .quantity-selector .qty-input { width: 70px !important; height: 44px !important; font-size: 19px !important; } }
