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

:root {
    --gold: #D4AF37;
    --gold-dark: #B8942E;
    --gold-light: #E8C56B;
    --black: #111111;
    --white: #FFFFFF;
    --text: #1A1A1A;
    --muted: #747474;
    --border: #E8E8E8;
    --background: #FFFFFF;
}

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

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Tajawal", sans-serif;
    color: var(--text);
    background: var(--background);
    max-width: 100%;
    overflow-x: hidden;
    min-width: 0;
}

/* =========================
   SCROLL REVEAL
========================= */

.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.js-reveal [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js-reveal [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

/* =========================
   NAVBAR
========================= */

.navbar {
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    width: min(1400px, calc(100% - 48px));
    min-height: 76px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    align-items: center;
}

/* Logo (right side in RTL) */

.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    grid-column: 1;
    justify-self: start;
}

.nav-logo {
    display: block;
    width: auto;
    max-width: 145px;
    height: 48px;
    object-fit: contain;
}

/* Desktop navigation links (≥1024px) */

.nav-links {
    grid-column: 2;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 30px;
    height: 76px;
}

/* Desktop actions (≥1024px) */

.nav-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-icon {
    width: 21px;
    height: 21px;
    position: relative;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.nav-icon:hover {
    color: var(--gold-dark);
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

.cart-count {
    position: absolute;
    top: -9px;
    left: -10px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    background: var(--gold);
    color: var(--black);
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile-only pieces are hidden on desktop */

.mobile-menu-button,
.nav-spacer,
.mobile-drawer,
.nav-menu-overlay {
    display: none;
}

.nav-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 21px;
    right: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.25s ease;
}

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

.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-arrow {
    width: 14px;
    transition: transform 0.25s ease;
}

.dropdown:hover .dropdown-arrow,
.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown */

.dropdown-menu {
    position: absolute;
    top: calc(100% - 10px);
    right: -24px;
    width: 270px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-item {
    min-height: 52px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.category-item:hover {
    background: #F8F8F8;
    color: var(--gold-dark);
}

.category-arrow {
    font-size: 18px;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.category-item:hover .category-arrow {
    transform: translateX(-4px);
    color: var(--gold-dark);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 6px;
}

/* Dynamic categories (loaded from Supabase) */

.dropdown-state-item {
    min-height: 52px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--muted);
}

.dropdown-state-error {
    color: var(--gold-dark);
    font-weight: 500;
}

.category-group + .category-group {
    margin-top: 4px;
}

.category-subitem {
    min-height: 40px;
    padding-right: 28px;
    font-size: 13.5px;
    color: var(--muted);
}

.category-subitem:hover {
    color: var(--gold-dark);
}

/* Account dropdown (user icon) */

.account-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.account-dropdown .dropdown-menu {
    width: 224px;
    right: auto;
    left: 0;
    padding: 8px;
}

.account-item {
    min-height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text);
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
}

.account-item:hover {
    background: #F8F8F8;
    color: var(--gold-dark);
}

.account-item-danger {
    border: 0;
    background: transparent;
    width: 100%;
    font-family: inherit;
    font-weight: 600;
    color: var(--gold-dark);
    text-align: right;
}

.account-item-danger:hover {
    background: #FDF3EC;
    color: #C0392B;
}

.view-all-categories {
    min-height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold-dark);
}

/* =========================
   CART DRAWER
========================= */

body.cart-open {
    overflow: hidden;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.55);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
    z-index: 2000;
}

.cart-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100%);
    height: 100%;
    background: var(--white);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
}

.cart-drawer.is-open {
    transform: translateX(0);
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.cart-drawer-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
}

.cart-drawer-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    transition: color 0.2s ease;
}

.cart-drawer-close:hover {
    color: var(--black);
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    color: var(--muted);
    padding: 60px 0;
    font-size: 15px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cart-item-thumb {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #F7F7F5;
}

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

.cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.cart-item-name:hover {
    color: var(--gold-dark);
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-dark);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.cart-qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        border-color 0.2s ease,
        color 0.2s ease;
}

.cart-qty-btn:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.cart-qty-value {
    min-width: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #C9C9C9;
    font-size: 13px;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    color: #E04A4A;
}

.cart-drawer-footer {
    padding: 18px 20px;
    border-top: 1px solid var(--border);
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cart-total-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.cart-total-value {
    font-size: 19px;
    font-weight: 700;
    color: var(--gold-dark);
}

.cart-checkout-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--gold);
    color: var(--black);
    border: 1px solid var(--gold);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.cart-checkout-btn:hover {
    background: transparent;
    color: var(--gold);
}

.cart-checkout-btn:disabled {
    background: #EDEDED;
    border-color: #EDEDED;
    color: var(--muted);
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .cart-drawer {
        width: 100%;
    }
}

/* =========================
   FILTER STATUS
========================= */

.filter-status {
    width: min(1400px, calc(100% - 24px));
    margin: 20px auto;
    padding: 14px 16px;
    border: 1px solid var(--border);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #FCFCFC;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 768px) {
    .filter-status {
        width: min(1400px, calc(100% - 32px));
        margin: 24px auto;
        padding: 16px 20px;
    }
}

@media (min-width: 1024px) {
    .filter-status {
        width: min(1400px, calc(100% - 48px));
        margin: 28px auto;
    }
}

.filter-status.active {
    display: flex;
}

.filter-status-text {
    font-size: 15px;
    font-weight: 500;
}

.filter-status-text strong {
    color: var(--gold-dark);
}

.clear-filter {
    border: 0;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--text);
    transition: color 0.2s ease;
}

.clear-filter:hover {
    color: var(--gold-dark);
}

/* =========================
   CATEGORY FILTERS
========================= */

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button {
    padding: 10px 18px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.filter-button:hover,
.filter-button.active {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--black);
}

/* ---- Shop page: single-row horizontal scroll-snap pill bar ---- */

