/* PambaKali - shared styles for every public page */

/* ============================================ */
/* DESIGN TOKENS */
/* ============================================ */
:root {
    --brand: #6b46c1;
    --brand-dark: #553399;
    --brand-light: #f3eefc;
    --brand-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent: #ff6b6b;
    --success: #1f9d55;
    --danger: #e5484d;

    --ink: #17141f;
    --ink-soft: #4b4658;
    --muted: #8b8698;
    --line: #ebe8f0;
    --bg: #faf9fc;
    --surface: #ffffff;
    --surface-alt: #f4f2f8;
    --footer-bg: #14111c;
    --header-bg: rgba(255, 255, 255, 0.85);

    /* Always dark: announce bar, hero, banners, and text on white chips over photos */
    --dark: #17141f;
    /* Solid buttons that invert with the theme (cart circle, Add to cart) */
    --contrast-bg: #17141f;
    --contrast-fg: #ffffff;
    /* Hairline that keeps dark blocks distinct on the dark page */
    --dark-border: transparent;

    /* Logo colours (from the PambaKali logo) */
    --logo-ink: #1a1a2e;
    --logo-accent: #7c5cf6;
    --mark-hanger: #1a1a2e;
    --mark-left: #7c5cf6;
    --mark-dress: #e9a8f5;
    --mark-right: #4f46e5;

    --men: #2f6fd6;
    --women: #d6458b;
    --kids: #e08a0b;
    --school: #1f9d55;

    --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(23, 20, 31, 0.04), 0 2px 8px rgba(23, 20, 31, 0.04);
    --shadow-md: 0 4px 12px rgba(23, 20, 31, 0.06), 0 12px 32px rgba(23, 20, 31, 0.08);
    --shadow-lg: 0 24px 64px rgba(23, 20, 31, 0.18);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --container: 1320px;
    --gutter: clamp(16px, 4vw, 40px);
    color-scheme: light;
}

/* Dark theme: chosen with the theme button (data-theme), or following the system when none is chosen */
:root[data-theme="dark"] {
    --brand: #9b80f5;
    --brand-light: rgba(155, 128, 245, 0.14);
    --ink: #f2eff8;
    --ink-soft: #c5bfd3;
    --muted: #8f89a0;
    --line: #2c2639;
    --bg: #0f0d15;
    --surface: #17141f;
    --surface-alt: #211c2c;
    --footer-bg: #09080d;
    --header-bg: rgba(15, 13, 21, 0.82);
    --dark: #09080d;
    --contrast-bg: #f2eff8;
    --contrast-fg: #17141f;
    --dark-border: rgba(255, 255, 255, 0.08);
    --logo-ink: #ffffff;
    --logo-accent: #e9a8f5;
    --mark-hanger: #ffffff;
    --mark-right: #a5b4fc;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --brand: #9b80f5;
        --brand-light: rgba(155, 128, 245, 0.14);
        --ink: #f2eff8;
        --ink-soft: #c5bfd3;
        --muted: #8f89a0;
        --line: #2c2639;
        --bg: #0f0d15;
        --surface: #17141f;
        --surface-alt: #211c2c;
        --footer-bg: #09080d;
        --header-bg: rgba(15, 13, 21, 0.82);
        --dark: #09080d;
        --contrast-bg: #f2eff8;
        --contrast-fg: #17141f;
        --dark-border: rgba(255, 255, 255, 0.08);
        --logo-ink: #ffffff;
        --logo-accent: #e9a8f5;
        --mark-hanger: #ffffff;
        --mark-right: #a5b4fc;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35);
        --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
        color-scheme: dark;
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Kiswahili words are longer than English ones: a long word wraps instead of pushing the layout wider */
html[lang="sw"] :is(h1, h2, h3, h4, .eyebrow, .btn, label) {
    overflow-wrap: break-word;
}

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

a {
    color: inherit;
}

button, input {
    font-family: inherit;
}

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ============================================ */
/* BUTTONS */
/* ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}

.btn-primary {
    background: var(--brand-gradient);
    color: white;
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(107, 70, 193, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline:hover {
    background: var(--brand);
    color: white;
}

.btn-light {
    background: white;
    color: var(--dark);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.btn-ghost-light {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-color: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
}

.btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.22);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #198347;
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
}

/* ============================================ */
/* ANNOUNCEMENT BAR */
/* ============================================ */
.announce {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
}

.announce .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 38px;
}

.announce-msg {
    display: flex;
    align-items: center;
    gap: 8px;
}

.announce-msg i {
    color: #b9a3f0;
}

.announce-links {
    display: flex;
    gap: 1.5rem;
}

.announce a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.announce a:hover {
    color: white;
}

.announce a i {
    margin-right: 6px;
    opacity: 0.7;
}

/* ============================================ */
/* HEADER / NAVBAR */
/* ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 4px 24px rgba(23, 20, 31, 0.06);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 72px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: var(--surface-alt);
    color: var(--ink);
    font-size: 1.1rem;
    cursor: pointer;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

/* Logo: the hanger mark (SVG, coloured by the --mark-* tokens) and the "PambaKali" wordmark */
.logo-mark {
    display: flex;
    width: 46px;
    flex-shrink: 0;
}

