/* ==========================================================================
   SANA STYLES — ONLINE BOUTIQUE
   Light, calm design system. All themes (chosen in the admin panel) are light;
   each one only changes the accent hue and a faint background tint.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
    /* Surfaces */
    --color-bg: #fbf8f6;
    --color-bg-secondary: #f5efeb;
    --color-surface: #ffffff;
    --color-surface-hover: #ffffff;
    --color-border: #ebe3de;
    --color-border-strong: #d9cdc6;

    /* Accent (dusty rose by default) */
    --accent: #9e5a66;
    --accent-hover: #874a55;
    --accent-soft: #f6e9eb;
    --accent-softer: #fbf3f4;
    --on-accent: #ffffff;

    /* Text */
    --text-primary: #2e2725;
    --text-secondary: #6b605b;
    --text-muted: #857973;

    /* Status */
    --success: #3f7a5a;
    --danger: #b4443c;
    --whatsapp: #1f9d55;
    --whatsapp-hover: #188548;

    /* Legacy aliases (kept so any inline styles that still reference them stay readable) */
    --gold-primary: var(--accent);
    --gold-light: var(--accent);
    --gold-gradient: var(--accent);
    --rose-gradient: var(--accent);
    --text-gold: var(--accent);

    /* Depth */
    --shadow-sm: 0 1px 2px rgba(46, 39, 37, 0.05);
    --shadow-md: 0 6px 20px -8px rgba(46, 39, 37, 0.14);
    --shadow-lg: 0 24px 48px -16px rgba(46, 39, 37, 0.22);

    /* Typography */
    --font-body: 'Cairo', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
    --font-heading: 'Playfair Display', 'Cairo', 'Segoe UI', Georgia, serif;

    /* Layout */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --container: 1240px;
    --transition: 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ══════════════════════════════════════════════════════════════════
   THEMES (selected in the admin panel) — all light and calm
   ══════════════════════════════════════════════════════════════════ */

/* Sage green */
html[data-theme="emerald"] {
    --color-bg: #f7f9f7;
    --color-bg-secondary: #edf2ee;
    --color-border: #e1e8e3;
    --color-border-strong: #cad6cd;
    --accent: #4f7262;
    --accent-hover: #3f5e50;
    --accent-soft: #e7efea;
    --accent-softer: #f2f7f4;
}

/* Soft blue */
html[data-theme="sapphire"] {
    --color-bg: #f6f8fa;
    --color-bg-secondary: #ecf1f5;
    --color-border: #e0e7ee;
    --color-border-strong: #c9d4df;
    --accent: #466784;
    --accent-hover: #38556e;
    --accent-soft: #e6edf4;
    --accent-softer: #f2f6f9;
}

/* Mauve berry */
html[data-theme="ruby"] {
    --color-bg: #fbf7f8;
    --color-bg-secondary: #f4ecef;
    --color-border: #ece1e5;
    --color-border-strong: #dccbd2;
    --accent: #8c4766;
    --accent-hover: #753954;
    --accent-soft: #f4e7ed;
    --accent-softer: #faf3f6;
}

/* Champagne pearl */
html[data-theme="pearl"] {
    --color-bg: #fbfaf6;
    --color-bg-secondary: #f4f1e9;
    --color-border: #ebe6da;
    --color-border-strong: #dad2c0;
    --accent: #87672f;
    --accent-hover: #6f5425;
    --accent-soft: #f3ecdd;
    --accent-softer: #f9f6ee;
}

/* Warm peach */
html[data-theme="blush"] {
    --color-bg: #fdf8f6;
    --color-bg-secondary: #f8eeea;
    --color-border: #f0e2dd;
    --color-border-strong: #e3cdc6;
    --accent: #a85a4e;
    --accent-hover: #8f4a40;
    --accent-soft: #f8e8e4;
    --accent-softer: #fcf4f2;
}

/* Lavender */
html[data-theme="lavender"] {
    --color-bg: #f8f7fb;
    --color-bg-secondary: #efedf6;
    --color-border: #e5e2ee;
    --color-border-strong: #d1cce2;
    --accent: #6b5b98;
    --accent-hover: #584a80;
    --accent-soft: #ece9f5;
    --accent-softer: #f5f3fa;
}

/* ══════════════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

a {
    color: inherit;
}

/* ══════════════════════════════════════════════════════════════════
   ANNOUNCEMENT BAR
   ══════════════════════════════════════════════════════════════════ */