.category-scroller {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.category-filters.is-scroller {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;

    /* Keep the first/last pill from sticking to the edges when snapped */
    scroll-padding-inline: 8px;
    padding-block: 3px;

    gap: 10px;

    /* Hide the scrollbar (Firefox + legacy Edge) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-filters.is-scroller::-webkit-scrollbar {
    display: none;
}

.is-scroller .filter-button {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
    border-radius: 999px;
    background: #F7F7F5;
    font-weight: 600;
}

.is-scroller .filter-button:hover,
.is-scroller .filter-button.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
}

.is-scroller .filter-button:focus-visible {
    outline: 2px solid var(--gold-dark);
    outline-offset: 2px;
}

/* Fade hint on the left — additional pills continue that way in RTL */

.category-fade-hint {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 64px;
    background: linear-gradient(to right, var(--white), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.category-fade-hint.is-visible {
    opacity: 1;
}

.shop-sort-slot {
    flex: 0 0 auto;
}

/* =========================
   PRODUCT FILTER ANIMATION
========================= */

.product-card {
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.product-card.is-hidden {
    display: none;
}

/* =========================
   SHOP PAGE
========================= */

.shop-page {
    width: min(1400px, calc(100% - 24px));
    margin: 0 auto;
    padding: 32px 0 56px;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .shop-page {
        width: min(1400px, calc(100% - 32px));
        padding: 36px 0 64px;
    }
}

@media (min-width: 1024px) {
    .shop-page {
        width: min(1400px, calc(100% - 48px));
        padding: 40px 0 72px;
    }
}

.shop-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.shop-eyebrow {
    color: var(--gold-dark);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.shop-header h1 {
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
}

/* Loading / error / empty states */

.shop-loading,
.shop-error,
.shop-empty {
    width: 100%;
    max-width: 100%;
    margin: 32px auto;
    padding: 32px 16px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
    min-width: 0;
}

.shop-loading-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: shop-spin 0.8s linear infinite;
}

@keyframes shop-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Products grid — responsive e-commerce grid: mobile 2, tablet 3, desktop 4, large 5 */

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    min-width: 0;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.25s ease,
        transform 0.25s ease;
}

.product-card:hover {
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.product-card-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.product-card-actions {
    padding: 0 12px 12px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.product-add-cart {
    width: 100%;
    max-width: 100%;
    padding: 11px 10px;
    background: var(--gold);
    color: var(--black);
    border: 1px solid var(--gold);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.product-add-cart:hover {
    background: transparent;
    color: var(--gold);
}

.product-add-cart:disabled {
    background: #EDEDED;
    border-color: #EDEDED;
    color: var(--muted);
    cursor: not-allowed;
}

.product-add-cart.is-added {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--white);
}

.product-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #F7F7F5;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

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

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D4D4D4;
}

.product-placeholder svg {
    width: 56px;
    height: 56px;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
}

.product-badge-sale {
    background: var(--gold);
    color: var(--black);
}

.product-badge-out {
    background: #1A1A1A;
    color: var(--white);
}

.product-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    min-width: 0;
    max-width: 100%;
}

.product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--gold-dark);
    overflow-wrap: anywhere;
    min-width: 0;
}

.product-old-price {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
    overflow-wrap: anywhere;
    min-width: 0;
}

/* Card responsive refinements — keep readable on very small phones (320–390px) */
@media (max-width: 390px) {
    .product-info {
        padding: 8px 8px 10px;
        gap: 6px;
    }

    .product-name {
        font-size: 12.5px;
        line-height: 1.4;
        min-height: 2.6em;
    }

    .product-price {
        font-size: 13.5px;
    }

    .product-old-price {
        font-size: 11px;
    }

    .product-card-actions {
        padding: 0 8px 8px;
    }

    .product-add-cart {
        font-size: 12px;
        padding: 9px 8px;
    }

    .product-badge {
        top: 6px;
        right: 6px;
        padding: 3px 6px;
        font-size: 10px;
    }

    .products-grid,
    .home-products-grid {
        gap: 10px;
    }
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .product-info {
        padding: 12px 14px 14px;
        gap: 9px;
    }

    .product-name {
        font-size: 14.5px;
        min-height: 2.9em;
    }

    .product-price {
        font-size: 16px;
    }

    .product-old-price {
        font-size: 12.5px;
    }

    .product-card-actions {
        padding: 0 14px 14px;
    }

    .product-add-cart {
        font-size: 13.5px;
        padding: 11px 12px;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }

    .product-info {
        padding: 14px 16px 16px;
        gap: 10px;
    }

    .product-name {
        font-size: 15px;
    }

    .product-price {
        font-size: 17px;
    }

    .product-old-price {
        font-size: 13px;
    }

    .product-card-actions {
        padding: 0 16px 16px;
    }

    .product-add-cart {
        font-size: 14px;
        padding: 12px 16px;
    }

    .product-badge {
        top: 12px;
        right: 12px;
        padding: 5px 10px;
        font-size: 12px;
    }
}

@media (min-width: 1440px) {
    .products-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .shop-header h1 {
        font-size: 24px;
    }
}

/* =========================
   PRODUCT DETAIL PAGE
========================= */

.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.product-breadcrumb a {
    color: var(--gold-dark);
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

/* Gallery */

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-main-image {
    aspect-ratio: 1 / 1;
    background: #F7F7F5;
    border: 1px solid var(--border);
    overflow: hidden;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-gallery-placeholder {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border);
    width: 100%;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-thumb {
    width: 76px;
    height: 76px;
    padding: 0;
    border: 1px solid var(--border);
    background: #F7F7F5;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-thumb.is-active,
.product-thumb:hover {
    border-color: var(--gold);
}

/* Info */

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-detail-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.product-detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}

.product-detail-price-row .product-price {
    font-size: 28px;
}

.product-detail-price-row .product-old-price {
    font-size: 17px;
}

.product-detail-stock {
    font-size: 14px;
    font-weight: 600;
}

.product-detail-stock.is-in {
    color: #1E7A34;
}

.product-detail-stock.is-low {
    color: var(--gold-dark);
}

.product-detail-stock.is-out {
    color: #B00020;
}

.product-detail-description {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
    white-space: normal;
}

/* Order box */

.product-order-box {
    margin-top: 10px;
    padding: 22px;
    border: 1px solid var(--border);
    background: #FCFCFA;
}

.product-order-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.product-order-note {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 18px;
    line-height: 1.7;
}

.product-order-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.product-quantity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    background: var(--white);
}

.quantity-control button {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
}

.quantity-control button:hover {
    background: #F1F1EE;
}

.quantity-control input {
    width: 56px;
    height: 42px;
    border: 0;
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text);
    -moz-appearance: textfield;
}

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

.product-order-field {
    margin-bottom: 14px;
}

.product-order-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.required-mark {
    color: #B00020;
}

.order-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.2s ease;
}

.order-input:focus {
    outline: none;
    border-color: var(--gold);
}

.order-input.is-ltr {
    text-align: left;
}

textarea.order-input {
    resize: vertical;
    min-height: 60px;
    line-height: 1.6;
}

.order-submit {
    width: 100%;
    margin-top: 6px;
    padding: 13px 18px;
    border: 0;
    background: var(--gold);
    color: var(--black);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.order-submit:hover {
    background: var(--gold-light);
}

.order-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.order-error-message {
    margin-top: 14px;
    padding: 11px 14px;
    background: #FDEBEB;
    border: 1px solid #F5C6C6;
    color: #B00020;
    font-size: 13px;
    line-height: 1.7;
}

/* Order success */

.order-success {
    margin-top: 10px;
    padding: 30px 22px;
    border: 1px solid #CDE8D3;
    background: #F0F9F2;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.order-success h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1E7A34;
}

.order-success p {
    font-size: 14px;
    color: var(--text);
    line-height: 1.7;
}

.order-success strong {
    color: var(--gold-dark);
    font-size: 16px;
}

.order-success-note {
    color: var(--muted) !important;
    font-size: 13px !important;
}

@media (max-width: 860px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 1023px) {
    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 68px;
    }

    /* Logo centered (order 2 = middle; space-between
       with 3 visible items keeps it dead-center) */

    .logo-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: 2;
    }

    .nav-logo {
        max-width: 120px;
        height: 42px;
    }

    /* Hide the desktop bar on mobile */

    .nav-links,
    .nav-actions {
        display: none !important;
    }

    /* Menu button (rightmost in RTL via flex order) */

    .mobile-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
        order: 1;
        position: relative;
        z-index: 51;
        color: var(--text);
        transition: color 0.2s ease;
    }

    .mobile-menu-button:hover {
        color: var(--gold-dark);
    }

    .mobile-menu-icon {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .mobile-menu-icon line {
        transition:
            transform 0.3s ease,
            opacity 0.3s ease;
        transform-box: fill-box;
        transform-origin: center;
    }

    .mobile-menu-button.active .mobile-menu-icon line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-menu-button.active .mobile-menu-icon line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-button.active .mobile-menu-icon line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* Spacer matching the hamburger box keeps the logo truly centered */

    .nav-spacer {
        display: block;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        order: 3;
    }

    /* Off-canvas menu drawer (body-level sibling of the nav) */

    .nav-menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(17, 17, 17, 0.5);
        opacity: 0;
        visibility: hidden;
        transition:
            opacity 0.3s ease,
            visibility 0.3s ease;
        z-index: 40;
        pointer-events: auto;
    }

    .nav-menu-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }

    .mobile-drawer {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 85vw);
        height: 100dvh;
        padding: 0 0 28px;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        background: var(--white);
        border-left: 1px solid var(--border);
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.16);
        transform: translateX(100%);
        transition: transform 0.35s ease;
        overflow-y: auto;
        z-index: 50;
        pointer-events: auto;
    }

    .mobile-drawer.is-open {
        transform: translateX(0);
    }

    body.nav-menu-open {
        overflow: hidden;
    }

    /* Drawer header */

    .nav-drawer-header {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 14px 20px;
        border-bottom: 1px solid var(--border);
    }

    .nav-drawer-close {
        appearance: none;
        border: 0;
        background: transparent;
        font-size: 16px;
        color: var(--muted);
        cursor: pointer;
        padding: 6px;
        line-height: 1;
        transition: color 0.2s ease;
    }

    .nav-drawer-close:hover {
        color: var(--black);
    }

    /* Drawer items */

    .nav-drawer-item {
        appearance: none;
        border: 0;
        background: transparent;
        width: 100%;
        min-height: 52px;
        padding: 0 22px;
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 15px;
        font-weight: 500;
        color: var(--text);
        text-align: right;
        cursor: pointer;
        transition:
            background 0.15s ease,
            color 0.15s ease;
    }

    .nav-drawer-item:hover {
        background: #FAFAF8;
        color: var(--gold-dark);
    }

    .nav-drawer-item svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .nav-drawer-item .dropdown-arrow {
        margin-inline-start: auto;
    }

    .nav-drawer-divider {
        height: 1px;
        background: var(--border);
        margin: 8px 0;
    }

    /* Cart badge inside the drawer */

    .nav-drawer-item .cart-count {
        position: static;
        margin-inline-start: auto;
        min-width: 20px;
        height: 20px;
        border-radius: 10px;
        padding: 0 6px;
        background: var(--gold);
        color: var(--black);
        font-family: Arial, sans-serif;
        font-size: 11px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Dropdowns inside the drawer behave as static accordions */

    .mobile-drawer .dropdown {
        display: block;
    }

    .mobile-drawer .dropdown-trigger {
        width: 100%;
        justify-content: space-between;
    }

    .mobile-drawer .dropdown .dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 0 12px 0 0;
        background: transparent;
        transform: none;
        display: none;
        opacity: 1;
        visibility: visible;
    }

    .mobile-drawer .dropdown.active .dropdown-menu {
        display: block;
    }

    .mobile-drawer .nav-link {
        display: flex;
        padding: 0 22px;
        gap: 12px;
        white-space: normal;
        min-height: 52px;
    }

    .mobile-drawer .nav-link::after {
        display: none;
    }

    .mobile-drawer .account-trigger {
        padding: 0 22px;
        display: flex;
        width: 100%;
    }

    .filter-status {
        width: min(100% - 32px, 1400px);
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================
   AUTH PAGE (signin / signup)
========================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAFAF8;
    padding: 24px;
}

