/* =========================================================
   dark.css — loaded last on every storefront page.
   site.css switches its own colours through role variables;
   *-dark.css (generated) covers header-footer.css, home.css
   and pages.css. This file is the part that needs judgement.
   ========================================================= */

/* ---------- Theme toggle (both themes) ---------- */
.theme-toggle-btn {
    background: none; border: 0; cursor: pointer; font: inherit; color: inherit;
    display: inline-flex; align-items: center; gap: 8px; padding: 0;
}
.theme-toggle-btn .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle-btn .fa-sun { display: inline-block; }
[data-theme="dark"] .theme-toggle-btn .fa-moon { display: none; }
.theme-toggle-btn .when-dark { display: none; }
[data-theme="dark"] .theme-toggle-btn .when-dark { display: inline; }
[data-theme="dark"] .theme-toggle-btn .when-light { display: none; }
/* Desktop: icon only, sized and spaced like the other menu links */
.header .header-row .header-right .main-menu li.menu-item.theme-toggle > .theme-toggle-btn {
    padding: 26px 14px; font-size: 15px; color: var(--heading);
}
.header .header-row .header-right .main-menu li.menu-item.theme-toggle > .theme-toggle-btn:hover { color: var(--link); }
.header .header-row .header-right .main-menu li.menu-item.theme-toggle .label { display: none; }
/* Hamburger menu: a full-width row like the other items */
.header .header-row .mobile-menu li.menu-item.theme-toggle > .theme-toggle-btn {
    width: 100%; padding: 12px; color: #fff; font-weight: 600; text-align: left; border-radius: 8px;
}
.header .header-row .mobile-menu li.menu-item.theme-toggle > .theme-toggle-btn:hover { background: rgba(0, 180, 216, 0.12); }

/* ---------- Logo ---------- */
.nav__logo-img.logo-on-dark { display: none; }
[data-theme="dark"] .nav__logo-img.logo-on-light { display: none; }
[data-theme="dark"] .nav__logo-img.logo-on-dark { display: block; }

/* ---------- Everything below is dark only ---------- */

/* Product photos are shot on white; keep them on a light background rather than
   showing white boxes on navy */