.announcement-bar {
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
    padding: 0.45rem 1rem;
    letter-spacing: 0.2px;
}

/* ══════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.85rem 1.5rem;
}

/* The bar keeps its arrangement in both languages (logo on the right, buttons on the left), so
   the language button stays under the finger after switching */
html[dir="ltr"] .nav-container { direction: rtl; }
html[dir="ltr"] .nav-container .brand-text { direction: ltr; text-align: right; }
html[dir="ltr"] .nav-container .nav-links { direction: ltr; }

.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

img.brand-crest { object-fit: cover; padding: 0; background: none; }

.brand-crest {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    background: var(--accent-softer);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.brand-text {
    min-width: 0;
}

.brand-text h1,
.brand-text h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    white-space: nowrap;
}

.brand-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 0;
    position: relative;
    transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.action-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-softer);
}

.lang-btn {
    width: auto;
    padding: 0 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.currency-badge-btn {
    width: auto;
    height: 42px;
    border-radius: var(--radius-full);
    padding: 0 14px;
    flex-direction: column;
    gap: 2px;
    line-height: 1;
}

.currency-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.currency-rate-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1;
    direction: ltr;
}
.currency-rate-sub[hidden] { display: none; }

.cart-badge {
    position: absolute;
    top: -5px;
    inset-inline-end: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ══════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════ */

.btn-primary-luxury {
    background: var(--accent);
    color: var(--on-accent);
    border: 1px solid var(--accent);
    padding: 0.85rem 2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-primary-luxury:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: var(--shadow-md);
}

.btn-luxury-outline {
    background: transparent;
    border: 1px solid var(--color-border-strong);
    color: var(--text-primary);
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.btn-luxury-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-softer);
}

/* ══════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════ */

.hero-section {
    position: relative;
    padding: 4.5rem 1.5rem 4rem;
    text-align: center;
    background:
        radial-gradient(ellipse 60% 80% at 50% 0%, var(--accent-soft) 0%, transparent 70%),
        var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.hero-overlay {
    display: none;
}

.hero-container {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 5px 16px;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-full);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.5vw, 3.1rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.08rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.trust-row {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    margin-top: 2.25rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.trust-row li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.trust-row svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   COLLECTION HEADER, FILTERS & SEARCH
   ══════════════════════════════════════════════════════════════════ */

.section-head {
    max-width: var(--container);
    margin: 3.25rem auto 1.25rem;
    padding: 0 1.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.filter-section {
    max-width: var(--container);
    margin: 0 auto 1.75rem;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    scroll-margin-top: 90px;
}

.category-pills {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scrollbar-width: none;
    max-width: 100%;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.pill-btn {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--text-secondary);
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.pill-btn:hover {
    border-color: var(--color-border-strong);
    color: var(--text-primary);
}

.pill-btn.active {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: #fff;
    font-weight: 600;
}

.search-box {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.search-input {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--text-primary);
    padding: 0.65rem 1rem;
    padding-inline-start: 2.6rem;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    inset-inline-start: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════
   PRODUCT GRID & CARDS
   ══════════════════════════════════════════════════════════════════ */

.products-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem 4.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
}

.product-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-md);
}

.product-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--accent-softer);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.04);
}

.product-no-image-placeholder,
.media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(160deg, var(--accent-softer) 0%, var(--accent-soft) 100%);
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-align: center;
}

.product-no-image-placeholder svg,
.media-placeholder svg {
    opacity: 0.55;
}

.product-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    z-index: 2;
    background: var(--color-surface);
    color: var(--accent);
    border: 1px solid var(--color-border);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.product-details {
    padding: 1rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-cat {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}

.product-title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
    cursor: pointer;
}

.product-title:hover {
    color: var(--accent);
}

.product-meta-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.9rem;
}

.spec-tag {
    background: var(--color-bg-secondary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 2px 9px;
    border-radius: var(--radius-full);
}

.product-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: auto;
    margin-bottom: 1rem;
}

.price-current {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price-compare {
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.btn-add-cart {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    padding: 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-add-cart:hover:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-secondary);
    background: var(--color-surface);
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius-md);
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

/* ══════════════════════════════════════════════════════════════════
   CART DRAWER
   ══════════════════════════════════════════════════════════════════ */

.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(46, 39, 37, 0.35);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--color-surface);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

[dir="rtl"] .cart-drawer {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}