.auth-container {
    width: 100%;
    max-width: 430px;
}

.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 36px 32px;
}

.auth-brand {
    text-align: right;
    margin-bottom: 26px;
}

.auth-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
    margin-bottom: 18px;
}

.auth-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    text-align: right;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    text-align: right;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
}

.auth-tab {
    border: 0;
    background: var(--white);
    color: var(--muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: center;
}

.auth-tab.is-active {
    background: var(--black);
    color: var(--gold-light);
}

.auth-error,
.auth-success {
    font-size: 13px;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    line-height: 1.7;
    text-align: right;
}

.auth-error {
    background: #FDF3EC;
    border: 1px solid #F1C7B8;
    color: #C0392B;
}

.auth-success {
    background: #F3F8F3;
    border: 1px solid #BFD9BF;
    color: #2E7D32;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
    text-align: right;
}

.auth-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s ease;
    text-align: right;
}

.auth-input:focus {
    outline: none;
    border-color: var(--gold);
}

.auth-btn {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: var(--black);
    color: var(--gold-light);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    margin-top: 6px;
}

.auth-btn:hover {
    background: var(--gold-dark);
    color: var(--white);
}

.auth-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.auth-footer {
    text-align: right;
    margin-top: 24px;
    font-size: 13px;
    color: var(--muted);
}

.auth-footer a {
    color: var(--gold-dark);
    font-weight: 600;
}

/* =========================
   HERO SECTION (homepage)
========================= */

.hero {
    width: 100%;
    background: #111111;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: clamp(640px, 80vh, 860px);
    overflow: hidden;
}

.hero-slides {
    display: flex;
    direction: ltr;
    height: 100%;
    transition: transform 0.6s ease;
    will-change: transform;
}

.hero-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #111111;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(17, 17, 17, 0.72) 0%,
        rgba(17, 17, 17, 0.35) 45%,
        rgba(17, 17, 17, 0.28) 100%
    );
}

.hero-slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    color: var(--white);
    direction: rtl;
}