[data-theme="dark"] .prod-card .prod-image-wrap {
    background: linear-gradient(180deg, #ffffff 0%, #e6edf3 100%) !important;
}
[data-theme="dark"] .gallery-main,
[data-theme="dark"] .gallery-thumbs button,
[data-theme="dark"] .cart-line img,
[data-theme="dark"] .review-photos img { background: #ffffff; }
[data-theme="dark"] .prod-card .no-image,
[data-theme="dark"] .cart-line .no-image { color: #c5d3df; }
[data-theme="dark"] .gallery-thumbs button[aria-current="true"] { border-color: var(--cyan); }

/* Cards lift with a lighter edge instead of a shadow that can't be seen on dark */
[data-theme="dark"] .prod-card:hover,
[data-theme="dark"] .service-card:hover { border-color: #2c5378; box-shadow: 0 18px 40px -18px rgba(0, 180, 216, 0.25); }
[data-theme="dark"] .panel,
[data-theme="dark"] .info-card,
[data-theme="dark"] .buy-box,
[data-theme="dark"] .review { box-shadow: none; }

/* Prices and stock: brand red and amber lightened for contrast on dark */
[data-theme="dark"] .price.on-sale [data-price],
[data-theme="dark"] .price-now.sale,
[data-theme="dark"] .prod-card .price-now.sale { color: #ff7a84 !important; }
[data-theme="dark"] .savings { background: rgba(255, 122, 132, 0.14); color: #ff9aa2; }
[data-theme="dark"] .stock.is-in { color: #4ade80; }
[data-theme="dark"] .stock.is-in::before { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18); }
[data-theme="dark"] .stock.is-low { color: #fbbf4b; }
[data-theme="dark"] .stock.is-out { color: #ff7a84; }
[data-theme="dark"] .stock.is-out::before { background: #ff7a84; box-shadow: 0 0 0 3px rgba(255, 122, 132, 0.18); }
[data-theme="dark"] .line-problem, [data-theme="dark"] .field-error { color: #ff8f98; }
[data-theme="dark"] .has-error input, [data-theme="dark"] .has-error select, [data-theme="dark"] .has-error textarea { border-color: #ff7a84; }

/* Alerts */
[data-theme="dark"] .flash-success { background: rgba(74, 222, 128, 0.10); color: #86efac; border-color: rgba(74, 222, 128, 0.30); }
[data-theme="dark"] .flash-error   { background: rgba(255, 122, 132, 0.10); color: #ffa3aa; border-color: rgba(255, 122, 132, 0.30); }
[data-theme="dark"] .flash-info    { background: rgba(0, 180, 216, 0.12); color: #7fdcf0; border-color: rgba(0, 180, 216, 0.32); }

/* Order status pills and the "held for you" box */
[data-theme="dark"] .status { background: #13293f; color: var(--heading); }
[data-theme="dark"] .status-awaiting_payment, [data-theme="dark"] .status-pending_verification { background: rgba(255, 182, 39, 0.16); color: #fcd27a; }
[data-theme="dark"] .status-paid, [data-theme="dark"] .status-processing, [data-theme="dark"] .status-ready,
[data-theme="dark"] .status-dispatched, [data-theme="dark"] .status-completed { background: rgba(74, 222, 128, 0.14); color: #86efac; }
[data-theme="dark"] .status-cancelled, [data-theme="dark"] .status-expired, [data-theme="dark"] .status-refunded { background: rgba(255, 122, 132, 0.14); color: #ffa3aa; }
[data-theme="dark"] .hold { color: var(--text); border-color: rgba(0, 180, 216, 0.35); }

/* Buttons: the dark button needs to stand out from dark surfaces */
[data-theme="dark"] .btn-dark { background: #1e5a8a; }
[data-theme="dark"] .btn-dark:hover { background: #2a6fa6; }
[data-theme="dark"] .btn:hover { box-shadow: inset 0 0 0 1px var(--cyan); color: var(--heading); }
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-primary:hover { color: #061626; }

/* Form fields */
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #7f93a8; }
[data-theme="dark"] select option { background: #0f2236; color: var(--text); }
[data-theme="dark"] .check input, [data-theme="dark"] .method input { accent-color: var(--cyan); }

/* Header bits that live in site.css */
[data-theme="dark"] .nav-search { background: var(--surface); border-bottom-color: var(--border); box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.6); }
[data-theme="dark"] .cart-badge[data-count="0"] { background: #1f3a55; color: #a3b5c7; }
[data-theme="dark"] .header .header-row .header-right .main-menu li.menu-item.dropdown .dropdown-menu .link-like { color: var(--heading); }
[data-theme="dark"] .header .header-row .header-right .main-menu li.menu-item.dropdown .dropdown-menu .link-like:hover { color: var(--link); background: var(--surface-2); }
[data-theme="dark"] .js-menu .header .header-row .header-right .main-menu li.mega-menu.is-open .mega-menu-wrapper .mega-menu-col h5 { color: var(--heading); }
[data-theme="dark"] .js-menu .header .header-row .header-right .main-menu li.mega-menu.is-open .mega-menu-wrapper .mega-menu-col ul li a { color: var(--text-muted); }

/* Misc */
[data-theme="dark"] .review .stars span { color: #2c4a66; }
[data-theme="dark"] .rating-pick label { color: #2c4a66; }
[data-theme="dark"] .empty-state { border-color: #2c4a66; }
[data-theme="dark"] .subcats a:hover { background: rgba(0, 180, 216, 0.14); }
[data-theme="dark"] ::selection { background: rgba(0, 180, 216, 0.35); color: #fff; }
[data-theme="dark"] .contact-map, [data-theme="dark"] .footer-section .map-container { border-color: #1f3a55; }
/* "Customer Stories" label: a navy pill in light mode; lift it so it still reads as a pill */
[data-theme="dark"] .testimonials .section-eyebrow { background: #13355a !important; color: var(--cyan-bright) !important; }