.cart-drawer-overlay.active .cart-drawer {
    transform: translateX(0);
}

.cart-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-title svg {
    color: var(--accent);
}

.btn-close-drawer,
.btn-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--text-secondary);
    font-size: 1.35rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition), border-color var(--transition);
}

.btn-close-drawer:hover,
.btn-modal-close:hover {
    color: var(--text-primary);
    border-color: var(--color-border-strong);
}

.cart-items-wrap {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.cart-empty svg {
    margin: 0 auto 1rem;
    color: var(--color-border-strong);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.cart-item-img {
    width: 72px;
    height: 88px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--accent-softer);
}

.cart-item-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.7rem;
    text-align: center;
    border: 1px solid var(--color-border);
}

.cart-item-info {
    flex-grow: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 2px;
}

.cart-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-qty-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--text-primary);
    font-weight: 600;
    transition: border-color var(--transition), color var(--transition);
}

.qty-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.qty-val {
    min-width: 22px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-remove-item {
    margin-inline-start: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}

.btn-remove-item:hover {
    color: var(--danger);
}

.cart-footer {
    padding: 1.25rem 1.5rem 1.5rem;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.cart-calc-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 10px 0 1.1rem;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-checkout-direct {
    width: 100%;
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    padding: 0.85rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    transition: background var(--transition);
}

.btn-checkout-direct:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-whatsapp-order {
    width: 100%;
    background: var(--whatsapp);
    color: #fff;
    border: none;
    padding: 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--transition);
}

.btn-whatsapp-order:hover:not(:disabled) {
    background: var(--whatsapp-hover);
}

/* ══════════════════════════════════════════════════════════════════
   MODALS (product details & checkout)
   ══════════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(46, 39, 37, 0.4);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.checkout-modal-content {
    max-width: 520px;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-inline-end: 2.5rem;
}

.btn-modal-close {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    z-index: 2;
}

.product-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.product-modal-media {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--accent-softer);
}

.product-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-modal-cat {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}

.product-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    padding-inline-end: 2.5rem;
}

.product-modal-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.product-modal-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.product-modal-info {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.84rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-section-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.modal-section-value {
    color: var(--text-primary);
    font-weight: 700;
}

.modal-size-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.size-pill-btn {
    min-width: 46px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.size-pill-btn:hover {
    border-color: var(--text-primary);
}

.size-pill-btn.active {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: #fff;
}

.modal-qty-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--color-surface);
}

.qty-stepper-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}

.qty-stepper-btn:hover {
    background: var(--accent-softer);
    color: var(--accent);
}

.qty-stepper-input {
    width: 46px;
    height: 40px;
    background: transparent;
    border: none;
    text-align: center;
    font-weight: 700;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-stepper-input::-webkit-outer-spin-button,
.qty-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.checkout-summary {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.checkout-summary-count {
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.checkout-summary-total {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea.form-input {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
}

.form-actions .btn-primary-luxury {
    flex: 1;
}

/* ══════════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.toast {
    background: var(--text-primary);
    color: #fff;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(16px); }
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════ */

.luxury-footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 3.5rem 1.5rem 1.5rem;
    color: var(--text-secondary);
}

.footer-content {
    max-width: var(--container);
    margin: 0 auto 2.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
}

.footer-col h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.9rem;
}

.footer-col p,
.footer-col li {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-about {
    margin-top: 1rem;
    max-width: 420px;
}

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border-strong);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .nav-links { display: none; }
    .footer-content { grid-template-columns: 1fr 1fr; }
    .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .navbar { padding: 0.7rem 1rem; }
    .brand-text p { display: none; }
    .brand-text h1 { font-size: 1rem; }
    .brand-crest { width: 36px; height: 36px; font-size: 0.85rem; }
    .action-btn { width: 38px; height: 38px; }
    .lang-btn, .currency-badge-btn { width: auto; height: 38px; padding: 0 10px; }
    .currency-rate-sub { display: none; }
    .nav-actions { gap: 0.4rem; }

    .hero-section { padding: 3rem 1rem 2.75rem; }
    .trust-row { gap: 0.5rem 1.25rem; font-size: 0.82rem; }

    .section-head, .filter-section, .products-container { padding-inline: 1rem; }
    .search-box { width: 100%; }
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
    .product-details { padding: 0.75rem; }
    .product-title { font-size: 0.9rem; }
    .price-current { font-size: 1rem; }
    .btn-add-cart { font-size: 0.82rem; padding: 0.55rem; }

    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-content { max-height: 94vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 1.5rem 1.1rem; }
    .product-modal-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .product-modal-media { aspect-ratio: 1 / 1; }

    .footer-content { grid-template-columns: 1fr; gap: 1.75rem; }
    .footer-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Sizes that are out of stock stay visible but can't be chosen */