.hero-eyebrow {
    color: var(--gold);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
}

.hero-title {
    font-size: clamp(32px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 16px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: clamp(16px, 2.2vw, 22px);
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 680px;
}

.hero-cta {
    display: inline-block;
    padding: 15px 42px;
    background: var(--gold);
    color: var(--black);
    font-size: 16px;
    font-weight: 700;
    border: 1px solid var(--gold);
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.hero-cta:hover {
    background: transparent;
    color: var(--gold);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(17, 17, 17, 0.35);
    color: var(--white);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.hero-arrow:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
}

.hero-arrow-prev {
    right: 18px;
}

.hero-arrow-next {
    left: 18px;
}

.hero-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}

.hero-dot.is-active {
    background: var(--gold);
}

/* Fallback placeholder (no hero images configured) */

.hero-placeholder {
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.12), transparent 55%),
        #111111;
}

.hero-placeholder-inner {
    text-align: center;
    padding: 40px 24px;
    color: var(--white);
}

@media (max-width: 720px) {
    .hero-slider {
        height: clamp(480px, 70vh, 640px);
    }

    .hero-placeholder {
        min-height: 480px;
    }

    .hero-arrow {
        display: none !important;
    }
}

/* =========================
   HOME CATEGORIES SECTION
========================= */

.home-categories {
    padding: 72px 0;
    background: #faf8f4;
}

.home-categories-inner {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
    text-align: center;
}

.section-eyebrow {
    color: var(--gold);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 700;
    color: var(--black);
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 44px;
}

.home-categories-carousel {
    position: relative;
    margin-bottom: 28px;
}

.home-categories-viewport {
    overflow: hidden;
}

.home-categories-slide {
    display: flex;
    direction: ltr;
    transition: transform 0.45s ease;
    will-change: transform;
}

.home-category-card {
    display: block;
    flex: 0 0 25%;
    padding: 0 10px;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
}

.home-category-card-inner {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.home-category-card-inner:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.1);
}

.home-category-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.home-category-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1c1c1c, #333333);
}

.home-category-image-placeholder span {
    color: var(--gold);
    font-size: 56px;
    font-weight: 700;
}

.home-category-name {
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    text-align: center;
}

.home-category-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--black);
    font-family: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(17, 17, 17, 0.12);
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.home-category-arrow:hover {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--black);
}

.home-category-arrow-prev {
    right: 0;
}

.home-category-arrow-next {
    left: 0;
}

.home-categories-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.home-category-dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.home-category-dot:hover {
    background: var(--gold-light);
}

.home-category-dot.is-active {
    background: var(--gold);
}

@media (max-width: 1000px) {
    .home-category-card {
        flex-basis: 33.3333%;
    }
}

@media (max-width: 720px) {
    .home-category-card {
        flex-basis: 50%;
    }
}

@media (max-width: 480px) {
    .home-category-card {
        flex-basis: 100%;
    }
}

.home-categories-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 0;
    color: var(--muted);
}

.home-categories-error,
.home-categories-empty {
    padding: 48px 0;
    color: var(--muted);
}

.home-categories-error p {
    margin-bottom: 16px;
}

@media (max-width: 720px) {
    .home-categories {
        padding: 48px 0;
    }

    .home-categories-carousel {
        gap: 10px;
    }

    .home-category-arrow {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .home-category-image {
        height: 160px;
    }
}

/* =========================
   HOME PRODUCTS SECTION
========================= */

.home-products {
    padding: 72px 0;
    background: var(--white);
}

.home-products-inner {
    width: min(1400px, calc(100% - 24px));
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .home-products-inner {
        width: min(1400px, calc(100% - 32px));
    }
}

@media (min-width: 1024px) {
    .home-products-inner {
        width: min(1400px, calc(100% - 48px));
    }
}

.home-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 36px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.home-products-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 0;
    color: var(--muted);
}

.home-products-error,
.home-products-empty {
    padding: 48px 0;
    color: var(--muted);
}

.home-products-error p {
    margin-bottom: 16px;
}

.home-products-footer {
    text-align: center;
}

.home-products-more {
    display: inline-block;
    padding: 14px 48px;
    background: var(--gold);
    color: var(--black);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    border: 1px solid var(--gold);
    text-decoration: none;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.home-products-more:hover {
    background: transparent;
    color: var(--gold);
}

@media (min-width: 768px) {
    .home-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        margin-bottom: 40px;
    }
}

@media (min-width: 1024px) {
    .home-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
        margin-bottom: 44px;
    }
}

@media (min-width: 1440px) {
    .home-products-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .home-products {
        padding: 48px 0;
    }

    .home-products-inner {
        width: min(1400px, calc(100% - 24px));
    }
}

/* =========================
   FOOTER
========================= */

.footer {
    background: var(--black);
    color: var(--white);
}

.footer-container {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
    padding: 56px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 1.4fr 1fr 1.6fr;
    gap: 40px;
}

.footer-brand {
    font-size: 26px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 12px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.9;
}

.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--gold);
}

.footer-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 14px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition:
        border-color 0.2s ease,
        color 0.2s ease;
}

.footer-socials {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-social:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

.footer-map {
    width: 100%;
    height: 180px;
    border: 0;
    border-radius: 8px;
    display: block;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 24px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        padding: 40px 0 32px;
    }
}

/* =========================
   ABOUT SECTION (من نحن)
========================= */

.about {
    padding: 72px 0;
    background: #faf8f4;
}

.about-inner {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
    text-align: center;
}

.about-text {
    max-width: 720px;
    margin: 0 auto 48px;
    color: var(--muted);
    font-size: 16px;
    line-height: 2;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.about-feature {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 32px 24px;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.about-feature:hover {
    border-color: var(--gold);
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.08);
    transform: translateY(-4px);
}

.about-feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold);
}

.about-feature-icon svg {
    width: 30px;
    height: 30px;
}

.about-feature-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
}

.about-feature-text {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .about-features {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }
}

@media (max-width: 720px) {
    .about {
        padding: 48px 0;
    }
}

/* =========================
   SEARCH OVERLAY
========================= */

body.search-open {
    overflow: hidden;
}

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.55);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
    z-index: 2500;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}

.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.search-panel {
    width: min(640px, calc(100% - 32px));
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(-12px);
    transition: transform 0.3s ease;
}

.search-overlay.is-open .search-panel {
    transform: translateY(0);
}

.search-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.search-panel-icon {
    width: 20px;
    height: 20px;
    color: var(--muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 17px;
    color: var(--text);
    background: transparent;
}

.search-input::placeholder {
    color: #B5B5B5;
}

.search-close {
    background: none;
    border: none;
    font-size: 17px;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.search-close:hover {
    color: var(--black);
}

.search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px 20px 16px;
}

.search-recommendation-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    padding: 12px 0 8px;
}

