/* Ibdaa Store V5.4 — unified, accessible light/dark theme and product motion */
:root {
  --ibdaa-light-bg:#f2f5f2; --ibdaa-light-surface:#ffffff; --ibdaa-light-surface-2:#eaf0eb;
  --ibdaa-light-text:#202b24; --ibdaa-light-muted:#5c6b61; --ibdaa-light-line:#d7e1d8;
  --ibdaa-green:#18764b; --ibdaa-green-hover:#11643f; --ibdaa-gold:#d8b45f;
  --ibdaa-dark-bg:#081c14; --ibdaa-dark-surface:#10291d; --ibdaa-dark-surface-2:#153725;
  --ibdaa-dark-text:#f7f5eb; --ibdaa-dark-muted:#c1d0c5; --ibdaa-dark-line:#826c39;
}

/* LIGHT MODE — explicit contrast for every main application surface */
body.ibdaa-theme-light {
  color-scheme:light !important; background:var(--ibdaa-light-bg)!important; color:var(--ibdaa-light-text)!important;
  background-image:none!important;
}
body.ibdaa-theme-light .topbar,
body.ibdaa-theme-light .header,
body.ibdaa-theme-light .appbar,
body.ibdaa-theme-light .side,
body.ibdaa-theme-light .footer,
body.ibdaa-theme-light .cart-panel,
body.ibdaa-theme-light .dialog {
  background:var(--ibdaa-light-surface)!important; color:var(--ibdaa-light-text)!important; border-color:var(--ibdaa-light-line)!important;
}
body.ibdaa-theme-light .side { box-shadow:0 4px 20px #203b2510; }
body.ibdaa-theme-light .side-brand b,
body.ibdaa-theme-light .appbar h1,
body.ibdaa-theme-light .page-title h2,
body.ibdaa-theme-light .section-head h2,
body.ibdaa-theme-light .dialog-head h3,
body.ibdaa-theme-light .cart-head h3,
body.ibdaa-theme-light .panel h3,
body.ibdaa-theme-light .auth-card h2,
body.ibdaa-theme-light .newsletter h3,
body.ibdaa-theme-light .service h3,
body.ibdaa-theme-light .promo h2,
body.ibdaa-theme-light .product-content h3,
body.ibdaa-theme-light .account-person h3,
body.ibdaa-theme-light .detail-info h1,
body.ibdaa-theme-light .product-detail-light .detail-info h1 {
  color:#1e3025!important;
}
body.ibdaa-theme-light .side-brand small,
body.ibdaa-theme-light .side-label,
body.ibdaa-theme-light .appbar small,
body.ibdaa-theme-light .page-title p,
body.ibdaa-theme-light .muted,
body.ibdaa-theme-light .product-content p,
body.ibdaa-theme-light .category small,
body.ibdaa-theme-light .benefit small,
body.ibdaa-theme-light .service p,
body.ibdaa-theme-light .newsletter p,
body.ibdaa-theme-light .metric small,
body.ibdaa-theme-light .account-person small,
body.ibdaa-theme-light .detail-info p,
body.ibdaa-theme-light .product-detail-light .detail-info p,
body.ibdaa-theme-light .footer p,
body.ibdaa-theme-light .footer a,
body.ibdaa-theme-light .copyright {
  color:var(--ibdaa-light-muted)!important;
}
body.ibdaa-theme-light .side-nav button,
body.ibdaa-theme-light .side-nav a,
body.ibdaa-theme-light .nav a,
body.ibdaa-theme-light .customer-tabs button { color:#34483b!important; }
body.ibdaa-theme-light .side-nav button:hover,
body.ibdaa-theme-light .side-nav button.active,
body.ibdaa-theme-light .side-nav a.active,
body.ibdaa-theme-light .customer-tabs button.active {
  background:#e6f2e9!important; color:#146b42!important; border-color:#b9d7c1!important;
}
body.ibdaa-theme-light .panel,
body.ibdaa-theme-light .metric,
body.ibdaa-theme-light .account-head,
body.ibdaa-theme-light .auth-card,
body.ibdaa-theme-light .product-card,
body.ibdaa-theme-light .service,
body.ibdaa-theme-light .benefit,
body.ibdaa-theme-light .category,
body.ibdaa-theme-light .newsletter,
body.ibdaa-theme-light .product-detail-card,
body.ibdaa-theme-light .mini-item,
body.ibdaa-theme-light .notice,
body.ibdaa-theme-light .table-wrap,
body.ibdaa-theme-light .empty-state {
  background:#fff!important; color:var(--ibdaa-light-text)!important;
  border-color:var(--ibdaa-light-line)!important; box-shadow:0 5px 18px #1c3b250b;
}
body.ibdaa-theme-light .product-image,
body.ibdaa-theme-light .detail-gallery-main,
body.ibdaa-theme-light .cart-thumb {
  background:#edf2ee!important; border-color:var(--ibdaa-light-line)!important;
}
body.ibdaa-theme-light .price,
body.ibdaa-theme-light .detail-price,
body.ibdaa-theme-light .product-detail-light .detail-price,
body.ibdaa-theme-light .metric strong { color:#176b46!important; }
body.ibdaa-theme-light .btn.primary,
body.ibdaa-theme-light .product-buttons .btn.primary,
body.ibdaa-theme-light .whatsapp-link {
  background:#18764b!important; color:#fff!important; border:1px solid #18764b!important; font-weight:700;
}
body.ibdaa-theme-light .btn.primary:hover,
body.ibdaa-theme-light .whatsapp-link:hover { background:#11643f!important; color:#fff!important; }
body.ibdaa-theme-light .btn.ghost,
body.ibdaa-theme-light .iconbtn,
body.ibdaa-theme-light .detail-link,
body.ibdaa-theme-light .product-buttons .detail-link,
body.ibdaa-theme-light .close {
  background:#fff!important; color:#20543a!important; border:1px solid #cbdacf!important;
}
body.ibdaa-theme-light .btn.danger { background:#fff5f4!important; color:#a52e2e!important; border-color:#efc4c0!important; }
body.ibdaa-theme-light button:disabled { opacity:.56; color:#68736c!important; }
body.ibdaa-theme-light input,
body.ibdaa-theme-light select,
body.ibdaa-theme-light textarea,
body.ibdaa-theme-light .toolbar input,
body.ibdaa-theme-light .toolbar select,
body.ibdaa-theme-light .filterbar input,
body.ibdaa-theme-light .filterbar select,
body.ibdaa-theme-light .field input,
body.ibdaa-theme-light .field select,
body.ibdaa-theme-light .field textarea,
body.ibdaa-theme-light .newsletter input {
  background:#fff!important; color:#202b24!important; border:1px solid #cbd8ce!important;
}
body.ibdaa-theme-light input::placeholder,
body.ibdaa-theme-light textarea::placeholder { color:#78867d!important; opacity:1; }
body.ibdaa-theme-light .field label { color:#34483b!important; }
body.ibdaa-theme-light table { background:#fff!important; }
body.ibdaa-theme-light th { background:#edf3ee!important; color:#214b35!important; border-color:#dce5dd!important; }
body.ibdaa-theme-light td { color:#26352b!important; border-color:#e4ebe5!important; }
body.ibdaa-theme-light .status { background:#e4f4e9!important; color:#176b40!important; }
body.ibdaa-theme-light .status.warn { background:#fff3df!important; color:#8b5a11!important; }
body.ibdaa-theme-light .status.danger { background:#ffeded!important; color:#a52e2e!important; }
body.ibdaa-theme-light .bar { background:linear-gradient(180deg,#63b98a,#18764b)!important; }
body.ibdaa-theme-light .product-status-badge { box-shadow:0 2px 8px #14271b18; }
body.ibdaa-theme-light .toast { background:#fff!important; color:#20352a!important; border-color:#b7d3bf!important; }
body.ibdaa-theme-light .product-detail-light .detail-spec { background:#f0f4f0!important; color:#4a5d50!important; border-color:#dce5dd!important; }
body.ibdaa-theme-light .product-detail-light .detail-thumb { background:#fff!important; border-color:#dce5dd!important; }
body.ibdaa-theme-light .product-detail-light .footer { background:#edf2ed!important; }
body.ibdaa-theme-light .product-detail-light .old-price { color:#7a887e!important; }

/* DARK MODE — deep evergreen with warm champagne gold, based on the supplied review artwork */
body.ibdaa-theme-dark {
  color-scheme:dark!important; color:var(--ibdaa-dark-text)!important;
  background-color:var(--ibdaa-dark-bg)!important;
  background-image:radial-gradient(ellipse at 82% 0%,#224b352e,transparent 38%),radial-gradient(ellipse at 8% 92%,#8f6b2620,transparent 32%)!important;
}
body.ibdaa-theme-dark .topbar { background:#04110b!important; color:#d7dfd5!important; border-color:#8d743f66!important; }
body.ibdaa-theme-dark .header,
body.ibdaa-theme-dark .appbar,
body.ibdaa-theme-dark .side,
body.ibdaa-theme-dark .footer,
body.ibdaa-theme-dark .cart-panel,
body.ibdaa-theme-dark .dialog { background:#091d14!important; color:var(--ibdaa-dark-text)!important; border-color:#8d743f66!important; }
body.ibdaa-theme-dark .side-brand b,
body.ibdaa-theme-dark .appbar h1,
body.ibdaa-theme-dark .page-title h2,
body.ibdaa-theme-dark .section-head h2,
body.ibdaa-theme-dark .dialog-head h3,
body.ibdaa-theme-dark .cart-head h3,
body.ibdaa-theme-dark .panel h3,
body.ibdaa-theme-dark .auth-card h2,
body.ibdaa-theme-dark .newsletter h3,
body.ibdaa-theme-dark .service h3,
body.ibdaa-theme-dark .promo h2,
body.ibdaa-theme-dark .product-content h3,
body.ibdaa-theme-dark .account-person h3,
body.ibdaa-theme-dark .detail-info h1,
body.ibdaa-theme-dark .product-detail-light .detail-info h1 { color:#f7e5b7!important; }
body.ibdaa-theme-dark .side-brand small,
body.ibdaa-theme-dark .side-label,
body.ibdaa-theme-dark .appbar small,
body.ibdaa-theme-dark .page-title p,
body.ibdaa-theme-dark .muted,
body.ibdaa-theme-dark .product-content p,
body.ibdaa-theme-dark .category small,
body.ibdaa-theme-dark .benefit small,
body.ibdaa-theme-dark .service p,
body.ibdaa-theme-dark .newsletter p,
body.ibdaa-theme-dark .metric small,
body.ibdaa-theme-dark .account-person small,
body.ibdaa-theme-dark .detail-info p,
body.ibdaa-theme-dark .product-detail-light .detail-info p,
body.ibdaa-theme-dark .footer p,
body.ibdaa-theme-dark .footer a { color:#c1d0c5!important; }
body.ibdaa-theme-dark .side-nav button,
body.ibdaa-theme-dark .side-nav a,
body.ibdaa-theme-dark .nav a,
body.ibdaa-theme-dark .customer-tabs button { color:#e0e8df!important; }
body.ibdaa-theme-dark .side-nav button:hover,
body.ibdaa-theme-dark .side-nav button.active,
body.ibdaa-theme-dark .side-nav a.active,
body.ibdaa-theme-dark .customer-tabs button.active { background:#d8b45f20!important; color:#ffe7ad!important; border-color:#b9954d80!important; }
body.ibdaa-theme-dark .panel,
body.ibdaa-theme-dark .metric,
body.ibdaa-theme-dark .account-head,
body.ibdaa-theme-dark .auth-card,
body.ibdaa-theme-dark .product-card,
body.ibdaa-theme-dark .service,
body.ibdaa-theme-dark .benefit,
body.ibdaa-theme-dark .category,
body.ibdaa-theme-dark .newsletter,
body.ibdaa-theme-dark .product-detail-card,
body.ibdaa-theme-dark .mini-item,
body.ibdaa-theme-dark .notice,
body.ibdaa-theme-dark .table-wrap,
body.ibdaa-theme-dark .empty-state {
  background:linear-gradient(145deg,#123224,#091b13)!important; color:#f7f5eb!important;
  border-color:#8d743f66!important; box-shadow:0 8px 24px #0003;
}
body.ibdaa-theme-dark .product-image,
body.ibdaa-theme-dark .detail-gallery-main,
body.ibdaa-theme-dark .cart-thumb { background:#10291d!important; border-color:#8d743f55!important; }
body.ibdaa-theme-dark .price,
body.ibdaa-theme-dark .detail-price,
body.ibdaa-theme-dark .product-detail-light .detail-price,
body.ibdaa-theme-dark .metric strong { color:#f1d58e!important; }
body.ibdaa-theme-dark .btn.primary,
body.ibdaa-theme-dark .product-buttons .btn.primary { background:linear-gradient(135deg,#f4d98e,#b88a37)!important; color:#1e1a10!important; border:1px solid #d9b761!important; font-weight:800; }
body.ibdaa-theme-dark .whatsapp-link { background:#16834f!important; color:#fff!important; border:1px solid #16834f!important; }
body.ibdaa-theme-dark .btn.ghost,
body.ibdaa-theme-dark .iconbtn,
body.ibdaa-theme-dark .detail-link,
body.ibdaa-theme-dark .product-buttons .detail-link,
body.ibdaa-theme-dark .close { background:#153526!important; color:#f4e5bb!important; border:1px solid #8d743f75!important; }
body.ibdaa-theme-dark .btn.danger { background:#411f1c!important; color:#ffd2cb!important; border-color:#9a5148!important; }
body.ibdaa-theme-dark input,
body.ibdaa-theme-dark select,
body.ibdaa-theme-dark textarea,
body.ibdaa-theme-dark .toolbar input,
body.ibdaa-theme-dark .toolbar select,
body.ibdaa-theme-dark .filterbar input,
body.ibdaa-theme-dark .filterbar select,
body.ibdaa-theme-dark .field input,
body.ibdaa-theme-dark .field select,
body.ibdaa-theme-dark .field textarea,
body.ibdaa-theme-dark .newsletter input { background:#07170f!important; color:#f7f5eb!important; border:1px solid #56715e!important; }
body.ibdaa-theme-dark input::placeholder,
body.ibdaa-theme-dark textarea::placeholder { color:#b5c3b8!important; opacity:1; }
body.ibdaa-theme-dark .field label { color:#e1e9df!important; }
body.ibdaa-theme-dark table { background:transparent!important; }
body.ibdaa-theme-dark th { background:#1b3829!important; color:#f6dfa5!important; border-color:#ffffff18!important; }
body.ibdaa-theme-dark td { color:#eef2e9!important; border-color:#ffffff16!important; }
body.ibdaa-theme-dark .status { background:#164a31!important; color:#b5f1cb!important; }
body.ibdaa-theme-dark .status.warn { background:#59411b!important; color:#ffe2a1!important; }
body.ibdaa-theme-dark .status.danger { background:#542623!important; color:#ffc2b8!important; }
body.ibdaa-theme-dark .bar { background:linear-gradient(180deg,#f4d27e,#9a6b1d)!important; }
body.ibdaa-theme-dark .product-detail-light .detail-spec { background:#153526!important; color:#d6e2d8!important; border-color:#8d743f55!important; }
body.ibdaa-theme-dark .product-detail-light .detail-thumb { background:#10291d!important; border-color:#8d743f55!important; }
body.ibdaa-theme-dark .product-detail-light .footer { background:#07170f!important; }
body.ibdaa-theme-dark .toast { background:#153526!important; color:#fff7e7!important; border-color:#d8b45f!important; }

/* Theme switch: large enough to tap, readable in either mode */
.ibdaa-theme-toggle {
  min-height:40px!important; padding:9px 14px!important; border-radius:12px!important;
  font-size:12px!important; font-weight:800!important; white-space:nowrap!important;
  border:1px solid #b9954d!important; background:#f4e3b7!important; color:#273326!important;
  box-shadow:0 3px 12px #00000012!important; transition:background .2s ease,transform .2s ease!important;
}
.ibdaa-theme-toggle:hover { transform:translateY(-1px); }
body.ibdaa-theme-dark .ibdaa-theme-toggle { background:#153526!important; color:#ffe8b2!important; border-color:#d8b45f!important; }
body.ibdaa-theme-light .ibdaa-theme-toggle { background:#fff!important; color:#176b46!important; border-color:#b8d3bf!important; }

/* Product cards: balanced layout and restrained 3D hover motion */
.product-card { display:flex; flex-direction:column; height:100%; transform:translateZ(0); transition:transform .28s ease,box-shadow .28s ease,border-color .28s ease; }
.product-image { perspective:1000px; transform-style:preserve-3d; }
.product-image img { transform:perspective(1000px) translateZ(0) scale(1); transform-origin:center; transition:transform .42s cubic-bezier(.2,.75,.25,1),filter .42s ease; will-change:transform; }
.product-content { display:flex; flex:1; flex-direction:column; min-width:0; }
.product-content .product-buttons { margin-top:auto; padding-top:12px; }
.product-status-badge,.product-stock-badge,.product-stock-badge-inline { font-weight:800; letter-spacing:0; }
.product-image .product-status-badge { top:12px; right:12px; }
.badge-new { background:#e5f5e9!important; color:#176b40!important; border:1px solid #acd7b8!important; }
.badge-offer { background:#fff0d9!important; color:#92560e!important; border:1px solid #efcf9c!important; }
.badge-preorder { background:#e9efff!important; color:#3157a3!important; border:1px solid #c3d2fa!important; }
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .product-card:hover { transform:translateY(-5px); box-shadow:0 18px 38px #102b1b24; }
  .product-card:hover .product-image img { transform:perspective(1000px) rotateY(-3deg) rotateX(2deg) scale(1.055); filter:saturate(1.04); }
  .detail-gallery-main img:hover { transform:scale(1.025); }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
@media (max-width:760px) {
  .ibdaa-theme-toggle { min-height:38px!important; padding:8px 10px!important; font-size:10px!important; }
  .product-actions-v52 { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .product-actions-v52 .btn { min-height:40px; white-space:normal; }
}

/* Additional coverage for hero typography, brand, customer panels and modal controls */
body.ibdaa-theme-light .brand strong,
body.ibdaa-theme-light .hero h1,
body.ibdaa-theme-light .hero h1 span,
body.ibdaa-theme-light .side-brand b { color:#183c2b!important; }
body.ibdaa-theme-light .hero p,
body.ibdaa-theme-light .hero-meta,
body.ibdaa-theme-light .section-head p,
body.ibdaa-theme-light .promo p,
body.ibdaa-theme-light .brand small { color:#5d6d62!important; }
body.ibdaa-theme-light .art-chip { background:#fff!important; color:#1d6340!important; border-color:#d5e2d8!important; }
body.ibdaa-theme-light .auth-tabs button,
body.ibdaa-theme-light .customer-tabs button { background:#f7faf7!important; color:#31483a!important; border:1px solid #d5e1d7!important; }
body.ibdaa-theme-light .mini-item b,
body.ibdaa-theme-light .cart-info b,
body.ibdaa-theme-light .detail-spec,
body.ibdaa-theme-light .notice { color:#26382c!important; }
body.ibdaa-theme-light .product-detail-light .topbar { background:#edf2ed!important; color:#526257!important; }
body.ibdaa-theme-light .product-detail-light .detail-stock,
body.ibdaa-theme-light #detailStock { color:#176b46!important; }
body.ibdaa-theme-light .appbar .status { color:#176b40!important; }

body.ibdaa-theme-dark .brand strong,
body.ibdaa-theme-dark .hero h1,
body.ibdaa-theme-dark .hero h1 span,
body.ibdaa-theme-dark .side-brand b { color:#f7e5b7!important; }
body.ibdaa-theme-dark .hero p,
body.ibdaa-theme-dark .hero-meta,
body.ibdaa-theme-dark .section-head p,
body.ibdaa-theme-dark .promo p,
body.ibdaa-theme-dark .brand small { color:#d2ded3!important; }
body.ibdaa-theme-dark .art-chip { background:#0d2419ed!important; color:#f3d99c!important; border-color:#957a43!important; }
body.ibdaa-theme-dark .auth-tabs button,
body.ibdaa-theme-dark .customer-tabs button { background:#153526!important; color:#f0e7d0!important; border:1px solid #8d743f75!important; }
body.ibdaa-theme-dark .mini-item b,
body.ibdaa-theme-dark .cart-info b,
body.ibdaa-theme-dark .detail-spec,
body.ibdaa-theme-dark .notice { color:#e6ecdf!important; }
body.ibdaa-theme-dark .app-content,
body.ibdaa-theme-dark .customer-content,
body.ibdaa-theme-dark .main-area { color:#f0f2e9!important; }
body.ibdaa-theme-dark .product-detail-light .topbar { background:#04110b!important; color:#d7dfd5!important; }
body.ibdaa-theme-dark .product-detail-light .detail-stock,
body.ibdaa-theme-dark #detailStock { color:#a9e6bc!important; }
body.ibdaa-theme-dark .appbar .status { color:#b5f1cb!important; }

/* Make the zoom/tilt effect apply to the full product image gallery too */
.product-detail-light .detail-gallery-main { perspective:1100px; }
.product-detail-light .detail-gallery-main img {
  transform-origin:center; transition:transform .4s cubic-bezier(.2,.75,.25,1),filter .4s ease;
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .product-detail-light .detail-gallery-main:hover img { transform:perspective(1100px) rotateY(-2deg) rotateX(1.5deg) scale(1.035); }
}

/* V5.6 customer-facing and admin payment panels */
.payment-customer-panel{margin-top:12px;padding:12px;border:1px solid var(--line,#b99b50);border-radius:12px;background:rgba(16,72,48,.10);display:grid;gap:8px}.payment-customer-panel p,.payment-customer-panel small{margin:0;line-height:1.8}.payment-customer-form{display:grid;gap:8px;margin-top:6px}.payment-customer-form input,.payment-customer-form select{max-width:100%;min-width:0}.payment-method-details{padding:9px 11px;border-radius:9px;background:rgba(180,145,57,.10);overflow-wrap:anywhere;line-height:1.9}


/* IBDAA V55 - DARK HOMEPAGE HERO FIX */

/* Main hero background */
body.ibdaa-theme-dark.storefront-light .hero {
  background:
    radial-gradient(ellipse at 78% 15%, #1b563a55, transparent 42%),
    radial-gradient(ellipse at 10% 90%, #b58a3520, transparent 35%),
    linear-gradient(135deg, #06150e 0%, #0a2418 55%, #102e20 100%) !important;
  color: #f7f5eb !important;
  border-color: #9c793b55 !important;
}

/* Hero text area */
body.ibdaa-theme-dark.storefront-light .hero .hero-grid > div:not(.hero-art) {
  color: #d5e1d7 !important;
}

/* Main heading */
body.ibdaa-theme-dark.storefront-light .hero h1 {
  color: #f6e8c3 !important;
  text-shadow: 0 4px 24px #0008 !important;
}

body.ibdaa-theme-dark.storefront-light .hero h1 span {
  color: #e5bd64 !important;
}

/* Description and small labels */
body.ibdaa-theme-dark.storefront-light .hero p,
body.ibdaa-theme-dark.storefront-light .hero .hero-meta,
body.ibdaa-theme-dark.storefront-light .hero .eyebrow,
body.ibdaa-theme-dark.storefront-light .hero .hero-badge,
body.ibdaa-theme-dark.storefront-light .hero .hero-kicker,
body.ibdaa-theme-dark.storefront-light .hero .hero-tag,
body.ibdaa-theme-dark.storefront-light .hero small {
  color: #c5d5ca !important;
}

/* Slider frame */
body.ibdaa-theme-dark.storefront-light .hero .hero-art {
  background: linear-gradient(145deg, #0c281b, #06140d) !important;
  border-color: #b9954d66 !important;
}

/* Hero buttons */
body.ibdaa-theme-dark.storefront-light .hero .btn.ghost {
  background: #123526 !important;
  color: #f5e6bd !important;
  border-color: #a58a4e !important;
}

body.ibdaa-theme-dark.storefront-light .hero .btn.primary {
  color: #211b0d !important;
}


/* IBDAA V56 - MOBILE HEADER REFINEMENT */
@media (max-width:760px) {
  .header {
    overflow: visible !important;
  }

  .headrow {
    height: auto !important;
    min-height: 70px;
    padding: 9px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
  }

  /* Brand area */
  .headrow > .brand {
    min-width: 0 !important;
    max-width: calc(100% - 155px);
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  .headrow > .brand > span:not(.brandmark) {
    min-width: 0 !important;
    max-width: 100%;
    overflow: hidden !important;
  }

  .headrow > .brand .brandmark,
  .headrow > .brand > .brand-logo {
    width: 39px !important;
    height: 39px !important;
    min-width: 39px !important;
    max-width: 39px !important;
    flex: 0 0 39px !important;
    border-radius: 11px !important;
    object-fit: contain !important;
  }

  .headrow > .brand strong {
    display: block !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .headrow > .brand small {
    display: block !important;
    font-size: 8px !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  /* Action buttons */
  .headrow > .head-actions {
    min-width: 0 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
  }

  .head-actions > .iconbtn {
    min-width: 35px !important;
    min-height: 37px !important;
    height: 37px !important;
    padding: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    flex: 0 0 auto !important;
  }

  .head-actions .account-label {
    display: none !important;
  }

  .head-actions .mobile-menu {
    display: inline-flex !important;
    width: 35px !important;
  }

  /* Compact theme control, icon-only visually.
     The accessible label remains supplied by theme-toggle.js. */
  .head-actions .ibdaa-theme-toggle {
    width: 35px !important;
    min-width: 35px !important;
    max-width: 35px !important;
    height: 37px !important;
    min-height: 37px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 1 !important;
  }

  .head-actions .ibdaa-theme-toggle[aria-label*="الداكن"]::after {
    content: "🌙";
    font-size: 15px;
  }

  .head-actions .ibdaa-theme-toggle[aria-label*="الأبيض"]::after {
    content: "☀️";
    font-size: 15px;
  }

  .nav {
    display: none !important;
  }
}

/* Extra compact phones */
@media (max-width:390px) {
  .headrow {
    padding-inline: 8px !important;
    gap: 4px !important;
  }

  .headrow > .brand {
    max-width: calc(100% - 148px);
    gap: 5px !important;
  }

  .headrow > .brand .brandmark,
  .headrow > .brand > .brand-logo {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    flex-basis: 36px !important;
  }

  .headrow > .brand strong {
    font-size: 13px !important;
  }

  .head-actions {
    gap: 4px !important;
  }

  .head-actions > .iconbtn,
  .head-actions .ibdaa-theme-toggle {
    min-width: 33px !important;
    width: 33px !important;
    height: 35px !important;
    min-height: 35px !important;
    padding: 4px !important;
  }
}


/* IBDAA V57 - PRODUCT CARD REFINEMENT */

/* Product cards */
#productGrid .product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid #b9954d55;
  border-radius: 19px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

#productGrid .product-image {
  position: relative;
  height: 190px;
  min-height: 150px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #b9954d30;
}

#productGrid .product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform .35s ease;
}

#productGrid .product-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  min-width: 0;
}

#productGrid .product-content > .muted {
  font-size: 10px !important;
  line-height: 1.5;
  color: #9db6a4;
}

#productGrid .product-content h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 42px;
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

#productGrid .product-content p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: 48px;
  font-size: 11px;
  line-height: 1.65;
  margin: 0;
}

#productGrid .price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
  font-size: 17px;
  font-weight: 800;
  color: #e9c878;
}

#productGrid .price del {
  font-size: 11px;
  font-weight: 500;
}

/* Status badges */
#productGrid .product-status-badge,
#productGrid .product-stock-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 3px 12px #0003;
}

#productGrid .badge-new {
  background: #176b46;
  color: #fff;
}

#productGrid .badge-offer {
  background: #e5bd64;
  color: #261d0b;
}

#productGrid .badge-preorder {
  background: #315a86;
  color: #fff;
}

#productGrid .product-stock-badge {
  right: auto;
  left: 10px;
  background: #782e29;
  color: #fff;
}

/* Action layout: cart first, details and WhatsApp below */
#productGrid .product-buttons {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: auto;
  padding-top: 10px;
}

#productGrid .product-buttons > :first-child {
  grid-column: 1 / -1;
  min-height: 39px;
  font-size: 11px;
  font-weight: 800;
}

#productGrid .product-buttons > :nth-child(2),
#productGrid .product-buttons > :nth-child(3) {
  min-height: 35px;
  padding: 8px 5px;
  font-size: 10px;
  text-align: center;
  justify-content: center;
}

#productGrid .product-buttons .whatsapp-link {
  background: #126b45;
  color: #fff;
  border-color: #237b55;
}

#productGrid .product-buttons button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* Light theme */
body.ibdaa-theme-light #productGrid .product-card {
  background: #fff !important;
  border-color: #d8e2d9 !important;
  color: #22372a !important;
  box-shadow: 0 6px 20px #153a250d;
}

body.ibdaa-theme-light #productGrid .product-image {
  background: linear-gradient(145deg,#f5f8f5,#eaf0eb) !important;
  border-color: #e0e8e1 !important;
}

body.ibdaa-theme-light #productGrid .product-content h3 {
  color: #20392b !important;
}

body.ibdaa-theme-light #productGrid .product-content p,
body.ibdaa-theme-light #productGrid .product-content > .muted {
  color: #68796d !important;
}

body.ibdaa-theme-light #productGrid .price {
  color: #176b46 !important;
}

/* Dark theme */
body.ibdaa-theme-dark #productGrid .product-card {
  background: linear-gradient(150deg,#123224,#091b13) !important;
  border-color: #987b4555 !important;
  color: #f4f1e8 !important;
  box-shadow: 0 9px 24px #0003;
}

body.ibdaa-theme-dark #productGrid .product-image {
  background: radial-gradient(ellipse at center,#254b35,#07170e 75%) !important;
  border-color: #987b4544 !important;
}

body.ibdaa-theme-dark #productGrid .product-content h3 {
  color: #f4e6c5 !important;
}

body.ibdaa-theme-dark #productGrid .product-content p,
body.ibdaa-theme-dark #productGrid .product-content > .muted {
  color: #b9cabe !important;
}

body.ibdaa-theme-dark #productGrid .price {
  color: #f1d58e !important;
}

/* Tablet */
@media (min-width:761px) and (max-width:1050px) {
  #productGrid .product-image {
    height: 165px;
  }
}

/* Mobile */
@media (max-width:760px) {
  #productGrid.products {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 10px !important;
  }

  #productGrid .product-image {
    height: 145px;
    min-height: 125px;
  }

  #productGrid .product-content {
    padding: 10px;
    gap: 7px;
  }

  #productGrid .product-content h3 {
    font-size: 11px;
    min-height: 37px;
  }

  #productGrid .product-content p {
    font-size: 10px;
    min-height: 45px;
  }

  #productGrid .price {
    font-size: 14px;
  }

  #productGrid .product-buttons {
    gap: 5px;
  }

  #productGrid .product-buttons > :first-child {
    min-height: 36px;
    font-size: 10px;
  }

  #productGrid .product-buttons > :nth-child(2),
  #productGrid .product-buttons > :nth-child(3) {
    min-height: 33px;
    font-size: 9px;
  }
}

/* Small phones */
@media (max-width:390px) {
  #productGrid.products {
    gap: 8px !important;
  }

  #productGrid .product-image {
    height: 125px;
    min-height: 115px;
  }

  #productGrid .product-content {
    padding: 8px;
  }

  #productGrid .product-status-badge,
  #productGrid .product-stock-badge {
    top: 7px;
    padding: 5px 7px;
    font-size: 9px;
  }
}

@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  #productGrid .product-card:hover {
    transform: translateY(-5px);
    border-color: #d5b264 !important;
    box-shadow: 0 17px 35px #0003;
  }

  #productGrid .product-card:hover .product-image img {
    transform: scale(1.045);
  }
}

@media (prefers-reduced-motion:reduce) {
  #productGrid .product-card,
  #productGrid .product-image img {
    transition: none !important;
  }
}