.size-pill-btn:disabled {
    opacity: 0.4;
    text-decoration: line-through;
    cursor: not-allowed;
}

.size-pill-btn:disabled:hover {
    border-color: var(--color-border-strong);
}

/* ── Product window: several sizes / colours, each with a quantity ── */
.variant-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1rem; max-height: 300px; overflow-y: auto; padding-inline-end: 4px; }
.variant-group { display: flex; flex-direction: column; gap: 6px; }
.variant-color { font-weight: 700; font-size: 0.85rem; color: var(--accent); }
.variant-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 12px;
    background: var(--color-bg); transition: border-color 0.2s, background 0.2s;
}
.variant-row.is-chosen { border-color: var(--accent); background: var(--accent-softer); }
.variant-row.is-out { opacity: 0.5; }
.variant-name { display: flex; flex-direction: column; }
.variant-name span { font-weight: 600; }
.variant-name small { font-size: 0.75rem; color: var(--text-muted, #888); }
.qty-stepper.small .qty-stepper-btn { width: 32px; height: 32px; }
.qty-stepper.small .qty-stepper-input { width: 40px; }
.variant-summary { font-size: 0.9rem; margin: 0.25rem 0 0.75rem; color: var(--text-muted, #666); min-height: 1.2em; }

/* ── Product card size (1 = smallest … 5 = largest, 3 = the usual) ── */
.filter-tools { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.card-size-control {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius-full); padding: 4px 8px;
}
.card-size-btn {
    width: 30px; height: 30px; border: none; background: transparent; border-radius: 50%;
    color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    transition: background var(--transition), color var(--transition);
}
.card-size-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.card-size-btn:disabled { opacity: 0.35; cursor: default; }
#card-size-range { width: 96px; accent-color: var(--accent); cursor: pointer; }

.products-grid { grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 230px), 1fr)); gap: var(--card-gap, 1.5rem); }
.products-grid[data-size="1"] { --card-min: 150px; --card-gap: 0.8rem; }
.products-grid[data-size="2"] { --card-min: 185px; --card-gap: 1.1rem; }
.products-grid[data-size="3"] { --card-min: 230px; --card-gap: 1.5rem; }
.products-grid[data-size="4"] { --card-min: 290px; --card-gap: 1.6rem; }
.products-grid[data-size="5"] { --card-min: 360px; --card-gap: 1.8rem; }
.products-grid[data-size="1"] .product-details { padding: 0.6rem 0.7rem 0.75rem; }
.products-grid[data-size="1"] .product-title { font-size: 0.82rem; }
.products-grid[data-size="1"] .product-cat { font-size: 0.66rem; }
.products-grid[data-size="1"] .price-current { font-size: 0.95rem; }
.products-grid[data-size="1"] .spec-tag { font-size: 0.68rem; padding: 1px 7px; }
.products-grid[data-size="1"] .btn-add-cart { font-size: 0.76rem; padding: 0.45rem; gap: 5px; }
.products-grid[data-size="1"] .product-badge { font-size: 0.66rem; top: 8px; inset-inline-start: 8px; padding: 2px 8px; }
.products-grid[data-size="2"] .product-details { padding: 0.8rem 0.9rem 0.95rem; }
.products-grid[data-size="2"] .product-title { font-size: 0.92rem; }
.products-grid[data-size="2"] .btn-add-cart { font-size: 0.84rem; padding: 0.55rem; }
.products-grid[data-size="4"] .product-title { font-size: 1.08rem; }
.products-grid[data-size="4"] .price-current { font-size: 1.25rem; }
.products-grid[data-size="5"] .product-details { padding: 1.2rem 1.3rem 1.35rem; }
.products-grid[data-size="5"] .product-title { font-size: 1.15rem; }
.products-grid[data-size="5"] .price-current { font-size: 1.35rem; }
.products-grid[data-size="5"] .btn-add-cart { font-size: 0.98rem; padding: 0.75rem; }

@media (max-width: 600px) {
    .filter-tools { width: 100%; }
    .filter-tools .search-box { flex: 1; width: auto; min-width: 0; }
    #card-size-range { width: 64px; }
    .products-grid[data-size="1"], .products-grid[data-size="2"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
    .products-grid[data-size="3"], .products-grid[data-size="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .products-grid[data-size="5"] { grid-template-columns: minmax(0, 1fr); }
    .products-grid[data-size="1"] .product-meta-specs, .products-grid[data-size="2"] .product-meta-specs { display: none; }
    .products-grid[data-size="1"] .btn-add-cart svg, .products-grid[data-size="2"] .btn-add-cart svg { display: none; }
    .products-grid[data-size="1"] .product-details, .products-grid[data-size="2"] .product-details { padding: 0.5rem 0.55rem 0.6rem; }
    .products-grid[data-size="1"] .product-title, .products-grid[data-size="2"] .product-title { font-size: 0.8rem; }
    .products-grid[data-size="1"] .price-current, .products-grid[data-size="2"] .price-current { font-size: 0.9rem; }
    .products-grid[data-size="1"] .product-price-row, .products-grid[data-size="2"] .product-price-row { margin-bottom: 0.6rem; }
    .products-grid[data-size="1"] .btn-add-cart, .products-grid[data-size="2"] .btn-add-cart { font-size: 0.7rem; padding: 0.4rem 0.3rem; white-space: nowrap; }
}

/* ── Product colours ── */
.shop-color-dot {
    display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; font-style: normal;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18), 0 0 0 2px var(--color-surface);
}
.shop-color-dot.unknown { background: conic-gradient(#f48fb1, #fdd835, #43a047, #1e88e5, #8e24aa, #f48fb1); opacity: 0.6; }
.product-colors { display: flex; align-items: center; gap: 8px; margin: -0.35rem 0 0.8rem; min-width: 0; }
.product-color-dots { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.product-color-dots small { font-size: 0.7rem; color: var(--text-muted); margin-inline-start: 2px; }
.product-color-names { font-size: 0.76rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.products-grid[data-size="1"] .shop-color-dot { width: 11px; height: 11px; }
.products-grid[data-size="1"] .product-color-names { display: none; }
.modal-colors { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 1rem; }
.modal-colors-label { font-weight: 600; font-size: 0.88rem; color: var(--text-primary); }
.modal-color-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-color-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; font-size: 0.82rem;
    border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface);
}
.variant-color { display: flex; align-items: center; gap: 6px; }
@media (max-width: 600px) {
    .products-grid[data-size="1"] .product-color-names, .products-grid[data-size="2"] .product-color-names { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   PHONES — comfortable touch use
   ══════════════════════════════════════════════════════════════════ */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, input, select, textarea, label, .product-card {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;   /* no double-tap zoom delay */
}
/* An open window locks the page behind it */
body.overlay-open { overflow: hidden; }

/* Hover effects only where there is a mouse (on touch they "stick" after a tap) */
@media (hover: none) {
    .product-card:hover { transform: none; box-shadow: none; border-color: var(--color-border); }
    .product-card:hover .product-image { transform: none; }
    .product-card:active { transform: scale(0.985); }
}

.mobile-cart-bar { display: none; }

@media (max-width: 640px) {
    /* 16px text in fields: iPhone no longer zooms the page when one is tapped */
    .search-input, .form-input, textarea.form-input, select { font-size: 16px; }

    /* A short welcome, so the products are on the first screen */
    .announcement-bar { font-size: 0.78rem; padding-block: 0.4rem; }
    .hero-section { padding: 1.4rem 1rem 1.25rem; }
    .hero-badge { margin-bottom: 0.6rem; padding: 3px 12px; font-size: 0.74rem; }
    .hero-title { font-size: 1.5rem; margin-bottom: 0.4rem; }
    .hero-subtitle {
        font-size: 0.9rem; margin-bottom: 0.9rem;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .hero-cta .btn-primary-luxury { padding: 0.6rem 1.4rem; font-size: 0.92rem; }
    .trust-row { margin-top: 0.9rem; gap: 0.3rem 1rem; font-size: 0.76rem; }
    .section-head { margin: 1.25rem auto 0.75rem; }
    .section-title { font-size: 1.35rem; }
    .section-subtitle { font-size: 0.85rem; }
    .filter-section { margin-bottom: 1rem; gap: 0.6rem; }

    /* Finger-sized buttons (44 px) */
    .action-btn { width: 44px; height: 44px; }
    .lang-btn, .currency-badge-btn { height: 44px; }
    .btn-close-drawer, .btn-modal-close { width: 44px; height: 44px; font-size: 1.6rem; }
    .card-size-btn { width: 38px; height: 38px; }
    .qty-stepper-btn { width: 44px; height: 44px; }
    .qty-stepper-input { height: 44px; }
    .pill-btn { padding: 0.6rem 1.15rem; }

    /* Product window as a sheet from the bottom: handle, close button and
       "add to bag" always in reach while scrolling the sizes */
    .modal-content {
        max-height: 92vh; max-height: 92dvh;
        padding-bottom: calc(1.1rem + env(safe-area-inset-bottom));
        overscroll-behavior: contain;
    }
    .modal-content::before {
        content: ''; display: block; width: 42px; height: 4px; border-radius: 2px;
        background: var(--color-border-strong); margin: -0.6rem auto 0.6rem;
    }
    .btn-modal-close {
        position: sticky; top: 0; inset: auto;
        margin: 0 0 -44px auto; box-shadow: var(--shadow-sm);
    }
    [dir="rtl"] .btn-modal-close { margin: 0 auto -44px 0; }
    #btn-modal-add-cart {
        position: sticky; bottom: 0; z-index: 3;
        box-shadow: 0 -10px 18px var(--color-surface);
    }
    .checkout-form .form-actions {
        position: sticky; bottom: 0; background: var(--color-surface);
        padding-top: 0.6rem; box-shadow: 0 -10px 18px var(--color-surface);
    }

    /* The bag */
    .cart-header { padding: 1rem 1.1rem; }
    .cart-footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }

    /* Bottom bag bar */
    .mobile-cart-bar:not([hidden]) {
        display: flex; align-items: center; gap: 0.8rem;
        position: fixed; inset-inline: 0.75rem; bottom: calc(0.75rem + env(safe-area-inset-bottom)); z-index: 900;
        padding: 0.8rem 1.1rem; border: none; border-radius: var(--radius-full);
        background: var(--text-primary); color: #fff; font: inherit; font-weight: 600;
        box-shadow: var(--shadow-lg); animation: toastIn 0.25s ease;
    }
    .mcb-icon { position: relative; display: inline-flex; }
    .mcb-icon b {
        position: absolute; top: -7px; inset-inline-end: -9px; min-width: 18px; height: 18px; padding: 0 4px;
        border-radius: 9px; background: var(--accent); color: var(--on-accent, #fff);
        font-size: 0.68rem; display: flex; align-items: center; justify-content: center;
    }
    .mcb-text { flex: 1; text-align: start; font-size: 0.9rem; }
    .mcb-total { font-weight: 700; white-space: nowrap; }
    body.overlay-open .mobile-cart-bar { display: none; }
    body.has-cart-bar { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
    body.has-cart-bar .toast-container { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

/* Product window: size and colour dropdowns, then the quantity */
.variant-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0.5rem 0 1rem; }
.variant-picker { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--color-text, #333); }
.variant-picker[hidden] { display: none; }
#modal-qty-picker { grid-column: 1 / -1; }
#modal-qty-picker .qty-stepper { align-self: flex-start; }
.variant-select {
    width: 100%; min-height: 44px; padding: 0 12px; font: inherit; font-weight: 500; font-size: 0.95rem;
    border: 1px solid var(--color-border-strong); border-radius: 12px; background: var(--color-surface); color: inherit; cursor: pointer;
}
.variant-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-softer, rgba(0,0,0,0.06)); }
.variant-select:disabled { opacity: 0.55; cursor: not-allowed; }
.variant-select option:disabled { color: #aaa; }
.variant-stock { color: var(--color-text-muted, #777); font-weight: 400; }
@media (max-width: 640px) {
    .variant-pickers { grid-template-columns: 1fr; }
    .variant-select { min-height: 48px; font-size: 16px; } /* 16px: no zoom on iPhone */
}

/* Product window: several sizes and colours at once — size buttons, a ticked row per colour
   with its quantity, then the list of everything picked */
.multi-pick { margin: 0.5rem 0 1rem; }
.multi-pick[hidden] { display: none; }
.multi-pick-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-primary); }
.size-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.size-chips[hidden] { display: none; }
.size-chip {
    position: relative; min-width: 48px; min-height: 40px; padding: 0 14px; font: inherit; font-weight: 600; font-size: 0.9rem;
    border: 1px solid var(--color-border-strong); border-radius: 12px; background: var(--color-surface); color: inherit; cursor: pointer;
}
.size-chip.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.size-chip:disabled { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
.size-chip small { font-weight: 400; }
.size-chip-badge {
    position: absolute; top: -7px; inset-inline-end: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
    background: var(--color-text, #222); color: #fff; font-size: 0.72rem; line-height: 20px; text-align: center;
}
.pick-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary, #555); margin: 2px 0 6px; }
.pick-label[hidden] { display: none; }
/* The colours side by side (wrapping): each a card, its quantity inside once ticked */
.pick-rows { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-row {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 10px; flex: 0 0 auto; max-width: 100%;
    border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface);
}
.pick-row.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-softer, rgba(0,0,0,0.06)); }
.pick-row.sold-out { opacity: 0.5; }
.pick-check { display: flex; align-items: center; gap: 6px; min-width: 0; cursor: pointer; font-size: 0.9rem; margin: 0; }
.pick-check input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.pick-row.sold-out .pick-check { cursor: not-allowed; }
.pick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row .qty-stepper[hidden] { display: none; }
.pick-row .qty-stepper.small .qty-stepper-btn { width: 32px; height: 32px; }
.pick-row .qty-stepper.small .qty-stepper-input { width: 30px; }
.pick-chosen { margin-top: 12px; padding: 8px 12px; border-radius: 12px; background: var(--accent-softer, rgba(0,0,0,0.04)); }
.pick-chosen[hidden] { display: none; }
.pick-chosen-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; }
.pick-chosen-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-chosen-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.88rem; }
.pick-remove { width: 32px; height: 32px; border: none; background: none; color: inherit; font-size: 1.2rem; cursor: pointer; border-radius: 50%; }
.pick-remove:hover { background: rgba(0,0,0,0.06); }
@media (max-width: 640px) {
    .size-chip { min-height: 44px; }
}

/* Offers (js/utils/offer.js): the usual price crossed out in red, the offer price, the % off */
.price-compare.offer-was { color: #d32f2f; text-decoration: line-through; text-decoration-color: #d32f2f; text-decoration-thickness: 2px; font-weight: 500; }
.price-current.offer-now { color: #c62828; }
.offer-pct {
    display: inline-block; background: #d32f2f; color: #fff; font-size: 0.72rem; font-weight: 700;
    padding: 2px 8px; border-radius: var(--radius-full, 999px); line-height: 1.4;
}
.offer-badge {
    position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2;
    background: #d32f2f; color: #fff; font-size: 0.8rem; font-weight: 800;
    padding: 4px 10px; border-radius: var(--radius-full, 999px); box-shadow: var(--shadow-sm);
}
.products-grid[data-size="1"] .offer-badge { font-size: 0.66rem; top: 8px; inset-inline-end: 8px; padding: 2px 7px; }
.product-modal-price { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.product-modal-price .price-compare { font-size: 1rem; }
.product-modal-price .price-current { font-size: inherit; }

/* Background slideshow (Storefront.updateBackgroundSlides): product photos behind the page,
   faint and soft, crossfading with a slow zoom. The page colour moves to <html> so the
   photos (z-index -1) show through; cards and bars keep their own backgrounds. */
html.has-bg-slides { background: var(--color-bg); }
body.has-bg-slides { background: transparent; }
body.has-bg-slides .hero-section {
    background: radial-gradient(ellipse 60% 80% at 50% 0%, var(--accent-soft) 0%, transparent 70%);
}
.bg-slides { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-slides::after {
    /* keeps the middle of the page calm and readable */
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 45%, var(--color-bg) 0%, transparent 100%);
    opacity: 0.4;
}
.bg-slide {
    position: absolute; inset: -6%;
    background-size: cover; background-position: center;
    opacity: 0; transform: scale(1);
    filter: blur(2px) saturate(0.9);
    transition: opacity 2.5s ease, transform 10s linear;
    will-change: opacity, transform;
}
.bg-slide.is-on { opacity: var(--bg-slide-opacity, 0.26); transform: scale(1.08); }
@media (max-width: 640px) {
    .bg-slide.is-on { opacity: var(--bg-slide-opacity, 0.22); }
}
@media (prefers-reduced-motion: reduce) {
    .bg-slide { transition: none; transform: none; }
    .bg-slide.is-on { transform: none; }
}