.search-results-list {
    display: flex;
    flex-direction: column;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 6px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #FAFAF8;
}

.search-result-thumb {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #F7F7F5;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.search-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-result-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.search-result-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-dark);
}

.search-result-old-price {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
}

.search-state {
    text-align: center;
    color: var(--muted);
    padding: 40px 0;
    font-size: 14px;
}

/* =========================
   PAGES — HERO (about / contact / faq / policy / errors)
========================= */

.page-hero {
    padding: 56px 24px 36px;
    text-align: center;
    background: #FAFAF8;
    border-bottom: 1px solid var(--border);
}

.section-eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--gold-dark);
    margin-bottom: 10px;
}

.page-hero-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
}

.page-hero-subtitle {
    font-size: 14px;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.info-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 48px 24px 72px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 26px 28px;
}

.info-block h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 14px;
}

.info-block h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin: 18px 0 8px;
}

.info-block p {
    font-size: 14px;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 8px;
}

.info-list {
    list-style: none;
    margin: 6px 0 10px;
}

.info-list li {
    font-size: 14px;
    line-height: 1.9;
    color: var(--text);
    padding-right: 22px;
    position: relative;
}

.info-list li::before {
    content: "";
    position: absolute;
    right: 4px;
    top: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
}

.info-muted {
    color: var(--muted);
    font-size: 13px;
}

/* =========================
   ERRORS (404 / 401 / 403 / 500 / maintenance / offline)
========================= */

.error-page-box {
    text-align: center;
    padding: 56px 24px;
}

.error-page-code {
    font-size: 72px;
    font-weight: 700;
    color: var(--gold-dark);
    line-height: 1;
    margin-bottom: 14px;
}

.error-page-text {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.9;
    max-width: 480px;
    margin: 0 auto 26px;
}

.error-page-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

/* =========================
   CATEGORIES PAGE
========================= */

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

.category-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--gold);
}

.category-card-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #F7F6F3;
}

.category-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-card-media .product-placeholder {
    width: 100%;
    height: 100%;
}

.category-card-info {
    padding: 14px 16px 16px;
    text-align: right;
}

.category-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
}

.category-card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

.categories-loading,
.categories-error,
.categories-empty,
.search-results-loading,
.search-results-error,
.search-results-empty,
.wishlist-loading,
.wishlist-error,
.wishlist-empty,
.checkout-loading,
.checkout-auth-required,
.checkout-empty,
.confirmation-loading,
.confirmation-error,
.track-result {
    text-align: center;
    padding: 40px 0;
    color: var(--muted);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.auth-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

/* =========================
   SHOP SORT
========================= */

.shop-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-sort-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.shop-sort-select {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    cursor: pointer;
}

@media (max-width: 640px) {
    .shop-sort-wrap {
        width: 100%;
        justify-content: flex-end;
    }
}

/* =========================
   PRODUCT ACTION BUTTONS (cart + wishlist)
========================= */

.product-action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.product-cart-btn {
    flex: 1;
    min-width: 140px;
    background: var(--black);
    color: var(--gold-light);
    border: 1px solid var(--black);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 13px 18px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.product-cart-btn:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--white);
}

.product-wishlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 13px 16px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.product-wishlist-btn svg {
    width: 18px;
    height: 18px;
}

.product-wishlist-btn:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.product-wishlist-btn.is-active {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.product-wishlist-btn.is-active svg {
    fill: var(--gold-dark);
}

/* =========================
   CHECKOUT
========================= */

.checkout-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 22px;
    align-items: start;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkout-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkout-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 2px;
}

.auth-textarea {
    resize: vertical;
    min-height: 74px;
    font-family: inherit;
}

.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.checkout-back-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 0;
    text-align: center;
    transition: color 0.15s ease;
}

.checkout-back-link:hover {
    color: var(--gold-dark);
}

.checkout-summary {
    background: #FAFAF8;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 110px;
}

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

.checkout-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.checkout-summary-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.checkout-summary-item-name {
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkout-summary-item-qty {
    color: var(--muted);
    font-size: 12px;
}

.checkout-summary-item-price {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.checkout-totals {
    border-top: 1px dashed var(--border);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text);
}

.checkout-total-row-final {
    font-size: 15px;
    color: var(--black);
}

.checkout-total-row-final strong {
    font-size: 17px;
    color: var(--gold-dark);
}

.checkout-payment-note {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 10px 12px;
}

.checkout-error {
    font-size: 13px;
    background: #FDF3EC;
    border: 1px solid #F1C7B8;
    color: #C0392B;
    border-radius: 10px;
    padding: 12px 14px;
    line-height: 1.7;
}

@media (max-width: 860px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
    }
}

/* =========================
   ORDER CONFIRMATION
========================= */

.confirmation-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.confirmation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.confirmation-order-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--black);
}

.confirmation-status {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-dark);
    background: #FBF6E8;
    border: 1px solid #EFDFB0;
    border-radius: 999px;
    padding: 6px 14px;
}

.confirmation-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.confirmation-detail {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 14px;
}

.confirmation-detail-label {
    color: var(--muted);
    min-width: 110px;
    font-size: 13px;
}

.confirmation-detail-value {
    color: var(--text);
    font-weight: 600;
}

.confirmation-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

/* =========================
   TRACK ORDER
========================= */

.track-form {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.track-loading,
.track-error {
    text-align: center;
    padding: 30px 0;
}

.track-error {
    color: #C0392B;
    font-size: 14px;
}

.track-status-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 5px 12px;
}

.track-status-new,
.track-status-confirmed {
    background: #EAF1FB;
    color: #1D5BBF;
}

.track-status-processing,
.track-status-ready_to_ship {
    background: #FBF3E0;
    color: #9A6B00;
}

.track-status-shipped {
    background: #EAF7EF;
    color: #1E7E46;
}

.track-status-completed {
    background: #F0EAFB;
    color: #5B3FA8;
}

.track-status-cancelled {
    background: #FDEBEB;
    color: #C0392B;
}

.track-progress {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    margin: 8px 0 4px;
}

.track-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    text-align: center;
}

.track-step::before {
    content: "";
    position: absolute;
    top: 8px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--border);
}

.track-step:first-child::before {
    display: none;
}

.track-step-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border);
    position: relative;
    z-index: 1;
}

.track-step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.track-step.is-active .track-step-dot {
    background: var(--gold);
    border-color: var(--gold-dark);
}

.track-step.is-active .track-step-label {
    color: var(--black);
}

.track-progress.is-cancelled .track-step-dot {
    background: #C0392B;
    border-color: #C0392B;
}

.track-progress.is-cancelled .track-step-label {
    color: #C0392B;
}

/* =========================
   ACCOUNT AREA
========================= */

.account-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 24px;
    align-items: start;
}