.pk-mark {
    display: block;
    width: 100%;
    height: auto;
}

.pk-mark .hanger-hook { stroke: var(--mark-hanger); }
.pk-mark .hanger-bar { fill: var(--mark-hanger); }
.pk-mark .tee-left { fill: var(--mark-left); }
.pk-mark .tee-right { fill: var(--mark-right); }
.pk-mark .dress { fill: var(--mark-dress); }

.logo-text {
    font-family: 'DM Serif Display', var(--font-display);
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--logo-ink);
}

.logo-text em {
    font-style: normal;
    color: var(--logo-accent);
}

/* Dark backgrounds (footer, sign-in panel): the light-on-dark version of the logo */
.logo-on-dark {
    --logo-ink: #ffffff;
    --logo-accent: #e9a8f5;
    --mark-hanger: #ffffff;
    --mark-left: #7c5cf6;
    --mark-dress: #e9a8f5;
    --mark-right: #a5b4fc;
}

/* Purple app-icon tile (sign-in window) */
.app-icon {
    --mark-hanger: #ffffff;
    --mark-left: #ffffff;
    --mark-dress: #e9a8f5;
    --mark-right: #1a1a2e;
}

.nav-search {
    flex: 1;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

.nav-search input {
    width: 100%;
    height: 46px;
    padding: 0 3.25rem 0 2.9rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--surface-alt);
    font-size: 0.92rem;
    color: var(--ink);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

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

.nav-search input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(107, 70, 193, 0.12);
}

.nav-search .search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.nav-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.nav-link i {
    font-size: 1.05rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand);
    background: var(--brand-light);
}

/* Cart button: outlined pill with the bag in a dark circle */
.nav-link.nav-cart {
    gap: 14px;
    height: 44px;
    margin-left: 0.35rem;
    padding: 4px 16px 4px 4px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.nav-link.nav-cart:hover {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--brand);
    box-shadow: 0 6px 18px rgba(107, 70, 193, 0.15);
}

.nav-icon {
    position: relative;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--contrast-bg);
    color: var(--contrast-fg);
    display: grid;
    place-items: center;
    transition: background 0.25s;
}

.nav-link.nav-cart .nav-icon i {
    font-size: 0.9rem;
}

.nav-cart:hover .nav-icon {
    background: var(--brand-gradient);
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    border: 2px solid var(--surface);
    transform: scale(0);
    transition: transform 0.3s var(--ease);
}

.nav-cart.has-items .cart-badge {
    transform: scale(1);
}

.nav-cart.has-items .cart-badge.bump {
    animation: bump 0.45s var(--ease);
}

@keyframes bump {
    40% { transform: scale(1.35); }
}

.btn-join {
    margin-left: 0.5rem;
}

/* ============================================ */
/* OVERLAYS & SIDEBARS */
/* ============================================ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(23, 20, 31, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--surface);
    z-index: 2001;
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
}

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

.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.panel-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--surface-alt);
    color: var(--ink);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.panel-close:hover {
    background: var(--line);
    transform: rotate(90deg);
}

.sidebar-menu {
    padding: 1rem;
    flex: 1;
}

.sidebar-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.75rem 0.85rem 0.4rem;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.sidebar-menu-item:hover,
.sidebar-menu-item.active {
    background: var(--brand-light);
    color: var(--brand);
}

.sidebar-menu-item i {
    width: 20px;
    text-align: center;
    color: var(--brand);
}

.sidebar-menu-item .count {
    margin-left: auto;
    min-width: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

.sidebar-user {
    display: grid;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem 1.5rem;
    border-top: 1px solid var(--line);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: 100%;
    background: var(--surface);
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
}

.cart-sidebar .panel-header h3 span {
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 0.8rem;
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

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

.cart-empty .empty-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 2rem;
}

.cart-empty h4 {
    color: var(--ink);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.cart-item {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    animation: slideInItem 0.35s var(--ease);
}

@keyframes slideInItem {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

.cart-item-image {
    width: 76px;
    height: 92px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface-alt);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
    padding-right: 1.5rem;
}

.cart-item-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-details .item-shop {
    font-size: 0.75rem;
    color: var(--muted);
}

.cart-item-details .item-price {
    margin-top: 0.2rem;
    font-weight: 700;
    color: var(--brand);
}

.cart-item-quantity {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.4rem;
    padding: 3px;
    border-radius: 999px;
    background: var(--surface-alt);
}

.cart-item-quantity button {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s, color 0.2s;
}

.cart-item-quantity button:hover {
    background: var(--brand);
    color: white;
}

.cart-item-quantity span {
    min-width: 24px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.cart-item-remove {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cart-item-remove:hover {
    background: #fdeced;
    color: var(--danger);
}

.cart-footer {
    padding: 1.25rem 1.5rem 1.5rem;
    border-top: 1px solid var(--line);
    flex-shrink: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.cart-total .total-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ink);
}

.cart-actions {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
}

/* ============================================ */
/* AUTH MODAL */
/* ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(23, 20, 31, 0.6);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.modal-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 2.25rem 2rem 2rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    transform: translateY(24px) scale(0.98);
    transition: transform 0.4s var(--ease);
}

.modal-overlay.active .modal-container {
    transform: none;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.modal-header .logo-mark {
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    width: 56px;
    height: 56px;
    padding: 10px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7b5cf5, #4f46e5);
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.modal-header p {
    color: var(--muted);
    font-size: 0.92rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.form-group label i {
    margin-right: 4px;
    color: var(--brand);
}

.form-group input {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--surface-alt);
    font-size: 0.95rem;
    color: var(--ink);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

/* The eye button on password boxes (assets/js/password-eye.js) */
.pw-field {
    position: relative;
    display: block;
}