.account-nav {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 110px;
}

.account-nav-link {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    padding: 11px 14px;
    border-radius: 8px;
    border: none;
    background: none;
    font-family: inherit;
    text-align: right;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.account-nav-link:hover {
    background: #FAF8F2;
    color: var(--gold-dark);
}

.account-nav-link.is-active {
    background: var(--black);
    color: var(--gold-light);
}

.account-nav-logout {
    color: #C0392B;
}

.account-nav-logout:hover {
    background: #FDF3EC;
    color: #C0392B;
}

.account-nav-divider {
    border-top: 1px solid var(--border);
    margin: 8px 0;
}

.account-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.account-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.account-profile-summary {
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--black);
    color: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.account-profile-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
}

.account-profile-email {
    font-size: 13px;
    color: var(--muted);
}

.account-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.account-quick-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: #FAFAF8;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.account-quick-link:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.account-loading,
.account-empty {
    text-align: center;
    padding: 26px 0;
    color: var(--muted);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.account-orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #FAFAF8;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px 16px;
    transition: border-color 0.15s ease;
}

.account-order-row:hover {
    border-color: var(--gold);
}

.account-order-row-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.account-order-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
}

.account-order-date {
    font-size: 12px;
    color: var(--muted);
}

.account-order-row-side {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-order-total {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-dark);
}

/* =========================
   ADDRESSES
========================= */

.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.address-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.address-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.address-card-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
}

.address-card-actions {
    display: flex;
    gap: 8px;
}

.address-edit-btn,
.address-delete-btn {
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 5px 10px;
    cursor: pointer;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.15s ease, color 0.15s ease;
}

.address-edit-btn:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.address-delete-btn {
    color: #C0392B;
}

.address-delete-btn:hover {
    border-color: #C0392B;
    background: #FDF3EC;
}

.address-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.address-card-line {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

.address-card-notes {
    color: var(--gold-dark);
}

/* =========================
   FAQ
========================= */

.faq-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-group-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    text-align: right;
    padding: 18px 22px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.faq-question:hover {
    color: var(--gold-dark);
}

.faq-icon {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
    content: "";
    position: absolute;
    background: var(--gold-dark);
    transition: transform 0.2s ease;
}

.faq-icon::before {
    top: 7px;
    left: 0;
    width: 16px;
    height: 2px;
}

.faq-icon::after {
    top: 0;
    left: 7px;
    width: 2px;
    height: 16px;
}

.faq-item.is-open .faq-icon::after {
    transform: scaleY(0);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.is-open .faq-answer {
    max-height: 400px;
}

.faq-answer p {
    padding: 0 22px 18px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--text);
}

/* =========================
   CONTACT
========================= */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
}

.contact-block-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 6px;
}

.contact-block-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.8;
}

.contact-block-text a {
    color: var(--gold-dark);
    font-weight: 600;
}

.contact-block-text a:hover {
    text-decoration: underline;
}

.contact-form-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.contact-form-wrap .contact-block-title {
    margin-bottom: 16px;
}

.contact-hint {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.7;
    text-align: center;
}

@media (max-width: 860px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   ABOUT FEATURES
========================= */

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    /* Definite width: prevents auto-fit from mis-counting tracks
       when the grid is a stretched flex item (caused horizontal
       scroll on phones) */
    width: 100%;
}

.about-feature {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 26px 22px;
    text-align: center;
}

.about-feature-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #FAF8F2;
    border: 1px solid var(--border);
    color: var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-feature-icon svg {
    width: 26px;
    height: 26px;
}

.about-feature-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 6px;
}

.about-feature-text {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.8;
}

/* =========================
   SHIPPING POLICY VALUES
========================= */

.shipping-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin: 10px 0;
}

.shipping-value-card {
    background: #FAFAF8;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shipping-value-label {
    font-size: 13px;
    color: var(--muted);
}

.shipping-value-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-dark);
}

.shipping-note {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.8;
}

.auth-footer-link {
    color: var(--gold-dark);
    font-weight: 600;
}

/* =========================
   RESPONSIVE — ACCOUNT + NEW PAGES
========================= */

@media (max-width: 860px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .account-nav-divider {
        display: none;
    }

    .account-nav-link {
        padding: 9px 12px;
        font-size: 13px;
    }

    .info-container {
        padding: 32px 16px 56px;
    }

    .page-hero {
        padding: 44px 16px 28px;
    }

    .confirmation-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================
   AI ASSISTANT (تحتاج مساعدة؟)
========================= */

.dcai-root {
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
}

.dcai-root > * {
    pointer-events: auto;
}

/* Floating button */

.dcai-fab {
    position: fixed;
    left: 20px;
    bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
    color: var(--black);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(212, 175, 55, 0.45);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.dcai-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.6);
}

.dcai-fab-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
}

.dcai-fab-icon svg {
    width: 100%;
    height: 100%;
}

@keyframes dcaiPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.55);
    }

    50% {
        box-shadow: 0 0 0 14px rgba(212, 175, 55, 0);
    }
}

.dcai-pulse {
    animation: dcaiPulse 2.2s ease-in-out infinite;
}

/* Backdrop (mobile only) */

.dcai-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Chat panel */

.dcai-panel {
    position: fixed;
    left: 20px;
    bottom: 88px;
    width: min(384px, calc(100vw - 40px));
    height: min(600px, calc(100dvh - 120px));
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(17, 17, 17, 0.25);
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    visibility: hidden;
    transition:
        opacity 0.28s ease,
        transform 0.28s ease,
        visibility 0.28s;
}

.dcai-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* Header */

.dcai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #191919, #000);
    color: var(--white);
}

.dcai-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.dcai-avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    color: var(--black);
}

.dcai-avatar svg {
    width: 24px;
    height: 24px;
}

.dcai-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.dcai-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
}

.dcai-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
}

.dcai-close {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-size: 17px;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.dcai-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--gold-light);
}

/* Messages area */

.dcai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #faf8f2;
    scroll-behavior: smooth;
}

.dcai-msg {
    max-width: 84%;
    padding: 11px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.7;
    word-wrap: break-word;
    animation: dcaiMsgIn 0.25s ease;
}

@keyframes dcaiMsgIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dcai-msg-bot {
    align-self: flex-start;
    background: var(--white);
    border: 1px solid var(--border);
    border-bottom-right-radius: 4px;
}

.dcai-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--black);
    font-weight: 500;
    border-bottom-left-radius: 4px;
}

/* Typing indicator */

.dcai-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 14px 16px;
}

.dcai-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--muted);
    animation: dcaiTypingBounce 1.2s infinite ease-in-out;
}

.dcai-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.dcai-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes dcaiTypingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Suggestion chips */

.dcai-suggestions {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    background: #faf8f2;
    border-top: 1px solid var(--border);
    scrollbar-width: none;
}

.dcai-suggestions::-webkit-scrollbar {
    display: none;
}

.dcai-chip {
    flex-shrink: 0;
    padding: 8px 14px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: var(--white);
    color: var(--text);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.dcai-chip:hover {
    background: var(--gold);
    color: var(--black);
}

/* Input bar */

.dcai-inputbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.dcai-input {
    flex: 1;
    min-width: 0;
    padding: 11px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dcai-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.dcai-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--black);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        filter 0.2s ease;
}

.dcai-send svg {
    width: 19px;
    height: 19px;
}

.dcai-send:hover:not(:disabled) {
    transform: scale(1.06);
}

.dcai-send:disabled {
    filter: grayscale(0.6);
    cursor: not-allowed;
}

/* Mobile — full-screen drawer */

html.dcai-lock body {
    overflow: hidden;
}

@media (max-width: 640px) {

    /* FAB: icon only on narrow screens */
    .dcai-fab-text {
        display: none;
    }

    .dcai-fab {
        left: 16px;
        bottom: 16px;
        padding: 14px;
        min-width: auto;
        gap: 0;
        font-size: 14px;
    }

    .dcai-fab-icon {
        width: 26px;
        height: 26px;
    }

    /* Full-screen drawer on mobile */
    .dcai-panel {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        border: none;
        transform: none;
        box-shadow: none;
    }

    .dcai-panel.is-open {
        transform: none;
    }

    .dcai-header {
        padding: 13px 14px;
        padding-top: calc(13px + env(safe-area-inset-top, 0px));
    }

    .dcai-avatar {
        width: 38px;
        height: 38px;
    }

    .dcai-title {
        font-size: 14.5px;
    }

    /* Messages: more padding, touch scroll */
    .dcai-messages {
        min-height: 0;
        padding: 14px 12px;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .dcai-msg {
        max-width: 88%;
        font-size: 14.5px;
        padding: 11px 14px;
        line-height: 1.65;
    }

    /* RTL Arabic text in bot bubbles */
    .dcai-msg-bot[dir="rtl"] {
        text-align: right;
        direction: rtl;
    }

    /* LTR French text in bot bubbles */
    .dcai-msg-bot[dir="ltr"] {
        text-align: left;
        direction: ltr;
    }

    /* Fix bullet list alignment in RTL */
    .dcai-msg-bot[dir="rtl"] br + * {
        direction: rtl;
    }

    /* Suggestion chips: horizontal scrollable strip, no wrap */
    .dcai-suggestions {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px 10px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .dcai-suggestions::-webkit-scrollbar {
        display: none;
    }

    .dcai-chip {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 12.5px;
        padding: 7px 11px;
    }

    /* Input bar: pinned to bottom, centered */
    .dcai-inputbar {
        gap: 8px;
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        align-items: center;
    }

    /* 16px+ prevents iOS Safari from zooming the page on focus */
    .dcai-input {
        font-size: 16px;
        padding: 11px 14px;
    }

    .dcai-send {
        width: 44px;
        height: 44px;
    }

    .dcai-send svg {
        width: 20px;
        height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .dcai-fab,
    .dcai-panel,
    .dcai-msg,
    .dcai-pulse {
        animation: none;
        transition: none;
    }
}

/* =========================
   SMALL SCREENS — INFO PAGES (about / faq / policies)
========================= */

@media (max-width: 480px) {

    .page-hero {
        padding: 36px 16px 24px;
    }

    .page-hero-title {
        font-size: 24px;
    }

    .info-container {
        padding: 24px 14px 48px;
        gap: 14px;
    }

    .info-block {
        padding: 20px 18px;
    }

    /* Stack the feature cards on narrow phones */
    .about-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* =========================
   AUTH POPUP (login required)
======================== */

body.auth-popup-open {
    overflow: hidden;
}

.auth-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 17, 17, 0.55);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.auth-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.auth-popup {
    position: relative;
    width: min(400px, 100%);
    background: var(--white);
    border-radius: 14px;
    padding: 34px 28px 28px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(14px) scale(0.97);
    transition: transform 0.25s ease;
}

.auth-popup-overlay.is-open .auth-popup {
    transform: none;
}

.auth-popup-close {
    appearance: none;
    border: 0;
    background: transparent;
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--muted);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.auth-popup-close:hover {
    background: #F4F4F4;
    color: var(--black);
}

.auth-popup-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.14);
    color: var(--gold-dark);
}

.auth-popup-icon svg {
    width: 28px;
    height: 28px;
}

.auth-popup-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
}

.auth-popup-text {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.9;
}

.auth-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
}

.auth-popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition:
        filter 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.auth-popup-btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--black);
}

.auth-popup-btn-primary:hover {
    filter: brightness(1.05);
}

.auth-popup-btn-secondary {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--border);
}

.auth-popup-btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}

/* =========================
   LANGUAGE SWITCHER
========================= */

.language-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.language-code {
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    transition: color 0.15s ease;
}

.language-trigger:hover .language-code {
    color: var(--gold-dark);
}

/* Floating dropdown card */
.language-dropdown .dropdown-menu,
#mobileLanguageMenu {
    background: #FFFFFF;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 6px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: hidden;
}

.language-dropdown .dropdown-menu {
    width: 172px;
    right: auto;
    left: -24px;
}

.language-options-mobile {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.language-dropdown .dropdown-menu .language-option,
#mobileLanguageMenu .language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    margin: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #4A5568;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: start;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.language-dropdown .dropdown-menu .language-option:hover,
#mobileLanguageMenu .language-option:hover {
    background-color: #F7FAFC;
    color: #4A5568;
}

.language-dropdown .dropdown-menu .language-option.is-active,
#mobileLanguageMenu .language-option.is-active {
    background-color: rgba(212, 163, 115, 0.12);
    color: #D4A373;
    font-weight: 700;
}

.language-dropdown .dropdown-menu .language-option.is-active::after,
#mobileLanguageMenu .language-option.is-active::after {
    content: "✓";
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: #D4A373;
}

#mobileLanguageDropdown .language-icon {
    width: 20px;
    height: 20px;
}

/* =========================
   LTR (FRENCH) OVERRIDES
   Physical properties that
   assume RTL layout.
========================= */

[dir="ltr"] .cart-drawer {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.18);
}

[dir="ltr"] .cart-drawer.is-open {
    transform: translateX(0);
}

[dir="ltr"] .mobile-drawer {
    right: auto;
    left: 0;
    border-left: 0;
    border-right: 1px solid var(--border);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.16);
    transform: translateX(-100%);
}

[dir="ltr"] .mobile-drawer.is-open {
    transform: translateX(0);
}

[dir="ltr"] .mobile-drawer .dropdown .dropdown-menu {
    padding: 0 0 0 12px;
}