.pw-field input {
    padding-right: 3rem !important;
}

.pw-field input::-ms-reveal,
.pw-field input::-ms-clear {
    display: none; /* Edge's own eye; ours replaces it */
}

.pw-eye {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 1rem;
    cursor: pointer;
}

.pw-eye:hover,
.pw-eye[aria-pressed="true"] {
    color: var(--brand);
}

.pw-eye:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(107, 70, 193, 0.12);
}

.form-group .error-text {
    display: none;
    margin-top: 0.3rem;
    color: var(--danger);
    font-size: 0.8rem;
}

.form-group .error-text.show {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.required {
    color: var(--danger);
}

.btn-modal {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn-modal-primary {
    background: var(--brand-gradient);
    color: white;
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.3);
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(107, 70, 193, 0.4);
}

.modal-footer-text {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.modal-footer-text a,
.seller-link a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.modal-footer-text a:hover,
.seller-link a:hover {
    text-decoration: underline;
}

.seller-link {
    margin-top: 1.25rem;
    padding: 0.85rem;
    border-radius: 12px;
    background: var(--brand-light);
    text-align: center;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.seller-link i {
    color: var(--brand);
}

.modal-step {
    display: none;
}

.modal-step.active {
    display: block;
    animation: fadeUp 0.35s var(--ease);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.otp-input-group {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.5rem 0 1rem;
}

.otp-input-group input {
    width: 50px;
    height: 58px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--surface-alt);
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    color: var(--ink);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.otp-input-group input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(107, 70, 193, 0.12);
}

.otp-timer {
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
}

.otp-timer span {
    color: var(--brand);
    font-weight: 700;
}

.resend-otp {
    display: block;
    margin: 0.5rem auto 0;
    border: none;
    background: none;
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.resend-otp:hover {
    text-decoration: underline;
}

.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.78rem;
}

.password-requirements .req {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

.password-requirements .req i {
    font-size: 0.65rem;
}

.password-requirements .req.valid {
    color: var(--success);
}

.password-requirements .req.invalid {
    color: var(--muted);
}


/* ============================================ */
/* SECTIONS */
/* ============================================ */
.section {
    padding: clamp(48px, 7vw, 88px) 0 0;
}

.section:last-of-type {
    padding-bottom: clamp(48px, 7vw, 88px);
}

.section-tight {
    padding-top: clamp(20px, 3vw, 28px);
}

.section-snug {
    padding-top: clamp(28px, 4vw, 44px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.4rem;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.section-title em {
    font-style: italic;
    color: var(--brand);
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 0.55rem 1.1rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, gap 0.2s;
}

.section-link:hover {
    border-color: var(--brand);
    color: var(--brand);
    gap: 12px;
}


/* ============================================ */
/* PRODUCT GRID & CARDS */
/* ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
}

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

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

.product-media {
    position: relative;
    aspect-ratio: 4 / 5;
    background: var(--surface-alt);
    overflow: hidden;
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.product-card:hover .product-image-link img {
    transform: scale(1.06);
}

.product-image-link.img-missing {
    display: grid;
    place-items: center;
    color: #cfc8dd;
    font-size: 2.5rem;
}

.product-image-link.img-missing::after {
    content: '\f553';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.product-tags {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    pointer-events: none;
}

.product-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--dark);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.product-badge.men { background: var(--men); }
.product-badge.women { background: var(--women); }
.product-badge.kids { background: var(--kids); }
.product-badge.school { background: var(--school); }
.product-badge.sale { background: white; color: var(--danger); }

.product-wishlist {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--dark);
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease), background 0.2s, color 0.2s;
}

.product-wishlist:hover {
    transform: scale(1.1);
    color: var(--accent);
}

.product-wishlist.active {
    background: var(--accent);
    color: white;
}

.product-wishlist.active i {
    animation: bump 0.45s var(--ease);
}

.product-quick {
    position: absolute;
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s var(--ease), background 0.2s, color 0.2s;
}

.product-card:hover .product-quick,
.product-quick:focus-visible {
    opacity: 1;
    transform: none;
}

.product-quick:hover {
    background: var(--dark);
    color: white;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0.85rem 0.9rem 0.9rem;
}

.product-shop {
    margin-bottom: 0.2rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.product-shop {
    display: block;
    text-decoration: none;
    transition: color 0.2s;
}

a.product-shop:hover {
    color: var(--brand);
}

.product-shop i {
    margin-right: 2px;
    color: var(--brand);
    font-size: 0.65rem;
}

.product-name {
    margin-bottom: 0.3rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-name a {
    text-decoration: none;
    transition: color 0.2s;
}

.product-name a:hover {
    color: var(--brand);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
}

.stars {
    color: #f5a623;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.product-rating .reviews {
    font-size: 0.72rem;
    color: var(--muted);
}

.product-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
}

.product-price {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.product-price strong {
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.product-price s {
    font-size: 0.75rem;
    color: var(--muted);
}

.btn-add-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    height: 36px;
    padding: 0 0.85rem;
    border: none;
    border-radius: 999px;
    background: var(--contrast-bg);
    color: var(--contrast-fg);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s var(--ease);
}

.btn-add-cart:hover {
    background: var(--brand);
    transform: translateY(-1px);
}

.btn-add-cart.added {
    background: var(--success);
}

/* ============================================ */
/* SELLER CTA */
/* ============================================ */
.seller-cta {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 2.5rem;
    padding: clamp(32px, 5vw, 64px);
    border-radius: var(--radius-lg);
    background: var(--dark);
    color: white;
    overflow: hidden;
    isolation: isolate;
}

.seller-cta::before,
.seller-cta::after {
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(60px);
}

.seller-cta::before {
    width: 420px;
    height: 420px;
    right: -80px;
    top: -140px;
    background: rgba(118, 75, 162, 0.7);
}

.seller-cta::after {
    width: 320px;
    height: 320px;
    right: 220px;
    bottom: -200px;
    background: rgba(102, 126, 234, 0.45);
}

.seller-cta .eyebrow {
    color: #c9b6ff;
}

.seller-cta h2 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.6vw, 2.9rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.seller-cta h2 em {
    font-style: italic;
    color: #c9b6ff;
}

.seller-cta p {
    max-width: 480px;
    margin-bottom: 1.75rem;
    color: rgba(255, 255, 255, 0.75);
}

.seller-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.seller-points {
    display: grid;
    gap: 0.75rem;
    list-style: none;
}

.seller-points li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}

.seller-points i {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    color: #c9b6ff;
}

.seller-points strong {
    display: block;
    font-size: 0.95rem;
}

.seller-points span {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}

/* ============================================ */
/* TOAST */
/* ============================================ */
.toast {
    position: fixed;
    top: 88px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    max-width: 360px;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    background: var(--dark);
    color: white;
    box-shadow: var(--shadow-lg);
    transform: translateX(calc(100% + 40px));
    transition: transform 0.45s var(--ease);
}

.toast.show {
    transform: translateX(0);
}

.toast > i {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(31, 157, 85, 0.2);
    color: #4ade80;
    display: grid;
    place-items: center;
    font-size: 1rem;
}

.toast .toast-content h4 {
    font-size: 0.92rem;
    font-weight: 700;
}

.toast .toast-content p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================ */
/* FOOTER */
/* ============================================ */
.footer {
    background: var(--footer-bg);
    color: rgba(255, 255, 255, 0.65);
    padding: 4.5rem 0 1.75rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 2.5rem;
}

.footer-brand .nav-logo {
    margin-bottom: 1rem;
}


.footer-brand p {
    max-width: 300px;
    line-height: 1.7;
    font-size: 0.92rem;
}

.footer h4 {
    margin-bottom: 1.1rem;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.7rem;
}

.footer ul li a {
    color: inherit;
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer ul li a:hover {
    color: white;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    text-decoration: none;
    transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}

.footer-social a:hover {
    background: var(--brand);
    border-color: var(--brand);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.88rem;
}

/* Room on the right for the back-to-top button, so it never covers "Powered by" */
@media (min-width: 768px) {
    .footer-bottom { padding-right: 4.5rem; }
}

.footer-bottom strong {
    color: white;
}

/* Language links under the social icons */
.footer-lang {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

.footer-lang i {
    color: white;
}

.footer-lang a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-lang a:hover,
.footer-lang .lang-current {
    color: white;
}

.footer-lang .lang-current {
    font-weight: 800;
}

.seller-cta,
.toast {
    border: 1px solid var(--dark-border);
}

.footer {
    border-top: 1px solid var(--dark-border);
}

/* ============================================ */
/* PAGE HEADER (inner pages) */
/* ============================================ */
.page-hero {
    padding-top: 1.25rem;
}

.page-hero-inner {
    position: relative;
    padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 56px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
    isolation: isolate;
}

.page-hero-inner::before,
.page-hero-inner::after {
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
}

.page-hero-inner::before {
    width: 340px;
    height: 340px;
    right: -60px;
    top: -160px;
    background: rgba(118, 75, 162, 0.35);
}

.page-hero-inner::after {
    width: 260px;
    height: 260px;
    right: 240px;
    bottom: -180px;
    background: rgba(102, 126, 234, 0.3);
}

.page-hero h1 {
    max-width: 760px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.page-hero h1 em {
    font-style: italic;
    color: var(--brand);
}

.page-hero p {
    max-width: 620px;
    margin-top: 0.85rem;
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.85rem;
    list-style: none;
}

.breadcrumb a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--brand);
}

.breadcrumb li + li::before {
    content: '\f054';
    margin-right: 0.4rem;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.6rem;
    color: var(--muted);
}

.breadcrumb [aria-current] {
    color: var(--ink);
    font-weight: 600;
}

/* ============================================ */
/* CHIPS & EMPTY STATES */
/* ============================================ */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.chip:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.chip.active {
    border-color: transparent;
    background: var(--contrast-bg);
    color: var(--contrast-fg);
}

.empty-state {
    padding: clamp(40px, 8vw, 80px) 1.5rem;
    border: 1.5px dashed var(--line);
    border-radius: var(--radius-lg);
    text-align: center;
}

.empty-state .empty-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 1.9rem;
}

.empty-state h3 {
    margin-bottom: 0.4rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
}

.empty-state p {
    max-width: 420px;
    margin: 0 auto 1.5rem;
    color: var(--ink-soft);
}

/* ============================================ */
/* CONTENT BLOCKS */
/* ============================================ */
.card {
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.card-grid.two {
    grid-template-columns: repeat(2, 1fr);
}

.card-grid.four {
    grid-template-columns: repeat(4, 1fr);
}

.feature-card .feature-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 1.1rem;
    border-radius: 16px;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
}

.feature-card h3 {
    margin-bottom: 0.45rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--ink-soft);
    font-size: 0.93rem;
    line-height: 1.65;
}

.stat-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.stat-band > div {
    padding: 1.5rem;
    text-align: center;
}

.stat-band > div + div {
    border-left: 1px solid var(--line);
}

.stat-band strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--brand);
}

.stat-band span {
    color: var(--ink-soft);
    font-size: 0.88rem;
}

/* Three-number band (wishlist): stays in one row, numbers shrink on phones */
.stat-band.three {
    grid-template-columns: repeat(3, 1fr);
}

.stat-band.three > div:nth-child(n+2) {
    border-top: none;
    border-left: 1px solid var(--line);
}

.stat-band.three strong {
    font-size: clamp(1.15rem, 4vw, 2.4rem);
    white-space: nowrap;
}

@media (max-width: 575px) {
    .stat-band.three > div { padding: 1.1rem 0.4rem; }
}

.stack-top {
    margin-top: 1.5rem;
}

/* Numbered steps (How it works, Help) */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    counter-reset: step;
    list-style: none;
}

.steps.three {
    grid-template-columns: repeat(3, 1fr);
}

.step {
    position: relative;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    counter-increment: step;
}

.step::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    margin-bottom: 1rem;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step h3 {
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.step p {
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* FAQ accordion */
.accordion {
    display: grid;
    gap: 0.75rem;
}

.accordion details {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.accordion details[open] {
    border-color: var(--brand);
    box-shadow: var(--shadow-sm);
}

.accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.accordion summary::-webkit-details-marker {
    display: none;
}

.accordion summary::after {
    content: '\2b';
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.8rem;
    transition: transform 0.25s var(--ease);
}

.accordion details[open] summary::after {
    transform: rotate(45deg);
}

.accordion .answer {
    padding: 0 1.35rem 1.25rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.faq-group + .faq-group {
    margin-top: 2.5rem;
}

.faq-group > h2,
.faq-group > h3 {
    margin-bottom: 1rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    scroll-margin-top: 100px;
}

/* Long-form text (Terms, Privacy, guides) */
.prose {
    max-width: 760px;
    color: var(--ink-soft);
    line-height: 1.75;
}

.prose h2 {
    margin: 2.25rem 0 0.75rem;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    scroll-margin-top: 100px;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.1rem;
    color: var(--ink);
}

.prose p,
.prose ul,
.prose ol {
    margin-bottom: 1rem;
}

.prose ul,
.prose ol {
    padding-left: 1.4rem;
}

.prose li {
    margin-bottom: 0.4rem;
}

.prose a {
    color: var(--brand);
    font-weight: 600;
}

.prose strong {
    color: var(--ink);
}

.with-toc {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: clamp(24px, 5vw, 64px);
    align-items: start;
}

.toc {
    position: sticky;
    top: 100px;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.toc h4 {
    margin-bottom: 0.6rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.toc ol {
    display: grid;
    gap: 2px;
    list-style: none;
}

.toc a {
    display: block;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.toc a:hover {
    background: var(--brand-light);
    color: var(--brand);
}

.updated-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Icon + text rows (contact details) */
.info-list {
    display: grid;
    gap: 1rem;
    list-style: none;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.info-list li > i {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
}

.info-list strong {
    display: block;
    font-size: 0.92rem;
}

.info-list span,
.info-list a {
    color: var(--ink-soft);
    font-size: 0.9rem;
    text-decoration: none;
}

.info-list a:hover {
    color: var(--brand);
}

/* ============================================ */
/* FORMS (page forms; the modal uses .form-group too) */
/* ============================================ */
.form-card h2 {
    margin-bottom: 0.35rem;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.form-card > p {
    margin-bottom: 1.5rem;
    color: var(--ink-soft);
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--surface-alt);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-group select {
    height: 48px;
    padding-top: 0;
    padding-bottom: 0;
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(107, 70, 193, 0.12);
}

.form-group .hint {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--danger);
}

.field-error {
    margin-top: 0.3rem;
    color: var(--danger);
    font-size: 0.8rem;
}

.check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.form-group .check-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0.55rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.form-group .check-group input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    padding: 0;
    accent-color: var(--brand);
}

.form-group .check-group label:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-light);
    color: var(--brand);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.form-actions small {
    color: var(--muted);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    font-size: 0.93rem;
}

.alert i {
    margin-top: 2px;
    font-size: 1.1rem;
}

.alert strong {
    display: block;
}

.alert-success {
    border: 1px solid rgba(31, 157, 85, 0.3);
    background: rgba(31, 157, 85, 0.1);
    color: var(--success);
}

.alert-error {
    border: 1px solid rgba(229, 72, 77, 0.3);
    background: rgba(229, 72, 77, 0.08);
    color: var(--danger);
}

.alert-warning {
    border: 1px solid rgba(237, 161, 0, 0.35);
    background: rgba(237, 161, 0, 0.1);
    color: var(--ink);
}

.alert-warning > i {
    color: #c27400;
}

.alert-info {
    border: 1px solid rgba(42, 120, 214, 0.3);
    background: rgba(42, 120, 214, 0.08);
    color: var(--ink);
}

.alert-info > i {
    color: #2a78d6;
}

.alert p {
    color: var(--ink-soft);
}

/* Two-column layout: content + aside */
.split {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(20px, 3vw, 40px);
    align-items: start;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
/* Six cards per row leaves no room for a labelled button */
@media (min-width: 1201px) {
    .btn-add-cart { width: 36px; padding: 0; }
    .btn-add-cart span { display: none; }
}

@media (max-width: 1200px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); }
    .nav-link > span:not(.nav-icon) { display: none; }
    .nav-link.nav-cart { padding: 4px; }
    .nav-link { padding: 0.6rem 0.75rem; }
    .card-grid.four, .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .seller-cta { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: repeat(3, 1fr); }
    .footer-brand { grid-column: 1 / -1; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .steps.three { grid-template-columns: 1fr; }
    .split, .with-toc { grid-template-columns: 1fr; }
    .toc { position: static; }
    .stat-band { grid-template-columns: repeat(2, 1fr); }
    .stat-band > div:nth-child(3) { border-left: none; }
    .stat-band > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 767px) {
    .announce-links { display: none; }
    .announce .container { justify-content: center; }
    .announce-extra { display: none; }

    .menu-toggle { display: grid; place-items: center; }
    .navbar { flex-wrap: wrap; gap: 0.75rem; min-height: 0; padding-top: 0.7rem; padding-bottom: 0.7rem; }
    .nav-left { flex: 1; }
    .logo-mark { width: 40px; }
    .logo-text { font-size: 1.45rem; }
    .nav-search { order: 3; flex: 1 1 100%; max-width: none; }
    .nav-search input { height: 42px; }
    .nav-links .nav-link:not(.nav-cart) { display: none; }
    .btn-join { margin-left: 0.25rem; padding: 0.55rem 0.9rem; }
    .nav-link.nav-cart { height: 42px; margin-left: 0; }
    .nav-icon { width: 32px; height: 32px; }

    .page-hero { padding-top: 0.75rem; }
    .page-hero-inner { border-radius: 22px; }

    .section-head { align-items: center; }
    .section-link span { display: none; }
    .section-link { width: 42px; height: 42px; padding: 0; justify-content: center; }

    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
    .product-quick { display: none; }

    .card-grid, .card-grid.two, .card-grid.four, .steps { grid-template-columns: 1fr; }

    .cart-actions { grid-template-columns: 1fr 1.6fr; }
    .toast { left: 12px; right: 12px; top: 12px; max-width: none; transform: translateY(calc(-100% - 24px)); }
    .toast.show { transform: translateY(0); }

    .modal-container { padding: 2rem 1.25rem 1.5rem; border-radius: 22px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .otp-input-group { gap: 0.4rem; }
    .otp-input-group input { width: 44px; height: 52px; font-size: 1.2rem; }

    .footer { padding-top: 3rem; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 479px) {
    .btn-join span { display: none; }
    .btn-join { width: 42px; height: 42px; padding: 0; }
    .products-grid { gap: 0.6rem; }
    .product-info { padding: 0.7rem; }
    .product-name { font-size: 0.85rem; }
    .product-price strong { font-size: 0.92rem; }
    .product-bottom { flex-direction: column; align-items: stretch; }
    .btn-add-cart { width: 100%; }
    .password-requirements { grid-template-columns: 1fr; }
    .stat-band { grid-template-columns: 1fr 1fr; }
}

@media (hover: none) {
    .product-card:hover,
    .btn:hover { transform: none; }
    .product-card:hover .product-image-link img { transform: none; }
}

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

/* ============================================ */
/* NOT FOUND */
/* ============================================ */
.not-found .not-found-code {
    font-family: var(--font-display);
    font-size: clamp(5rem, 18vw, 8rem);
    font-weight: 600;
    font-style: italic;
    line-height: 1;
    letter-spacing: -0.04em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-hero-actions.center {
    justify-content: center;
}

/* ============================================ */
/* CHECKOUT (inside the cart panel) */
/* ============================================ */
.sidebar-user form .btn {
    width: 100%;
}

.cart-checkout {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

/* The cart panel shows one view at a time: the cart, the delivery form or the confirmation */
.cart-sidebar:not([data-view="checkout"]) #cartCheckout,
.cart-sidebar:not([data-view="success"]) #cartSuccess,
.cart-sidebar:not([data-view="items"]) #cartItems,
.cart-sidebar:not([data-view="items"]) #cartFooter {
    display: none !important;
}

.checkout-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    border: none;
    background: none;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.checkout-back:hover {
    color: var(--brand);
}

.checkout-title {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.pay-options {
    display: grid;
    gap: 0.5rem;
}

.form-group .pay-options label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.form-group .pay-options input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.form-group .pay-options label:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-light);
}

.pay-options i {
    width: 18px;
    color: var(--brand);
    text-align: center;
}

.checkout-summary {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 1rem;
    list-style: none;
    font-size: 0.92rem;
}

.checkout-summary li {
    display: flex;
    justify-content: space-between;
    color: var(--ink-soft);
}

.checkout-summary small {
    color: var(--muted);
}

.checkout-summary li.total {
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 800;
}

.checkout-summary li.discount strong {
    color: var(--success);
}

.checkout-submit {
    width: 100%;
}

/* Discount code at checkout */
.coupon-row {
    display: flex;
    gap: 0.5rem;
}

.coupon-row input {
    flex: 1;
    min-width: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coupon-row input::placeholder {
    text-transform: none;
    letter-spacing: 0;
}

.coupon-row input[readonly] {
    border-color: var(--success);
}

.coupon-row .btn {
    flex-shrink: 0;
    height: 48px;
}

.coupon-note {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.coupon-note.ok {
    color: var(--success);
}

.coupon-note.bad {
    color: var(--danger);
}

.cart-success {
    flex: 1;
    padding: 3rem 1.5rem;
    text-align: center;
}

.cart-success .empty-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: rgba(31, 157, 85, 0.12);
    color: var(--success);
    display: grid;
    place-items: center;
    font-size: 2.2rem;
}

.cart-success h4 {
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
}

.cart-success p {
    color: var(--ink-soft);
}

.cart-success ul {
    display: grid;
    gap: 0.4rem;
    margin: 0.75rem 0 1rem;
    list-style: none;
}

.cart-success li {
    padding: 0.5rem;
    border-radius: 10px;
    background: var(--surface-alt);
    font-family: ui-monospace, Consolas, monospace;
    font-weight: 700;
}

.cart-success .muted-text {
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
}

.cart-success .btn {
    width: 100%;
    margin-bottom: 0.6rem;
}

.cart-sidebar:not([data-view="pay"]) #cartPay {
    display: none !important;
}

.pay-options span {
    display: grid;
    gap: 2px;
}

.pay-options small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 500;
}

.form-group[hidden],
.alert[hidden] {
    display: none;
}

.buyer-protection {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: rgba(31, 157, 85, 0.1);
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.5;
}

.buyer-protection i {
    margin-top: 3px;
    color: var(--success);
}

/* Waiting for the customer to approve the mobile money prompt */
.cart-pay {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.pay-state h4 {
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 600;
}

.pay-state p {
    margin-bottom: 0.75rem;
    color: var(--ink-soft);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.pay-state .muted-text {
    color: var(--muted);
    font-size: 0.84rem;
}

.pay-state .form-group {
    text-align: left;
}

.pay-phone-icon {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 2.2rem;
}

.pay-phone-icon.failed {
    background: rgba(229, 72, 77, 0.12);
    color: var(--danger);
}

.pay-pulse {
    position: absolute;
    inset: 0;
    border: 2px solid var(--brand);
    border-radius: 50%;
    animation: payPulse 1.8s var(--ease) infinite;
}

@keyframes payPulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(1.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .pay-pulse { animation: none; opacity: 0.4; }
}

.pay-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.pay-status i {
    color: var(--brand);
}

.pay-test {
    margin: 1rem 0;
    padding: 1rem;
    border: 1.5px dashed var(--line);
    border-radius: 14px;
    background: var(--surface-alt);
    text-align: left;
}

.pay-test strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
}

.pay-test p {
    font-size: 0.82rem;
}

.pay-test-actions {
    display: flex;
    gap: 0.5rem;
}

.pay-test-actions .btn {
    flex: 1;
    justify-content: center;
}

.pay-later {
    display: inline-block;
    margin-top: 1rem;
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 600;
}

.pay-later:hover {
    text-decoration: underline;
}

/* Columns may shrink below their content, and long words (emails, links) wrap instead of widening the page */
.split > *,
.with-toc > *,
.card-grid > *,
.story > * {
    min-width: 0;
}

.info-list span,
.info-list a,
.info-list strong,
.detail-list strong,
.shop-about p {
    overflow-wrap: anywhere;
}

/* Shop logos inside avatar circles (initials are shown until a shop has a logo) */
.shop-avatar,
.shop-avatar-lg,
.mini-avatar {
    overflow: hidden;
}

.shop-avatar img,
.shop-avatar-lg img,
.mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff;
}

/* ============================================ */
/* STYLED POP-UP (assets/js/dialog.js) */
/* ============================================ */
.pk-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 13, 21, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.pk-dialog-overlay.open {
    opacity: 1;
    visibility: visible;
}

html.pk-dialog-open,
html.pk-dialog-open body {
    overflow: hidden;
}

.pk-dialog {
    width: 100%;
    max-width: 400px;
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    text-align: center;
    transform: translateY(14px) scale(0.97);
    transition: transform 0.3s var(--ease);
}

.pk-dialog-overlay.open .pk-dialog {
    transform: none;
}

.pk-dialog-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
}

.pk-dialog.danger .pk-dialog-icon {
    background: rgba(229, 72, 77, 0.12);
    color: var(--danger);
}

.pk-dialog h3 {
    margin-bottom: 0.4rem;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    overflow-wrap: anywhere;
}

.pk-dialog p {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.6;
}

.pk-dialog-value {
    width: 100%;
    height: 44px;
    margin-top: 1rem;
    padding: 0 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--surface-alt);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.88rem;
}

.pk-dialog-value:focus {
    outline: none;
    border-color: var(--brand);
}

.pk-dialog-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.pk-dialog-actions .btn {
    flex: 1;
    justify-content: center;
}

.pk-dialog-actions .btn[hidden] {
    display: none;
}

.pk-dialog .btn-danger {
    background: var(--danger);
    color: white;
}

.pk-dialog .btn-danger:hover {
    background: #c4262b;
}

/* ============================================ */
/* BOTTOM TAB BAR (phones, includes/bottom-nav.php) */
/* ============================================ */
.bottom-nav {
    display: none;
}

@media (max-width: 767px) {
    :root {
        --bottom-nav-h: 66px;
    }

    body {
        padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    }

    .bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1400;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: end;
        height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
        padding: 0 4px env(safe-area-inset-bottom, 0px);
        border-top: 1px solid var(--line);
        border-radius: 20px 20px 0 0;
        background: var(--surface);
        box-shadow: 0 -8px 28px rgba(23, 20, 31, 0.08);
    }

    .bottom-nav-item,
    .bottom-nav-cart {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        height: var(--bottom-nav-h);
        padding: 0;
        border: 0;
        background: none;
        color: var(--muted);
        font-family: inherit;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-label {
        max-width: 100%;
        overflow: hidden;
        font-size: 0.7rem;
        font-weight: 600;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bottom-nav-icon {
        width: 54px;
        height: 30px;
        border-radius: 999px;
        display: grid;
        place-items: center;
        font-size: 1.08rem;
        transition: background 0.2s, transform 0.15s;
    }

    .bottom-nav-item.active {
        color: var(--brand);
    }

    .bottom-nav-item.active .bottom-nav-label {
        font-weight: 800;
    }

    .bottom-nav-item.active .bottom-nav-icon {
        background: var(--brand-light);
    }

    .bottom-nav-item:active .bottom-nav-icon,
    .bottom-nav-cart:active .bottom-nav-fab {
        transform: scale(0.92);
    }

    /* Cart: a raised round button in the middle */
    .bottom-nav-cart {
        color: var(--ink-soft);
    }

    .bottom-nav-fab {
        position: relative;
        width: 54px;
        height: 54px;
        /* Takes the same 30px slot as the other icons and rises above the bar */
        margin-top: -24px;
        border-radius: 50%;
        background: var(--brand-gradient);
        color: white;
        display: grid;
        place-items: center;
        font-size: 1.2rem;
        box-shadow: 0 0 0 5px var(--surface), 0 10px 22px rgba(107, 70, 193, 0.38);
        transition: transform 0.15s;
    }

    .bottom-nav-badge {
        position: absolute;
        top: -2px;
        right: -4px;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        border: 2px solid var(--surface);
        border-radius: 999px;
        background: var(--accent);
        color: white;
        display: grid;
        place-items: center;
        font-size: 0.66rem;
        font-weight: 800;
        line-height: 1;
    }

    .bottom-nav-badge[hidden] {
        display: none;
    }
}

@media print {
    .bottom-nav { display: none !important; }
}

/* Light/dark switch: a round icon button in the header, a menu row in the side menu */
.nav-link.nav-theme {
    width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    font-family: inherit;
    cursor: pointer;
}

button.sidebar-menu-item {
    width: 100%;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    cursor: pointer;
}

/* Phones: cart and account live in the bottom tab bar, so the header keeps the menu, logo and theme switch */
@media (max-width: 767px) {
    .nav-links .nav-link.nav-theme { display: flex; }
    .navbar .nav-cart,
    .navbar .btn-join { display: none !important; }
    .announce-msg span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .announce-msg { min-width: 0; }
}

.cart-item .item-options {
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
}

/* Language switch (SW / EN) */
.nav-link.nav-lang {
    min-width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0 0.6rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

@media (max-width: 767px) {
    .nav-links .nav-link.nav-lang { display: flex; }
}