[dir="ltr"] .nav-icon .cart-count {
    left: auto;
    right: -10px;
}

[dir="ltr"] .category-fade-hint {
    left: auto;
    right: 0;
    background: linear-gradient(to left, var(--white), transparent);
}

[dir="ltr"] .product-badge {
    right: auto;
    left: 12px;
}

[dir="ltr"] .hero-arrow-prev {
    right: auto;
    left: 18px;
}

[dir="ltr"] .hero-arrow-next {
    left: auto;
    right: 18px;
}

[dir="ltr"] .home-category-arrow-prev {
    right: auto;
    left: 0;
}

[dir="ltr"] .home-category-arrow-next {
    left: auto;
    right: 0;
}

[dir="ltr"] .info-list li {
    padding-right: 0;
    padding-left: 22px;
    text-align: left;
}

[dir="ltr"] .info-list li::before {
    right: auto;
    left: 4px;
}

[dir="ltr"] .track-step::before {
    right: auto;
    left: -50%;
}

[dir="ltr"] .dcai-fab {
    left: auto;
    right: 20px;
}

[dir="ltr"] .dcai-panel {
    left: auto;
    right: 20px;
}

[dir="ltr"] .category-subitem {
    padding-right: 14px;
    padding-left: 28px;
}

[dir="ltr"] .nav-menu .dropdown-menu:not(.account-menu):not(.language-menu) {
    right: auto;
    left: -24px;
}

[dir="ltr"] .category-item:hover .category-arrow {
    transform: translateX(4px);
}

[dir="ltr"] .language-dropdown .dropdown-menu {
    left: auto;
    right: -24px;
}

[dir="ltr"] .nav-drawer-item,
[dir="ltr"] .account-item-danger,
[dir="ltr"] .auth-brand,
[dir="ltr"] .auth-title,
[dir="ltr"] .auth-subtitle,
[dir="ltr"] .auth-error,
[dir="ltr"] .auth-success,
[dir="ltr"] .auth-field label,
[dir="ltr"] .auth-input,
[dir="ltr"] .auth-footer,
[dir="ltr"] .account-nav-link,
[dir="ltr"] .category-card-info {
    text-align: left;
}

/* ================= Store Closed (settings.store.is_open) ================= */

.store-closed-banner {
    background: #8c3b2e;
    color: #ffffff;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1.6;
}

.store-closed-banner.is-flashing {
    animation: storeBannerFlash 0.9s ease;
}

@keyframes storeBannerFlash {
    0%,
    100% {
        background: #8c3b2e;
    }
    50% {
        background: #b04a37;
    }
}

html.store-closed #addToCartButton,
html.store-closed [data-add-cart-id],
html.store-closed #cartCheckoutBtn {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
}

/* ================= AI assistant product cards ================= */

.dcai-products {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    -webkit-overflow-scrolling: touch;
}

.dcai-product-card {
    flex: 0 0 148px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e8e3da;
    border-radius: 12px;
    padding: 10px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.dcai-product-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dcai-product-img {
    display: block;
    width: 100%;
    height: 96px;
    border-radius: 8px;
    overflow: hidden;
    background: #f4efe8;
}

.dcai-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dcai-product-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #c9bfae;
}

.dcai-product-noimg svg {
    width: 28px;
    height: 28px;
}

.dcai-product-name {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    min-height: 2.9em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dcai-product-price {
    font-size: 13px;
    color: #5a4632;
}

.dcai-product-price del {
    margin-inline-start: 6px;
    color: #b0a795;
    font-weight: 400;
    font-size: 11.5px;
}

.dcai-product-avail {
    font-size: 11px;
    font-weight: 700;
}

.dcai-product-avail.is-ok {
    color: #2e7d43;
}

.dcai-product-avail.is-out {
    color: #b04a37;
}

.dcai-product-link {
    display: block;
    text-align: center;
    background: #d4a373;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 8px;
    border-radius: 8px;
    margin-top: auto;
}

.dcai-product-card.is-unavailable .dcai-product-link {
    background: #b0a795;
}

/* Mobile overrides — must come after base card rules */
@media (max-width: 640px) {

    .dcai-products {
        gap: 8px;
    }

    .dcai-product-card {
        flex: 0 0 130px;
        padding: 8px;
        gap: 5px;
    }

    .dcai-product-img {
        height: 80px;
        border-radius: 6px;
    }

    .dcai-product-name {
        font-size: 12px;
    }

    .dcai-product-price {
        font-size: 12.5px;
    }

    .dcai-product-avail {
        font-size: 10.5px;
    }

    .dcai-product-link {
        font-size: 11px;
        padding: 6px;
    }

    .dcai-suggestions {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .dcai-chip {
        font-size: 12.5px;
        padding: 7px 11px;
        white-space: nowrap;
    }
}

/* =========================
   RESPONSIVE PRODUCT GRID — MOBILE-FIRST FIXES
   Ensures 2 columns on mobile, no horizontal scroll,
   cards shrink correctly, images & buttons stay inside.
   ========================= */

/* Outer containers must not trigger horizontal scroll */
.shop-page,
.home-products-inner,
.info-container {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.info-container {
    width: min(1040px, calc(100% - 24px));
    padding: 32px 12px 48px;
}

@media (min-width: 480px) {
    .info-container {
        width: min(1040px, calc(100% - 32px));
        padding: 36px 16px 56px;
    }
}

@media (min-width: 768px) {
    .info-container {
        width: min(1040px, calc(100% - 32px));
        padding: 40px 20px 64px;
    }
}

@media (min-width: 1024px) {
    .info-container {
        width: min(1040px, 100%);
        max-width: 1040px;
        padding: 48px 24px 72px;
    }
}

/* All product grids share the same mobile-first behavior */
.products-grid,
.home-products-grid {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure cards and their children can shrink (prevent min-content overflow) */
.product-card,
.product-card-main,
.product-card-actions,
.product-info,
.product-price-row,
.product-name,
.product-price,
.product-old-price,
.product-add-cart {
    min-width: 0;
    max-width: 100%;
}

.product-media,
.product-media img,
.product-placeholder {
    max-width: 100%;
}

/* Prevent long words / prices from forcing overflow */
.product-name,
.product-price,
.product-old-price {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Shop header should wrap gracefully on narrow screens */
.shop-header {
    min-width: 0;
}

.shop-header > * {
    min-width: 0;
}

/* Very small phones (320px) — guarantee fit without scroll */
@media (max-width: 360px) {
    .shop-page,
    .home-products-inner {
        width: calc(100% - 20px);
    }

    .products-grid,
    .home-products-grid {
        gap: 10px;
    }

    .product-info {
        padding: 8px 7px 9px;
    }

    .product-add-cart {
        font-size: 11.5px;
        padding: 8px 6px;
    }
}
