/* Regular / Medium weight */
@font-face {
    font-family: 'IRANSansX';
    src: url("../fonts/IRANSansX Medium.bbfb53c72304.woff2") format('woff2');
    font-weight: 400 500;
    font-display: swap;
}


/* The brand flourish: a small teal+gold tile motif, used sparingly */


:root {
    --color-bg: #F7F6F0;
    --color-card: #FDFCFA;
    --color-text: #1C1C1C;
    --color-accent: #3FBAC2;
    --color-accent-dark: #2E9BA1;
    --color-gold: #B98B2A;
    --color-sale: #9B2B32;
    --color-border: #E5E3DF;
    --spacing-unit: 8px;
}

* {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

img, svg, video { max-width: 100%; }

body {
    font-family: 'Noto Sans Arabic', Tahoma, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("../images/bg-texture.e329a9ad5ad2.jpg");
    background-repeat: repeat;
    background-size: 400px;
    opacity: 0.2;
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 16px;
    border-bottom: 1px solid var(--color-border);
}

.header-icons {
    display: flex;
    gap: 12px;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--color-accent);
}

.icon-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 500;
    font-size: 15px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hamburger-icon {
    font-size: 18px;
    line-height: 1;
}
.search-wrap {
    position: relative;
    flex: 1;
    max-width: 480px;
    margin-inline: 24px;
}

.search-bar {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: none;
    border-radius: 8px;
    background: #E3E1DC;
    font-family: inherit;
    font-size: 14px;
}

.search-bar::placeholder {
    color: #777;
}

.search-icon-btn {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.search-icon {
    width: 18px;
    height: 18px;
    color: #555;
}

.nav-links {
    display: flex;
    gap: 24px;
    font-weight: 500;
}

/* ---------- Category chips (shop page) ---------- */
.category-chip-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 32px;
}

.category-chip {
    padding: 6px 8px;
    border: 1px solid var(--color-border);
    color: #777;
    font-size: 12px;
    text-align: center;
}

.category-chip.active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
}

/* ---------- Shop layout ---------- */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;   /* first column = sidebar, on the right in RTL */
    gap: 48px;
    align-items: start;
    padding-block: 32px;
}

.shop-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
}

.breadcrumb {
    color: #888;
    font-size: 13px;
    margin: 4px 0 32px;
}

.filters-heading {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
}

/* ---------- Size buttons ---------- */
.size-grid {
    display: flex;
    gap: 6px;
    direction: ltr;          /* design reads XS ... 2X from left to right */
    margin-bottom: 20px;
}

.size-btn {
    position: relative;
    cursor: pointer;
}

.size-btn input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;              /* real checkbox stays clickable but invisible */
    cursor: pointer;
}

.size-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #999;
    font-size: 13px;
}

.size-btn input:checked + span {
    background: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
}

.size-btn input:focus-visible + span {
    outline: 2px solid var(--color-accent);
}

/* ---------- Accordions ---------- */
.filter-accordion {
    border-top: 1px dashed var(--color-border);
    padding-block: 14px;
}

.filter-accordion summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.filter-accordion summary::-webkit-details-marker {
    display: none;
}

.filter-accordion summary::after {
    content: '‹';
    font-size: 18px;
    transition: transform 0.2s;
}

.filter-accordion[open] summary::after {
    transform: rotate(90deg);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
    font-size: 13px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

/* Hide the native box but keep it functional (clickable, keyboard-accessible) */
.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid #bbb;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}

.filter-option input[type="checkbox"] {
    border-radius: 4px;
}

.filter-option input[type="radio"] {
    border-radius: 50%;
}

/* Checkbox: custom checkmark drawn with a rotated box shape */
.filter-option input[type="checkbox"]:checked {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.filter-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Radio: custom filled dot */
.filter-option input[type="radio"]:checked {
    border-color: var(--color-accent);
}

.filter-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent);
}

.filter-option input:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.filter-option:hover input[type="checkbox"],
.filter-option:hover input[type="radio"] {
    border-color: var(--color-accent);
}

.swatch-lg {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
}

.price-inputs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.price-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color-border);
    background: #fff;
    font-family: inherit;
}

/* ---------- Results ---------- */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}

.select-wrap {
    position: relative;
    display: inline-block;
}

.sort-select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 140px;
    padding: 8px 40px 8px 20px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: #fff;
    color: var(--color-text);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.sort-select:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.select-arrow {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #777;
    pointer-events: none;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    width: 100%;
}

.empty-state {
    grid-column: 1 / -1;
    padding-block: 64px;
    text-align: center;
    color: #777;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    font-size: 14px;
}

.page-link.current {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.page-gap {
    align-self: center;
    padding-inline: 4px;
    color: #888;
}

@media (max-width: 900px) {
    .shop-layout { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Section header ---------- */
.carousel-section {
    margin-block: 32px;
    padding: 28px;
    border-radius: 16px;
    background: var(--color-card);
    border-top: 2px solid var(--color-border);
}
.carousel-section--blue { border-top-color: var(--color-accent); }
.carousel-section--gold { border-top-color: var(--color-gold); }

.shop-results-card {
    padding: 28px;
    border-radius: 16px;
    background: var(--color-card);
    border-top: 2px solid var(--color-accent);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.section-heading {
    margin: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.section-kicker {
    font-size: 24px;
    font-weight: 700;
}

.section-title {
    font-size: 44px;
    font-weight: 800;
}

.section-count {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a8c;
    margin-inline-start: 6px;
    vertical-align: super;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 999px;
    background: var(--color-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(63, 186, 194, 0.3);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.view-all-btn::after {
    content: '←';
    font-size: 13px;
    line-height: 1;
    transition: transform 0.15s;
}

.view-all-btn:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(63, 186, 194, 0.4);
}

.view-all-btn:hover::after {
    transform: translateX(-3px);
}

/* ---------- Carousel ---------- */
.carousel {
    --gap: 20px;
}

.carousel-track {
    display: flex;
    gap: var(--gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;          /* Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}


.carousel {
    position: relative;
    padding-inline: 26px;   /* reserves room so buttons sit beside the cards, not on top of them */
}

.carousel-edge-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 26px;
    height: 44px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.carousel-edge-btn--left {
    left: 0;
    border-radius: 999px 0 0 999px;   /* rounds the outer (left) side */
}

.carousel-edge-btn--right {
    right: 0;
    border-radius: 0 999px 999px 0;   /* rounds the outer (right) side */
}

.carousel-edge-btn:hover {
    background: var(--color-accent);
    color: #fff;
}



/* ---------- Product card ---------- */
.product-card {
    /* width = (track width - total gaps) / cards per view */
    flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
    scroll-snap-align: start;
    transition: transform 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-card:hover .product-card__image img {
    transform: scale(1.05);
}

.product-card__image {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: #e4e2ea;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card__placeholder {
    width: 100%;
    height: 100%;
    background: #e4e2ea;
}

.product-card__info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
}

.product-card__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.product-card__price {
    margin: 2px 0 0;
    font-size: 13px;
}

.swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-inline-start: 6px;
    vertical-align: middle;
}

.color-more {
    font-size: 11px;
    color: #777;
    margin-inline-start: 2px;
}

.quick-add-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(63, 186, 194, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.quick-add-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(63, 186, 194, 0.45);
}

.quick-add-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .carousel-edge-btn { display: none; }

    .carousel { --per-view: 2 !important; }  /* overrides the inline value on small screens */
    .section-title { font-size: 32px; }
    .nav-shop-link,
    .category-text { display: none; }

    .hamburger-icon { font-size: 26px; }

    .category-link {
        width: 44px;
        height: 40px;
        justify-content: center;
    }

    .nav-links { gap: 0; }
}

.site-logo {
    height: 100px;   /* was 56px */
    width: auto;
}

/* ---------- Product detail ---------- */
.pdp {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: start;
    padding-block: 32px;
}

.pdp-gallery {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.pdp-main-image {
    flex: 1;
    aspect-ratio: 4 / 5;
    background: #e4e2ea;
    overflow: hidden;
}

.pdp-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 72px;
    flex-shrink: 0;
}

.pdp-thumb {
    padding: 0;
    border: 1px solid transparent;
    background: none;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    cursor: pointer;
}

.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-thumb.active {
    border-color: var(--color-text);
}

.pdp-panel {
    padding: 28px;
    border-top: 2px solid var(--color-accent);
    background: var(--color-card);
}

.pdp-panel .breadcrumb {
    margin: 0;
}

.pdp-title {
    font-size: 22px;
    font-weight: 800;
    margin: 8px 0 12px;
}

.pdp-desc {
    font-size: 14px;
    color: #555;
    margin: 0 0 20px;
}

/* ---------- Variant selector (product page + popup) ---------- */
.vs-price {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
}

.vs-group {
    margin-bottom: 20px;
}

.vs-label {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px;
}

.vs-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vs-color {
    display: inline-block;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #bbb;
    outline-offset: 3px;
    cursor: pointer;
}

.vs-color.is-selected {
    outline: 2px solid var(--color-text);
}

.vs-color.is-unavailable {
    opacity: 0.35;
}

.vs-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    direction: ltr;   /* XS ... 2X reads left to right, like the shop filter */
}

.vs-size {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 38px;
    padding: 0 8px;
    border: 1px solid #999;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.vs-size.is-selected {
    background: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
}

.vs-size:disabled {
    color: #bbb;
    border-color: #ddd;
    text-decoration: line-through;
    cursor: not-allowed;
}

.vs-message {
    min-height: 1.4em;
    margin: 0 0 8px;
    font-size: 13px;
    color: #b45309;          /* amber: low-stock warning */
}

.vs-message.is-error   { color: #b00020; }
.vs-message.is-success { color: #0a7a3d; }

.vs-add-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: var(--color-accent);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.vs-add-btn:disabled {
    background: #d9d9d9;
    color: #888;
    cursor: not-allowed;
}

/* ---------- Quick-add popup ---------- */
.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow: auto;
    padding: 32px 24px 24px;
    background: #fff;
}

.modal-close {
    position: absolute;
    top: 8px;
    inset-inline-start: 12px;
    border: none;
    background: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.modal-product {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.modal-product img {
    width: 64px;
    height: 80px;
    object-fit: cover;
}

.modal-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
}

.modal-link {
    font-size: 13px;
    color: var(--color-accent);
}

body.modal-open {
    overflow: hidden;
}

/* ---------- Header cart badge ---------- */
.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--color-text);
    color: #fff;
    font-size: 11px;
}

.cart-badge[hidden] {
    display: none;
}

@media (max-width: 900px) {
    .pdp { grid-template-columns: 1fr; }
}

/* ---------- Forms / auth ---------- */
.auth-card {
    max-width: 420px;
    margin: 48px auto;
    padding: 32px 28px;
    border-top: 3px solid var(--color-gold);
    background: var(--color-card);
}

.auth-title { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.auth-hint  { font-size: 14px; color: #666; margin: 0 0 24px; }
.auth-links { margin-top: 16px; font-size: 13px; text-align: center; }

.field-row   { margin-bottom: 16px; }
.field-label { display: block; font-size: 13.5px; font-weight: 700; color: #444; margin: 0 0 8px; }

.field-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(63, 186, 194, 0.15);
}

textarea.field-input { resize: vertical; }
.field-input[readonly] { background: #f0efed; color: #666; }
.otp-input { text-align: center; letter-spacing: 8px; font-size: 20px; }
.field-error { margin: 6px 0 0; font-size: 13px; color: #b00020; }

.btn-primary {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--color-accent);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: var(--color-accent-dark);
}
.text-link { color: var(--color-accent); font-size: 13px; }

.link-btn {
    padding: 0;
    border: none;
    background: none;
    color: #b00020;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

/* ---------- Flash messages ---------- */
.messages { padding-top: 16px; }

.notice {
    margin-bottom: 8px;
    padding: 12px 16px;
    border: 1px solid;
    font-size: 14px;
}

.notice-success { background: #e8f6ee; border-color: #0a7a3d; color: #0a7a3d; }
.notice-error   { background: #fdeaea; border-color: #b00020; color: #b00020; }
.notice-warning { background: #fff4e0; border-color: var(--color-gold); color: #8a6a1f; border-radius: 10px; }
.notice-info    { background: #eaf6f8; border-color: var(--color-accent); color: #1c6f76; }

/* ---------- Checkout ---------- */
.checkout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
    padding-block: 32px;
}

.checkout-box {
    padding: 28px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.6);
}

.summary-title { font-size: 18px; font-weight: 700; margin: 0 0 16px; }

.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-block: 10px;
    border-bottom: 1px dashed var(--color-border);
    font-size: 14px;
}

.summary-line small { color: #777; }

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-weight: 700;
}

/* ---------- Header account menu ---------- */
.account-menu { position: relative; }

.account-menu summary {
    list-style: none;
    cursor: pointer;
}

.account-menu summary::-webkit-details-marker { display: none; }

.account-dropdown {
    position: absolute;
    top: 48px;
    left: 0;               /* header icons sit at the left edge in RTL */
    z-index: 50;
    min-width: 170px;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    background: #fff;
}

.account-phone { margin: 0 0 8px; font-size: 13px; color: #555; }

/* ---------- Cart drawer ---------- */
.drawer {
    position: fixed;
    inset: 0;
    z-index: 110;
    visibility: hidden;
    transition: visibility 0s linear 0.25s;   /* stay visible while sliding out */
}

.drawer.is-open {
    visibility: visible;
    transition-delay: 0s;
}

.drawer .modal-backdrop {
    opacity: 0;
    transition: opacity 0.25s;
}

.drawer.is-open .modal-backdrop { opacity: 1; }

.drawer-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: min(400px, 100%);
    background: #fff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    transform: translateX(-100%);
    transition: transform 0.25s;
}

.drawer.is-open .drawer-panel { transform: translateX(0); }

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.drawer-header h2 { margin: 0; font-size: 18px; }

.drawer-close {
    border: none;
    background: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.drawer-message {
    margin: 0;
    padding: 0 20px;
    font-size: 13px;
    color: #b00020;
}

.drawer-message:not(:empty) { padding-top: 10px; }

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px 0;
}

.cart-lines { list-style: none; margin: 0; padding: 0; }

.cart-line {
    display: flex;
    gap: 12px;
    padding-block: 16px;
    border-bottom: 1px dashed var(--color-border);
}

.cart-line__img {
    width: 72px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    background: #e4e2ea;
}

.cart-line__info { flex: 1; min-width: 0; }
.cart-line__title { font-size: 14.5px; font-weight: 700; }
.cart-line__meta  { margin: 4px 0; font-size: 12px; color: #666; }
.cart-line__price { margin: 0; font-size: 13px; font-weight: 600; }
.cart-line__warn  { margin: 4px 0 0; font-size: 12px; color: #b45309; }

.cart-line__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--color-accent);
    border-radius: 999px;
    overflow: hidden;
}

.qty button {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    color: var(--color-accent);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.qty button:hover {
    background: var(--color-accent);
    color: #fff;
}

.qty span {
    min-width: 30px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.cart-footer {
    position: sticky;
    bottom: 0;
    padding: 16px 0 20px;
    background: #fff;
    border-top: 1px solid var(--color-border);
}
.cart-total {
    display: flex;
    justify-content: space-between;
    padding-top: 14px;
    font-size: 16px;
    font-weight: 700;
}

.cart-checkout { margin-top: 14px; }
.cart-empty { padding: 48px 0; text-align: center; color: #777; }

@media (max-width: 900px) {
    .checkout { grid-template-columns: 1fr; }
}

.dropdown-link {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--color-text);
}

.address-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.address-item {
    padding-block: 12px;
    border-bottom: 1px dashed var(--color-border);
    font-size: 14px;
}

.address-item:last-child {
    border-bottom: none;
}

.address-item {
    padding-block: 16px;
    border-bottom: 1px dashed var(--color-border);
}

.address-item:last-child {
    border-bottom: none;
}

.address-text {
    margin: 0 0 8px;
    font-size: 14px;
}

.address-edit-form textarea {
    margin-bottom: 8px;
}

.address-actions {
    display: flex;
    gap: 16px;
}

.link-btn--accent {
    color: var(--color-accent);
}

.category-menu {
    position: relative;
}

.category-menu summary {
    list-style: none;
    cursor: pointer;
}

.category-menu summary::-webkit-details-marker {
    display: none;
}

.category-dropdown {
    position: absolute;
    top: 40px;
    right: 0;              /* the trigger sits mid-header, so anchor the panel to its own right edge */
    z-index: 50;
    display: flex;
    flex-direction: column;
    min-width: 180px;
    padding: 10px 0;
    border: 1px solid var(--color-border);
    background: #fff;
}

.category-dropdown a {
    padding: 10px 20px;
    font-size: 14px;
}

.category-dropdown a:hover {
    background: var(--color-bg);
}

/* ---------- Dashboard layout ---------- */
.dash-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    padding-block: 32px;
}

.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 24px;
}

.dash-nav-link {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.dash-nav-link.active,
.dash-nav-link:hover {
    background: var(--color-accent-dark);
    color: #fff;
}

.dash-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dash-add-btn {
    width: auto;
    margin: 0;
    padding: 10px 20px;
}

/* ---------- Stat cards ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 24px 0 40px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--color-border);
    background: #fff;
}

.stat-value { font-size: 24px; font-weight: 800; }
.stat-label { font-size: 12px; color: #777; }
.stat-card--warn .stat-value { color: var(--color-gold); }
.stat-card--danger .stat-value { color: var(--color-sale); }
/* ---------- Tables ---------- */
.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dash-table th,
.dash-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
    text-align: right;
}

.dash-table-actions {
    display: flex;
    gap: 12px;
}

.badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
}

.badge--ok  { background: #e8f6ee; color: #0a7a3d; }
.badge--off { background: #f0efed; color: #777; }
.badge--gold { background: #f7eed9; color: var(--color-gold); }

/* ---------- Product form ---------- */
.pf-top-row {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 20px;
}

.pf-images-card {
    position: sticky;
    top: 24px;
}

.pf-rest {
    display: flex;
    flex-direction: column;
}

@media (max-width: 900px) {
    .pf-top-row {
        grid-template-columns: 1fr;
    }
    .pf-images-card {
        position: static;
    }
}

.pf-gallery {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.pf-main-preview {
    flex: 1;
    aspect-ratio: 1 / 1;
    background: #e4e2ea;
    overflow: hidden;
}

.pf-main-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pf-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 64px;
    flex-shrink: 0;
}

.pf-thumb {
    padding: 0;
    border: 1px solid transparent;
    background: none;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
}

.pf-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pf-thumb.active {
    border-color: var(--color-text);
}

.pf-existing-images {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.pf-existing-image-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.pf-existing-image-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.pf-image-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #444;
    cursor: pointer;
}

.pf-existing-image-remove {
    margin-inline-start: auto;
    font-size: 12px;
    color: #b00020;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.pf-new-image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.pf-staged-thumb {
    position: relative;
    width: 56px;
    height: 56px;
}

.pf-staged-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.pf-staged-remove {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: #b00020;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.pf-price-row {
    margin-top: 16px;
}



.pf-upload-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border: 1px dashed #999;
    background: #eceae5;
    font-size: 13px;
    cursor: pointer;
}

.field-row-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pf-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.pf-color-picker,
#pf-size-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    position: relative;
}

.pf-add-color,
.pf-add-size {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border: 1.5px dashed var(--color-accent);
    border-radius: 50%;
    background: none;
    color: var(--color-accent);
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-style 0.15s;
}

.pf-add-color:hover,
.pf-add-size:hover {
    background: var(--color-accent);
    border-style: solid;
    color: #fff;
}

.pf-color-option input,
.pf-size-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.pf-color-option input:checked + .vs-color {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

.pf-size-option input:checked + .vs-size {
    background: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
}

.pf-add-color-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1.5px solid var(--color-accent);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.pf-add-color-form input[type="text"] {
    width: 130px;
    border: none;
    outline: none;
    padding: 6px 4px;
    font-family: inherit;
    font-size: 12px;
    background: none;
}

.pf-add-color-form input[type="color"] {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.pf-add-color-form .link-btn--accent {
    padding: 6px 14px;
    border-radius: 18px;
    background: var(--color-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pf-stock-grid { overflow-x: auto; }

.pf-stock-input {
    width: 64px;
    padding: 6px;
    text-align: center;
}

.pf-stock-empty {
    font-size: 13px;
    color: #777;
}

.pf-final-price {
    font-size: 15px;
    font-weight: 700;
    margin: 4px 0 16px;
}

@media (max-width: 900px) {
    .dash-layout { grid-template-columns: 1fr; }
    .product-form-grid { grid-template-columns: 1fr; }
    .field-row-inline { grid-template-columns: 1fr; }
}

.price-original { text-decoration: line-through; color: #999; margin-inline-end: 6px; font-size: 12px; }
.price-final { color: var(--color-sale); font-weight: 700; }

.product-card__media {
    position: relative;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #555;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s, color 0.15s;
}

.wishlist-btn:hover {
    transform: scale(1.1);
}

.wishlist-btn:active svg {
    transform: scale(0.8);
}

.wishlist-btn svg {
    width: 17px;
    height: 17px;
    transition: transform 0.15s;
}

.wishlist-btn.is-liked {
    color: #c0392b;
}

.wishlist-btn.is-liked svg {
    fill: #c0392b;
    animation: heart-pop 0.3s ease;
}

@keyframes heart-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.vs-measurements {
    margin: 8px 0 0;
    font-size: 12px;
    color: #666;
    line-height: 1.6;
}

.stat-card--link {
    text-decoration: none;
    transition: transform 0.15s;
}

.stat-card--link:hover {
    transform: translateY(-2px);
}

.site-footer {
    margin-top: 48px;
    background: #1c1c1c;
    color: #ddd;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
    gap: 32px;
    padding-block: 48px;
}

.footer-logo {
    height: 48px;
    margin-bottom: 12px;
}

.footer-heading {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a,
.footer-text {
    font-size: 13px;
    color: #bbb;
    margin: 0;
}

.footer-col a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding-block: 16px;
    border-top: 1px solid #333;
    font-size: 12px;
    color: #888;
    text-align: center;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.pf-add-size {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    border: 1px dashed #999;
    background: none;
    font-size: 16px;
    cursor: pointer;
}

/* ---------- Dashboard form cards ---------- */
.pf-card {
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
    border-top: 2px solid var(--color-accent);
    border-radius: 10px;
    background: #fff;
}

.pf-card .field-row:last-child {
    margin-bottom: 0;
}

.pf-card .field-label {
    font-size: 13px;
    font-weight: 700;
    color: #444;
    text-transform: none;
    letter-spacing: 0;
}

/* ---------- Upload placeholder (no image yet) ---------- */
.pf-main-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.pf-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    min-height: 280px;
    background: linear-gradient(135deg, #f1f0ec 0%, #e8e6e0 100%);
    color: #a39f97;
}

.pf-upload-placeholder svg {
    flex-shrink: 0;
    width: 40px !important;
    height: 40px !important;
}

.pf-upload-placeholder span {
    font-size: 13px;
}

.pf-upload-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: 1.5px dashed var(--color-accent);
    border-radius: 10px;
    background: rgba(63, 186, 194, 0.06);
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.pf-upload-box:hover {
    background: rgba(63, 186, 194, 0.12);
}

.pf-upload-box svg {
    flex-shrink: 0;
    width: 18px !important;
    height: 18px !important;
}

.animated-details__content {
    overflow: hidden;
    transition: height 0.25s ease;
}
/* =====================================================================
   HEADER v2
   ===================================================================== */

.skip-link {
    position: absolute;
    top: -80px;
    inset-inline-start: 16px;
    z-index: 120;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--color-text);
    color: #fff;
    font-size: 13px;
}
.skip-link:focus { top: 8px; }
main:focus { outline: none; }

/* Sticky bar: transparent at the top of the page, frosted once you scroll */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    justify-content: flex-start;
    gap: 28px;
    padding-block: 12px;
    transition: transform 0.28s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-stuck {
    background: rgba(247, 246, 240, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 24px -20px rgba(0, 0, 0, 0.45);
}

.site-header.is-hidden { transform: translateY(-100%); }

/* ---------- Navigation ---------- */
.nav-links { flex-shrink: 0; gap: 26px; }

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-block: 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: color 0.15s;
}

.nav-link::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-link:hover { color: var(--color-accent-dark); }
.nav-link:hover::after,
.nav-link.is-active::after,
.category-menu[open] .nav-link::after { transform: scaleX(1); }

.menu-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

/* ---------- Search ---------- */
.search-wrap {
    flex: 1;
    min-width: 0;
    max-width: 640px;
    margin-inline: 0;
}

.search-bar {
    height: 44px;
    padding: 0 16px 0 44px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    background: #E8E6E0;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.search-bar:hover { background: #E3E1DB; }

.search-bar:focus {
    outline: none;
    background: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(63, 186, 194, 0.16);
}

.search-icon-btn {
    left: 4px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #666;
}

.search-icon-btn:hover,
.search-wrap:focus-within .search-icon-btn { color: var(--color-accent-dark); }

/* ---------- Icons ---------- */
.header-icons {
    margin-inline-start: auto;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.icon-btn:hover { background: rgba(63, 186, 194, 0.12); }

/* The cart is the one filled button: it's the primary action */
.icon-btn--primary { background: var(--color-accent); }
.icon-btn--primary img { filter: brightness(0) invert(1); }  /* remove if your cart icon is already white */
.icon-btn--primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); }

.cart-badge {
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    border: 2px solid var(--color-bg);
    border-radius: 11px;
    background: var(--color-text);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.cart-badge[hidden] { display: none; }

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border: 1.5px solid var(--color-accent);
    border-radius: 999px;
    color: var(--color-accent-dark);
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.login-btn img { width: 18px; height: 18px; }
.login-btn:hover { background: var(--color-accent); color: #fff; }
.login-btn:hover img { filter: brightness(0) invert(1); }

@media (max-width: 768px) {
    .login-btn { justify-content: center; width: 36px; height: 36px; padding: 0; }
    .login-btn__label { display: none; }
}

/* ---------- Keyboard focus ---------- */
.icon-btn:focus-visible,
.nav-link:focus-visible,
.login-btn:focus-visible,
.dropdown-link:focus-visible,
.category-dropdown a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* ---------- Dropdown panels ---------- */
.category-dropdown,
.account-dropdown {
    top: calc(100% + 10px);
    min-width: 210px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-card);
    box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.35);
}

.category-dropdown a {
    padding: 11px 18px;
    font-size: 14px;
}

.category-dropdown a:hover,
.dropdown-link:hover {
    background: rgba(63, 186, 194, 0.1);
    color: var(--color-accent-dark);
}

.account-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border);
}
.account-name { font-size: 14px; font-weight: 700; }
.account-phone { align-self: flex-start; margin: 0; font-size: 12px; color: #777; }

.account-dropdown form { margin: 0; }

.dropdown-link {
    display: block;
    width: 100%;
    margin: 0;
    padding: 11px 18px;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 13.5px;
    text-align: start;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.dropdown-link--danger { border-top: 1px solid var(--color-border); color: var(--color-sale); }
.dropdown-link--danger:hover { background: rgba(155, 43, 50, 0.08); color: var(--color-sale); }

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .nav-link::after,
    .search-bar,
    .icon-btn { transition: none; }
}

/* =====================================================================
   PRODUCT PAGE v2 + REVIEWS
   ===================================================================== */

.pdp-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 20px;
    font-size: 13px;
    color: #888;
}
.pdp-crumbs a:hover { color: var(--color-accent-dark); }

.pdp {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    padding-block: 20px 40px;
}

/* ---------- Gallery ---------- */
.pdp-gallery { display: flex; gap: 14px; align-items: flex-start; }

.pdp-main-image {
    position: relative;
    flex: 1;
    border-radius: 16px;
}

.pdp-thumbs { width: 74px; }

.pdp-thumb {
    border: 2px solid transparent;
    border-radius: 10px;
}
.pdp-thumb.active { border-color: var(--color-accent); }

.pdp-main-image .discount-badge {
    top: 14px;
    right: 14px;
    padding: 5px 12px;
    font-size: 13px;
}

/* ---------- Info panel ---------- */
.pdp-panel {
    position: sticky;
    top: 96px;
    padding: 30px;
    border: 1px solid var(--color-border);
    border-top: 2px solid var(--color-accent);
    border-radius: 16px;
    background: var(--color-card);
}

.pdp-title {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.4;
}

.pdp-rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
}
.pdp-rating strong { color: var(--color-text); }
.pdp-rating:hover { color: var(--color-accent-dark); }

.pdp-ship {
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    color: #666;
}

/* ---------- Price ---------- */
.vs-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    font-size: 28px;
    font-weight: 800;
}
.vs-price .price-final { font-size: 28px; }
.vs-price .price-original { margin: 0; font-size: 15px; font-weight: 500; }

.price-pill {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--color-sale);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Variant picker ---------- */
.vs-group { margin-bottom: 22px; }
.vs-label { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.vs-label span { font-weight: 500; color: #666; }

.pdp-panel .vs-colors { gap: 12px; }
.pdp-panel .vs-color {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 50%;
}

.pdp-panel .vs-sizes { gap: 10px; }
.pdp-panel .vs-size {
    min-width: 52px;
    height: 46px;
    border: 1.5px solid #cfcdc6;
    border-radius: 10px;
    background: #fff;
    font-weight: 600;
    transition: border-color 0.15s;
}
.pdp-panel .vs-size:hover:not(:disabled):not(.is-selected) { border-color: var(--color-text); }
.pdp-panel .vs-size:disabled { background: #f3f2ee; }

.pdp-panel .vs-measurements {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(63, 186, 194, 0.09);
    font-size: 13px;
    line-height: 1.9;
    color: #355b5e;
}
.pdp-panel .vs-measurements:empty { display: none; }

/* ---------- Add to cart row ---------- */
.vs-cta { display: flex; gap: 10px; margin-top: 8px; }

.vs-add-btn {
    flex: 1;
    width: auto;
    height: 54px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 16px;
    transition: background 0.15s;
}
.vs-add-btn:hover:not(:disabled) { background: var(--color-accent-dark); }

.wishlist-btn--pdp {
    position: static;
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
}
.wishlist-btn--pdp svg { width: 22px; height: 22px; }

/* ---------- Sections below ---------- */
.pdp-sections { display: grid; gap: 24px; margin-bottom: 48px; }

.pdp-section {
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-card);
}
.pdp-section__title { margin: 0 0 18px; font-size: 20px; font-weight: 800; }
.pdp-section__text { margin: 0; font-size: 14.5px; line-height: 2; color: #444; }

.table-scroll { overflow-x: auto; }
.size-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.size-table th,
.size-table td { padding: 12px 16px; border-bottom: 1px solid var(--color-border); text-align: center; }
.size-table thead th { background: rgba(0, 0, 0, 0.03); font-weight: 700; color: #555; }
.size-table tbody th { font-weight: 700; }
.size-table small { font-weight: 400; color: #888; }

/* ---------- Stars + reviews ---------- */
.stars { display: inline-flex; gap: 2px; }
.star { width: 16px; height: 16px; fill: #d9d6cd; stroke: none; }
.star.is-on { fill: var(--color-gold); }

.reviews-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.reviews-head .pdp-section__title { margin: 0; }
.reviews-summary { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #666; }
.reviews-score { font-size: 26px; font-weight: 800; color: var(--color-text); }

.reviews-note {
    margin: 0 0 22px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    font-size: 13.5px;
    color: #555;
}

.review-form {
    margin-bottom: 28px;
    padding: 22px;
    border: 1px solid rgba(63, 186, 194, 0.3);
    border-radius: 12px;
    background: rgba(63, 186, 194, 0.06);
}
.review-form .field-label { margin-top: 4px; }
.review-form .btn-primary { width: auto; padding-inline: 32px; }

.star-input {
    position: relative;
    display: inline-flex;
    flex-direction: row-reverse;   /* stars sit 1..5 from the right; DOM order is 5..1 */
    gap: 4px;
    margin: 6px 0 16px;
}
.star-input input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.star-input label { cursor: pointer; line-height: 0; }
.star-input .star { width: 30px; height: 30px; transition: fill 0.12s, transform 0.12s; }
.star-input input:checked ~ label .star,
.star-input label:hover .star,
.star-input label:hover ~ label .star { fill: var(--color-gold); }
.star-input label:hover .star { transform: scale(1.12); }
.star-input input:focus-visible + label .star { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }

.review-list { margin: 0; padding: 0; list-style: none; }
.review-item { display: flex; gap: 14px; padding-block: 18px; border-top: 1px solid var(--color-border); }
.review-item:first-child { padding-top: 0; border-top: 0; }

.review-avatar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(63, 186, 194, 0.15);
    color: var(--color-accent-dark);
    font-weight: 800;
}
.review-body { flex: 1; min-width: 0; }
.review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.review-name { font-weight: 700; }
.review-date { color: #999; }
.review-text { margin: 0; font-size: 14px; line-height: 1.9; color: #444; white-space: pre-line; overflow-wrap: anywhere; }
.reviews-empty { margin: 0; font-size: 14px; color: #888; }

.review-cell { max-width: 340px; overflow-wrap: anywhere; }

/* ---------- Product page: tablet + phone ---------- */
@media (max-width: 900px) {
    .pdp { grid-template-columns: 1fr; gap: 24px; }
    .pdp-panel { position: static; padding: 22px; }
    .pdp-section { padding: 20px; }
}

@media (max-width: 768px) {
    .pdp-gallery { flex-direction: column; align-items: stretch; gap: 12px; }
    .pdp-main-image {
        flex: none;
        width: 100%;
        aspect-ratio: 4 / 5;
        max-height: 78vh;
        background: #e4e2ea;
        border: 1px solid var(--color-border);
        border-radius: 16px;
        overflow: hidden;
    }
    .pdp-main-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .pdp-thumbs { display: flex; flex-direction: row; width: 100%; overflow-x: auto; }
    .pdp-thumb { width: 64px; flex-shrink: 0; }
    .pdp-title { font-size: 22px; }
    .vs-price,
    .vs-price .price-final { font-size: 24px; }
}
/* =====================================================================
   ORDERS · CATEGORIES · SETTINGS
   ===================================================================== */

.muted { display: block; margin-top: 2px; font-size: 12px; color: #888; }
.field-hint { margin: 6px 0 0; font-size: 12px; color: #888; }

/* ---------- Status badges (profile + admin) ---------- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}
.status-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--pending    { background: #fff4e0; color: #b45309; }
.status--paid,
.status--processing { background: #e6f3fb; color: #1f6f9c; }
.status--shipped    { background: #efe9fb; color: #5b3fa6; }
.status--delivered  { background: #e8f6ee; color: #0a7a3d; }
.status--cancelled,
.status--failed     { background: #fbeaea; color: var(--color-sale); }

/* ---------- Account tabs ---------- */
.account-nav { display: flex; justify-content: center; gap: 8px; margin: 28px auto 0; }
.account-nav a {
    padding: 9px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    transition: background 0.15s, color 0.15s;
}
.account-nav a:hover { background: rgba(63, 186, 194, 0.1); color: var(--color-accent-dark); }
.account-nav a.is-active { background: var(--color-accent); color: #fff; }

/* ---------- Customer order history ---------- */
.orders-card {
    max-width: 860px;
    margin: 24px auto 56px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-card);
}
.orders-head { padding: 22px 28px; }
.orders-head h1 { margin: 0; font-size: 20px; font-weight: 800; }

.orders-tabs { display: flex; gap: 6px; padding-inline: 20px; border-bottom: 1px solid var(--color-border); overflow-x: auto; }
.orders-tabs--dash { padding-inline: 0; margin-bottom: 20px; }
.orders-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #777;
    white-space: nowrap;
}
.orders-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    background: #b5b3ab;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.orders-tab.is-active { color: var(--color-accent-dark); }
.orders-tab.is-active .orders-tab__count { background: var(--color-accent); }
.orders-tab.is-active::after {
    content: '';
    position: absolute;
    inset-inline: 8px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--color-accent);
}

.orders-body { display: grid; gap: 16px; padding: 24px; }
.order-card { border: 1px solid var(--color-border); border-radius: 12px; background: #fff; }

.order-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 18px 20px;
}
.order-meta { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; }
.order-meta div { display: flex; gap: 6px; font-size: 13px; }
.order-meta dt { color: #999; }
.order-meta dd { margin: 0; font-weight: 700; }

.order-progress { padding: 0 20px 18px; }
.order-progress__labels { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.order-progress__labels strong { color: var(--color-accent-dark); }
.order-progress__labels span { color: #888; }
.order-progress__bar { height: 5px; overflow: hidden; border-radius: 5px; background: #ecebe6; }
.order-progress__bar span { display: block; height: 100%; border-radius: 5px; background: var(--color-accent); }

.order-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
}
.order-ship { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #666; }
.order-thumbs { display: flex; gap: 8px; }
.order-thumb { width: 52px; height: 64px; border: 1px solid var(--color-border); border-radius: 8px; object-fit: cover; background: #e4e2ea; }
.order-thumbs__more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 64px;
    border-radius: 8px;
    background: #f1f0ec;
    font-size: 13px;
    font-weight: 700;
    color: #777;
}

.order-more { border-top: 1px solid var(--color-border); }
.order-more summary { padding: 14px 20px; font-size: 13.5px; font-weight: 700; color: var(--color-accent-dark); cursor: pointer; list-style: none; }
.order-more summary::-webkit-details-marker { display: none; }
.order-more summary::after { content: '‹'; display: inline-block; margin-inline-start: 8px; transition: transform 0.2s; }
.order-more[open] summary::after { transform: rotate(-90deg); }

.order-lines { margin: 0; padding: 0 20px; list-style: none; }
.order-line { display: flex; align-items: center; gap: 14px; padding-block: 12px; border-top: 1px dashed var(--color-border); }
.order-line img { flex-shrink: 0; width: 48px; height: 60px; border-radius: 8px; object-fit: cover; }
.order-line__info { flex: 1; min-width: 0; font-size: 13.5px; }
.order-line__info small { display: block; margin-top: 2px; color: #888; }
.order-line__price { font-size: 13.5px; font-weight: 700; white-space: nowrap; }

.order-address,
.order-sums { margin: 0; padding: 14px 20px; border-top: 1px solid var(--color-border); font-size: 13.5px; }
.order-address p { margin: 6px 0 0; line-height: 1.9; color: #555; }
.order-sums div { display: flex; justify-content: space-between; padding-block: 4px; }
.order-sums dt { color: #777; }
.order-sums dd { margin: 0; }
.order-sums .is-total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--color-border); font-size: 14.5px; font-weight: 800; }

.orders-empty { padding: 56px 20px; text-align: center; color: #888; }
.orders-empty a { font-weight: 700; color: var(--color-accent-dark); }

/* ---------- Admin: today cards + order detail ---------- */
.stat-card--today { border-top: 2px solid var(--color-accent); }
.stat-card--today .stat-value { color: var(--color-accent-dark); }

.order-detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.order-item-cell { display: flex; align-items: center; gap: 12px; }
.order-item-cell img { width: 44px; height: 56px; flex-shrink: 0; border-radius: 6px; object-fit: cover; }
.detail-list { margin: 0; }
.detail-list div { display: flex; justify-content: space-between; gap: 12px; padding-block: 7px; font-size: 13.5px; }
.detail-list dt { color: #888; }
.detail-list dd { margin: 0; font-weight: 600; text-align: end; }
.detail-list .is-total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--color-border); font-size: 15px; }
.detail-list .is-total dt { color: var(--color-text); font-weight: 700; }
.order-address-text { margin: 0; font-size: 13.5px; line-height: 1.9; color: #555; }

/* ---------- Admin: categories ---------- */
.cat-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 8px; }

.cat-panel { overflow: hidden; border: 1px solid var(--color-border); border-top: 2px solid var(--color-accent); border-radius: 12px; background: #fff; }
.cat-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.cat-panel__head h2 { margin: 0; font-size: 16px; font-weight: 800; }

.count-chip {
    padding: 2px 11px;
    border-radius: 999px;
    background: rgba(63, 186, 194, 0.13);
    color: var(--color-accent-dark);
    font-size: 12px;
    font-weight: 700;
}

.cat-tree { margin: 0; padding: 0; list-style: none; }
.cat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    padding-inline-start: calc(20px + var(--level, 0) * 28px);
    border-top: 1px solid var(--color-border);
    transition: background 0.12s;
}
.cat-row:hover { background: rgba(63, 186, 194, 0.05); }

.cat-dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent); }
.cat-row.is-child .cat-dot { border: 2px solid var(--color-gold); background: transparent; }

.cat-main { flex: 1; min-width: 0; }
.cat-main strong { display: block; font-size: 14px; }
.cat-main small { color: #999; font-size: 12px; }
.cat-count { font-size: 12.5px; color: #888; white-space: nowrap; }
.cat-empty { padding: 32px 20px; text-align: center; color: #888; border-top: 1px solid var(--color-border); }

.icon-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #999;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.icon-action svg { width: 17px; height: 17px; }
.icon-action:hover:not(:disabled) { background: rgba(155, 43, 50, 0.1); color: var(--color-sale); }
.icon-action--disabled { opacity: 0.35; cursor: not-allowed; }

.cat-add {
    position: sticky;
    top: 96px;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-top: 2px solid var(--color-gold);
    border-radius: 12px;
    background: #fff;
}
.cat-add h2 { margin: 0 0 18px; font-size: 16px; font-weight: 800; }

/* ---------- Admin: settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 920px; margin-top: 8px; }

.setting-card {
    display: flex;
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-top: 2px solid var(--color-accent);
    border-radius: 12px;
    background: #fff;
}
.setting-card--gold { border-top-color: var(--color-gold); }

.setting-card__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(63, 186, 194, 0.13);
    color: var(--color-accent-dark);
}
.setting-card--gold .setting-card__icon { background: rgba(185, 139, 42, 0.13); color: var(--color-gold); }
.setting-card__icon svg { width: 22px; height: 22px; }

.setting-card__body { flex: 1; min-width: 0; }
.setting-card__body h2 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.setting-card__body p { margin: 0 0 16px; font-size: 13px; line-height: 1.8; color: #777; }

.input-unit { display: flex; align-items: stretch; }
.input-unit .field-input { flex: 1; min-width: 0; border-start-end-radius: 0; border-end-end-radius: 0; }
.input-unit span {
    display: flex;
    align-items: center;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-inline-start: 0;
    border-start-end-radius: 10px;
    border-end-end-radius: 10px;
    background: #f3f2ee;
    font-size: 13px;
    color: #666;
}

.settings-actions { grid-column: 1 / -1; max-width: 320px; }

/* ---------- Tablet + phone ---------- */
@media (max-width: 900px) {
    .order-detail-grid,
    .cat-layout,
    .settings-grid { grid-template-columns: 1fr; }
    .cat-add { position: static; }
}

@media (max-width: 768px) {
    .orders-head { padding: 18px 16px; }
    .orders-body { padding: 14px; }
    .order-card__head { padding: 14px; }
    .order-progress { padding: 0 14px 14px; }
    .order-card__foot { padding: 14px; }
    .setting-card { padding: 18px; }
}
/* =====================================================================
   ADMIN: nav badge, review replies, new-order rows
   ===================================================================== */

.dash-nav-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: var(--color-sale);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
}
.nav-badge[hidden] { display: none; }
.dash-nav-link.active .nav-badge { background: #fff; color: var(--color-sale); }

.orders-tab__count--alert { background: var(--color-sale); }
.dash-table tr.is-new td:first-child { font-weight: 800; box-shadow: inset -3px 0 0 var(--color-sale); }

/* ---------- Admin: review cards ---------- */
.rv-list { display: grid; gap: 16px; margin-top: 8px; }

.rv-card {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-top: 2px solid var(--color-accent);
    border-radius: 12px;
    background: #fff;
}
.rv-card.is-hidden { border-top-color: #b5b3ab; background: #faf9f6; }

.rv-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 12px; }
.rv-card__who,
.rv-card__product { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.rv-card__who small,
.rv-card__product small { font-size: 12px; color: #999; }
.rv-card__rating { margin-inline-start: auto; }

.rv-card__text { margin: 0 0 16px; font-size: 14px; line-height: 1.9; color: #444; white-space: pre-line; overflow-wrap: anywhere; }

.rv-reply { padding: 14px; border-radius: 10px; background: rgba(63, 186, 194, 0.07); }
.rv-reply .field-label { margin-top: 0; }
.rv-reply__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 8px; }
.rv-btn { width: auto; margin-top: 0; padding: 10px 24px; }
.rv-card__foot { display: flex; gap: 18px; margin-top: 12px; }

/* ---------- Storefront: admin reply under a review ---------- */
.review-reply {
    margin-top: 12px;
    padding: 12px 16px;
    border-inline-start: 3px solid var(--color-accent);
    border-radius: 8px;
    background: rgba(63, 186, 194, 0.07);
}
.review-reply__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 12.5px; }
.review-reply__head strong { color: var(--color-accent-dark); }
.review-reply__head span { color: #999; }
.review-reply p { margin: 0; font-size: 13.5px; line-height: 1.9; color: #444; white-space: pre-line; overflow-wrap: anywhere; }

/* =====================================================================
   AD BANNERS + BRANDS
   ===================================================================== */
.promo-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-block: 8px 20px;
}

.promo-tile {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    background: #e4e2ea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}
.promo-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.promo-tile:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

@media (hover: hover) {
    .promo-tile:hover { box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.45); }
    .promo-tile:hover img { transform: scale(1.04); }
}

@media (max-width: 768px) {
    .promo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block: 4px 12px; }
    .promo-tile { border-radius: 10px; }
}


/* ---------- Brand header on the shop page ---------- */
.brand-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
}
.brand-head__label { font-size: 12px; color: #888; }
.brand-head__name { margin: 2px 0 6px; font-size: 24px; font-weight: 800; }
.brand-head__text { margin: 0; max-width: 560px; font-size: 14px; line-height: 1.9; color: #555; }

/* ---------- Admin: banner list + form ---------- */
.banner-thumb { width: 88px; height: 66px; border-radius: 8px; object-fit: cover; background: #e4e2ea; }

.banner-form { max-width: 560px; }

.banner-preview { margin-bottom: 10px; }
.banner-preview:empty { display: none; }
.banner-preview img { display: block; width: 100%; max-width: 320px; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; }

.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: #eceae5; }
.seg__item input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.seg__item span {
    display: block;
    padding: 9px 20px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.seg__item input:checked + span { background: #fff; color: var(--color-accent-dark); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.seg__item input:focus-visible + span { outline: 2px solid var(--color-accent); }
/* =====================================================================
   RESPONSIVE LAYER  (keep at the END of the file so it wins)
   ===================================================================== */

/* Fluid headings (replaces fixed 44px / 32px) */
.section-title  { font-size: clamp(26px, 4vw, 36px); }
.section-kicker { font-size: clamp(16px, 2.5vw, 20px); }

/* Let flex children shrink instead of widening the page */
.product-card__text { min-width: 0; }
.product-card__title,
.product-card__price { overflow-wrap: anywhere; }

/* Tablets */
@media (max-width: 900px) {
    .site-logo { height: 72px; }
    .search-wrap { margin-inline: 12px; }
    .nav-links { gap: 16px; }
    .carousel { --per-view: 3 !important; --gap: 16px; }
}

/* Phones */
@media (max-width: 768px) {
    .site-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "logo  .      icons"
            "nav   search search";
        align-items: center;
        gap: 8px 12px;
        padding-block: 8px;
    }
    .site-logo-link { grid-area: logo; display: block; }
    .header-icons   { grid-area: icons; gap: 8px; }
    .nav-links      { grid-area: nav; gap: 14px; font-size: 14px; white-space: nowrap; }
    .search-wrap    { grid-area: search; max-width: none; margin-inline: 0; min-width: 0; }

    .site-logo { height: 52px; }
    .icon-btn  { width: 36px; height: 36px; }
    .icon-btn img { width: 18px; height: 18px; }
    .carousel-section { margin-block: 32px; }
    .carousel { --per-view: 2 !important; --gap: 12px; }
    .section-header { gap: 12px; }
    .view-all-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin-bottom: 4px;
        padding: 4px 10px;
        border: 1.5px solid var(--color-accent);
        border-radius: 999px;
        background: transparent;
        color: #1f8a91;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.4;
        white-space: nowrap;
        transition: background 0.2s, color 0.2s;
    }

    .view-all-btn::after {
        content: "←";
        font-size: 12px;
        line-height: 1;
        transition: transform 0.2s;
    }


    .view-all-btn:active {
        background: var(--color-accent);
        color: #fff;
    }

    .view-all-btn:active::after { transform: translateX(-3px); }

    .product-card__info { gap: 8px; }
    .quick-add-btn { width: 32px; height: 32px; font-size: 18px; }
    .category-chip-grid { grid-template-columns: repeat(3, 1fr); }
    .pagination { flex-wrap: wrap; }
    .footer-grid { padding-block: 32px; gap: 24px; }
}

/* Very small phones */
@media (max-width: 480px) {
    .container { padding-inline: 12px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .footer-grid { grid-template-columns: 1fr; }
    .modal { padding: 8px; }
    .modal-dialog { padding: 28px 16px 16px; }
    .drawer-panel { width: 100%; }
}

/* ---------- Mobile filter dropdown ---------- */
.filter-toggle { display: none; }   /* hidden on desktop */

@media (max-width: 900px) {
    .shop-layout { gap: 16px; }

    .category-chip-grid { display: none; }

    .filter-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 16px;
        border: 1px solid var(--color-border);
        background: #fff;
        color: var(--color-text);
        font-family: inherit;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
    }

    .filter-toggle__arrow {
        width: 18px;
        height: 18px;
        transition: transform 0.2s;
    }

    .filter-toggle[aria-expanded="true"] .filter-toggle__arrow {
        transform: rotate(180deg);
    }

    .filter-panel {
        display: none;
        max-height: 70vh;
        overflow-y: auto;
        padding: 8px 16px 16px;
        border: 1px solid var(--color-border);
        border-top: none;
        background: #fff;
    }

    .filter-panel.is-open { display: block; }

    /* the button already says "فیلترها" */
    .filter-panel .filters-heading { display: none; }
}

/* ---------- Dashboard on tablets / phones ---------- */
@media (max-width: 900px) {
    /* keep the menu beside the content instead of stacking it on top */
    .dash-layout {
        grid-template-columns: 150px minmax(0, 1fr);   /* minmax(0,…) lets the content shrink */
        gap: 16px;
        padding-block: 16px;
        align-items: start;
    }

    .dash-content { min-width: 0; }

    .dash-nav { top: 12px; gap: 2px; }

    .dash-nav-link {
        padding: 8px 10px;
        border-radius: 6px;
        font-size: 12.5px;
        line-height: 1.5;
    }

    .dash-content .shop-title { font-size: 22px; }
    .summary-title { font-size: 15px; margin-bottom: 10px; }

    /* smaller stat cards, two per row */
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 14px 0 24px;
    }
    .stat-card { padding: 12px; gap: 4px; }
    .stat-value { font-size: 18px; }
    .stat-label { font-size: 11px; }

    /* smaller tables that scroll sideways instead of widening the page */
    .dash-table {
        display: block;
        overflow-x: auto;
        font-size: 11.5px;
    }
    .dash-table th,
    .dash-table td {
        padding: 7px 8px;
        white-space: nowrap;
    }
    .dash-header-row { margin-bottom: 14px; gap: 8px; }
    .dash-add-btn { padding: 8px 12px; font-size: 12.5px; }
}

/* Small phones: slimmer menu */
@media (max-width: 600px) {
    .dash-layout { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
    .dash-nav-link { padding: 7px 8px; font-size: 11.5px; }
    .stat-value { font-size: 16px; }
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 6px;
    background: var(--color-sale);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.summary-line__product {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-line__img {
    width: 44px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.dob-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.dob-field {
    position: relative;
}

.dob-sublabel {
    position: absolute;
    top: 7px;
    right: 14px;
    font-size: 10px;
    color: #999;
    pointer-events: none;
}

.dob-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 22px 32px 8px 16px;
    cursor: pointer;
}

.dob-field .select-arrow {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #777;
    pointer-events: none;
}

/* ===== Homepage refinement ===== */
:root { --section-width: 100%; }

.carousel-section {
    max-width: var(--section-width);
    margin-inline: auto;
}

/* Lalezar has a single weight; stop the browser faking a bold */
.display-heading { font-synthesis: none; }

/* Line between each section title and its "view all" button (desktop/tablet only) */
.section-rule { display: none; }

@media (min-width: 769px) {
    .section-header { align-items: center; gap: 20px; }
    .section-rule {
        display: block;
        flex: 1;
        height: 1px;
        background: var(--color-border);
    }
}

/* Portrait crop suits fashion photography better than a square */
.product-card__image { aspect-ratio: 4 / 5; }

.quick-add-btn--overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 2;
    border: 2px solid #fff;
}

@media (min-width: 901px) {
    .product-card__title { font-size: 13.5px; }
    .product-card__price { font-size: 12.5px; }
}

/* Narrow laptop windows: 4 cards instead of 5 so they don't get tiny */
@media (min-width: 901px) and (max-width: 1100px) {
    .carousel { --per-view: 4 !important; }
}
/* ---------- Admin product form: photos + price summary ---------- */
.pf-main-preview { aspect-ratio: 4 / 5; }
.pf-main-preview img { width: 100%; height: 100%; object-fit: contain; background: #e4e2ea; }

.pf-staged-thumb { position: relative; width: 96px; height: auto; }
.pf-staged-thumb img { width: 96px; height: 120px; border-radius: 8px; object-fit: cover; }
.pf-staged-main {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 11.5px;
    color: #555;
    cursor: pointer;
}

.price-summary {
    margin: 4px 0 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(63, 186, 194, 0.08);
}
.price-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-block: 3px;
    font-size: 14px;
}
.price-summary strong { font-weight: 800; }
.price-summary .field-hint { margin: 6px 0 0; }
/* =====================================================================
   MOBILE (<= 768px): fixed top logo, bottom tab bar, sheets, compact carousels
   ===================================================================== */

.mobile-ui { display: none; }

@media (max-width: 768px) {
    .mobile-ui { display: block; }

    html { scroll-padding-top: 72px; }

    body {
        padding-top: calc(56px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    main.container { padding-inline: 10px; }

    /* ---------- Fixed top bar: centered logo ---------- */
    .mtop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 60;
        display: flex;
        align-items: center;
        justify-content: center;
        height: calc(56px + env(safe-area-inset-top, 0px));
        padding-top: env(safe-area-inset-top, 0px);
        border-bottom: 1px solid var(--color-border);
        background: rgba(247, 246, 240, 0.94);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    .mtop__logo { display: flex; }
    .mtop__logo img { height: 42px; width: auto; }

    /* ---------- Header on phones = just the long search bar ---------- */
    .site-header,
    .site-header.is-stuck,
    .site-header.is-hidden {
        display: block;
        position: static;
        padding: 10px 10px 0;
        border-bottom: 0;
        background: none;
        box-shadow: none;
        transform: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .site-header .site-logo-link,
    .site-header .nav-links,
    .site-header .header-icons { display: none; }

    .site-header .search-wrap { width: 100%; max-width: none; margin: 0; }
    .site-header .search-bar { height: 46px; font-size: 14px; }

    /* ---------- Bottom tab bar ---------- */
    .mnav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 70;
        display: flex;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        border-top: 1px solid var(--color-border);
        background: var(--color-card);
        box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, 0.3);
    }

    .mnav__item {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 0;
        height: 64px;
        border: 0;
        background: none;
        font-family: inherit;
        font-size: 10.5px;
        font-weight: 600;
        color: #777;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .mnav__item:active { background: rgba(63, 186, 194, 0.08); }

    .mnav__item svg {
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mnav__icon { position: relative; display: flex; }
    .mnav__item .cart-badge { top: -7px; inset-inline-end: -10px; }

    .mnav__item.is-active { color: var(--color-accent-dark); }
    .mnav__item.is-active::before {
        content: '';
        position: absolute;
        top: -1px;
        width: 28px;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--color-accent);
    }

    /* ---------- Bottom sheets ---------- */
    .sheet {
        position: fixed;
        inset: 0;
        z-index: 100;
        visibility: hidden;
        transition: visibility 0s linear 0.28s;
    }
    .sheet.is-open { visibility: visible; transition-delay: 0s; }

    .sheet__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        transition: opacity 0.28s;
    }
    .sheet.is-open .sheet__backdrop { opacity: 1; }

    .sheet__panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 78vh;
        overflow-y: auto;
        padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px));
        border-radius: 20px 20px 0 0;
        background: var(--color-card);
        outline: none;
        transform: translateY(100%);
        transition: transform 0.28s ease;
    }
    .sheet.is-open .sheet__panel { transform: translateY(0); }

    .sheet__handle { width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 4px; background: #d6d3cc; }
    .sheet__title { margin: 0 0 4px; font-size: 17px; font-weight: 800; }

    .sheet__account { display: flex; flex-direction: column; gap: 2px; padding: 4px 4px 10px; }
    .sheet__account strong { font-size: 16px; }
    .sheet__account span { align-self: flex-start; font-size: 12.5px; color: #888; }

    .sheet__list { margin: 0; padding: 0; list-style: none; }
    .sheet__list a,
    .sheet__logout {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 15px 4px;
        border: 0;
        border-bottom: 1px solid var(--color-border);
        background: none;
        font-family: inherit;
        font-size: 15px;
        text-align: start;
        color: var(--color-text);
        cursor: pointer;
    }
    .sheet__list a::after { content: '‹'; font-size: 18px; color: #bbb; }
    .sheet__logout { color: var(--color-sale); border-bottom: 0; }

    /* ---------- Carousels: compact, ~3.2 cards visible ---------- */
    .carousel-edge-btn { display: none; }

    .carousel-section {
        margin-block: 12px;
        padding: 14px 10px 16px;
        border-radius: 14px;
    }

    .carousel {
        --gap: 8px;
        --per-view: 3.2 !important;
        padding-inline: 0;
    }

    .section-header { align-items: center; gap: 8px; margin-bottom: 12px; }
    .section-heading { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 5px; }
    .section-kicker { font-size: 14px; font-weight: 600; }
    .section-title { font-size: 18px; }

    .product-card__info { margin-top: 8px; }
    .product-card__image { border-radius: 8px; }

    .product-card__title { font-size: 12px; font-weight: 600; line-height: 1.55; }
    .product-card__title a {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .product-card__title .swatch,
    .product-card__title .color-more { display: none; }

    .product-card__price { display: flex; flex-direction: column; gap: 1px; margin-top: 3px; font-size: 11px; }
    .product-card__price .price-final { order: -1; font-size: 12px; }
    .product-card__price .price-original { margin: 0; font-size: 10.5px; }

    .product-card .discount-badge { top: 6px; right: 6px; padding: 2px 6px; border-radius: 5px; font-size: 10px; }
    .product-card .wishlist-btn { top: 6px; left: 6px; width: 26px; height: 26px; }
    .product-card .wishlist-btn svg { width: 14px; height: 14px; }
}

/* =====================================================================
   MOBILE POLISH
   ===================================================================== */

@media (max-width: 768px) {

    /* ---------- Headings: the noun leads, the qualifier supports ---------- */
    .carousel-section .section-heading { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px; }
    .carousel-section .section-kicker { font-size: 13.5px; font-weight: 500; color: #777; }
    .carousel-section .section-title { font-size: 19px; font-weight: 800; line-height: 1.3; color: var(--color-text); }
    .carousel-section .view-all-btn { flex-shrink: 0; }

    /* ---------- Carousels: calmer swiping ---------- */
    .carousel-track {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;   /* a swipe on the carousel won't trigger browser back/forward */
    }

    a, button { -webkit-tap-highlight-color: transparent; }

    /* Hearts look 26px but are tappable in a 44px area */
    .product-card .wishlist-btn::after { content: ''; position: absolute; inset: -9px; }

    /* ---------- Bottom bar ---------- */
    .mnav__item { font-size: 11px; color: #666; }
    .mnav__item:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -4px; }

    /* smaller badges that no longer sit on top of the icons */
    .mnav .cart-badge {
        top: -6px;
        inset-inline-end: -9px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        font-size: 10px;
    }

    /* The cart is the one emphasized tab: a raised teal button, like the filled cart on desktop */
    .mnav__item--cart {
        justify-content: flex-end;
        padding-bottom: 9px;
        font-weight: 700;
        color: var(--color-accent-dark);
    }
    .mnav__item--cart .mnav__icon {
        position: absolute;
        top: -20px;
        left: 50%;
        transform: translateX(-50%);
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        border: 4px solid var(--color-card);
        border-radius: 50%;
        background: var(--color-accent);
        color: #fff;
        box-shadow: 0 8px 18px -6px rgba(46, 155, 161, 0.7);
        transition: transform 0.15s;
    }
    .mnav__item--cart:active { background: none; }
    .mnav__item--cart:active .mnav__icon { transform: translateX(-50%) scale(0.93); }
    .mnav__item--cart .cart-badge { top: -3px; inset-inline-end: -5px; }

    /* ---------- Forms: 16px stops iPhones from zooming in when a field is focused ---------- */
    input, select, textarea { font-size: 16px !important; }
    .otp-input { font-size: 20px !important; }

    /* ---------- Footer: compact two-column layout ---------- */
    .site-footer { margin-top: 20px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px 16px; padding-block: 28px; }
    .footer-grid .footer-col:first-child { grid-column: 1 / -1; }
}

/* Touch screens only: hover lifts would stay "stuck" after a tap, so switch them off */
@media (hover: none) {
    .product-card:hover { transform: none; }
    .product-card:hover .product-card__image img { transform: none; }
    .wishlist-btn:hover { transform: none; }
    .product-card:active { transform: scale(0.98); }
}

/* ---------- Admin: photo tiles with a main-photo button ---------- */
.pf-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.pf-photo-grid:empty { display: none; margin: 0; }

.pf-photo { position: relative; }
.pf-photo > img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    object-fit: cover;
    background: #e4e2ea;
}

.pf-photo__delete {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-sale);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.pf-photo__delete input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pf-photo:has(.pf-photo__delete input:checked) > img { opacity: 0.3; }   /* a photo marked for deletion fades */

.pf-photo__main { display: block; margin-top: 6px; cursor: pointer; }
.pf-photo__main input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pf-photo__main span {
    display: block;
    padding: 7px 4px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    color: #555;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pf-photo__main:hover span { border-color: var(--color-accent); }
.pf-photo__main .pf-photo__main-on { display: none; }
.pf-photo__main input:checked ~ .pf-photo__main-off { display: none; }
.pf-photo__main input:checked ~ .pf-photo__main-on {
    display: block;
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #fff;
}
.pf-photo__main input:focus-visible ~ span { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ---------- Admin: photo strip with a star on each photo ---------- */
.pf-gallery { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; }

.pf-main-preview {
    flex: 1;
    min-width: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 12px;
    background: #e4e2ea;
}
.pf-main-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }

.pf-thumbs {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 8px;
    width: 84px;
    max-height: 520px;
    padding: 3px;
    overflow-y: auto;
}
.pf-thumbs:empty { display: none; }

.pf-thumb-item { position: relative; border-radius: 10px; outline: 2px solid transparent; cursor: pointer; }
.pf-thumb-item > img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    object-fit: cover;
    background: #e4e2ea;
}
.pf-thumb-item.is-viewing { outline-color: var(--color-text); }
.pf-thumb-item.is-deleting > img { opacity: 0.3; }

/* the star: top-left corner of each photo */
.pf-star {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.15s;
}
.pf-star:hover { transform: scale(1.12); }
.pf-star input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pf-star svg { width: 15px; height: 15px; fill: none; stroke: #8a8a8a; stroke-width: 2; stroke-linejoin: round; }
.pf-star input:checked + svg { fill: var(--color-gold); stroke: var(--color-gold); }
.pf-star input:focus-visible + svg { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }

/* the cross: top-right corner */
.pf-del {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-sale);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}
.pf-del input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.pf-range-input { width: 96px; text-align: center; }


/* =====================================================================
   HEADER: an always-opaque, full-width bar (no script needed)
   ===================================================================== */
.site-header { border-bottom: 0; }

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - 50vw);     /* stretches to both edges of the screen, not just the 1200px container */
    right: calc(50% - 50vw);
    z-index: -1;                /* behind the logo, menu and icons, in front of the page content */
    background: rgba(247, 246, 240, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow 0.2s ease;
}

/* the old script-driven background is replaced by the bar above; the script now only adds the shadow */
.site-header.is-stuck {
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}
.site-header.is-stuck::before { box-shadow: 0 12px 24px -20px rgba(0, 0, 0, 0.45); }

/* phones have their own header layout (fixed logo + search), so the bar is not used there */
@media (max-width: 768px) {
    .site-header::before { display: none; }
}

/* =====================================================================
   PRODUCT GALLERY: arrows + full-screen viewer
   ===================================================================== */
.gal-data { display: none; }

.gal-open {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}
.gal-open img,
.lightbox__stage img { -webkit-user-drag: none; user-select: none; }
.pdp-main-image .discount-badge { z-index: 2; pointer-events: none; }

/* shared button + icon styling */
.gal-nav,
.lightbox__nav,
.lightbox__close {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    line-height: 1;
    cursor: pointer;
}
.gal-nav svg,
.lightbox__nav svg,
.lightbox__close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* arrows on the product page photo */
.gal-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    transition: background 0.15s, color 0.15s;
}
.gal-nav:hover { background: var(--color-accent); color: #fff; }
.gal-nav--left { left: 12px; }
.gal-nav--right { right: 12px; }

.gal-nav:focus-visible,
.gal-open:focus-visible,
.gal-thumb:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* thumbnail strip beside the photo */
.gal-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #e4e2ea;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    cursor: pointer;
}
.gal-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gal-thumb.active { border-color: var(--color-accent); }

/* ---------- Full-screen viewer ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.96);
    outline: none;
}
.lightbox.is-open { display: flex; }

.lightbox__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}
.lightbox__counter {
    position: absolute;
    top: 25px;
    left: 50%;
    z-index: 3;
    transform: translateX(-50%);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.lightbox__stage { position: relative; flex: 1; min-height: 0; }
.lightbox__stage img {
    position: absolute;
    top: 64px;
    bottom: 12px;
    left: 80px;
    right: 80px;
    width: calc(100% - 160px);
    height: calc(100% - 76px);
    object-fit: contain;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 46px;
    height: 46px;
    margin-top: -23px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transition: background 0.15s;
}
.lightbox__nav:hover,
.lightbox__close:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox__nav--left { left: 18px; }
.lightbox__nav--right { right: 18px; }

.lightbox__strip {
    flex-shrink: 0;
    overflow-x: auto;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.6);
}
.lightbox__strip-inner { display: flex; gap: 8px; width: max-content; margin-inline: auto; }

.lightbox__thumb {
    flex: 0 0 auto;
    width: 62px;
    aspect-ratio: 4 / 5;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #222;
    overflow: hidden;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.15s;
}
.lightbox__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lightbox__thumb:hover { opacity: 0.9; }
.lightbox__thumb.active { border-color: #fff; opacity: 1; }

/* only one photo: no arrows, no strip */
.lightbox.is-single .lightbox__nav,
.lightbox.is-single .lightbox__strip,
.lightbox.is-single .lightbox__counter { display: none; }

@media (max-width: 768px) {
    .gal-thumb { width: 64px; flex-shrink: 0; }
    .gal-nav { width: 34px; height: 34px; margin-top: -17px; }
    .gal-nav--left { left: 8px; }
    .gal-nav--right { right: 8px; }

    .lightbox__stage img { top: 60px; left: 0; right: 0; width: 100%; height: calc(100% - 72px); }
    .lightbox__nav { width: 38px; height: 38px; margin-top: -19px; }
    .lightbox__nav--left { left: 8px; }
    .lightbox__nav--right { right: 8px; }
    .lightbox__thumb { width: 50px; }
}

/* "show more" tile when a product has more than 5 photos */
.gal-more {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #e4e2ea;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    cursor: pointer;
    font-family: inherit;
}
.gal-more img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(1px); }
.gal-more__label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px;
    background: rgba(28, 28, 28, 0.58);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}
.gal-more__label small { font-size: 13px; font-weight: 800; }
.gal-more:hover .gal-more__label { background: rgba(46, 155, 161, 0.78); }
.gal-more.active { border-color: var(--color-accent); }
.gal-more:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
@media (max-width: 768px) {
    .gal-more { width: 64px; flex-shrink: 0; }
}

.badge--warn { background: #fff4e0; color: #b45309; }

/* =====================================================================
   CATEGORY TREES
   ===================================================================== */

/* ---------- Shop sidebar: collapsible branches ---------- */
.cat-tree-filter,
.cat-tree-filter ul { margin: 0; padding: 0; list-style: none; }

.cat-node { padding-block: 2px; }
.cat-node__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cat-node__row .filter-option { flex: 1; padding-block: 5px; }

.cat-node__toggle {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #888;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.cat-node__toggle:hover { background: rgba(63, 186, 194, 0.12); color: var(--color-accent-dark); }
.cat-node__toggle:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.cat-node__toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s;
}
.cat-node.is-open > .cat-node__row .cat-node__toggle svg { transform: rotate(180deg); }

/* a grid row going from 0fr to 1fr animates "height: auto" without any script */
.cat-node__children {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}
.cat-node.is-open > .cat-node__children { grid-template-rows: 1fr; }

.cat-node__children > ul {
    min-height: 0;
    margin-inline-start: 9px;
    padding-inline-start: 14px;
    overflow: hidden;
    border-inline-start: 1px dashed var(--color-border);
    visibility: hidden;                      /* closed branches can't be tabbed into */
    transition: visibility 0s linear 0.25s;
}
.cat-node.is-open > .cat-node__children > ul { visibility: visible; transition-delay: 0s; }

/* ---------- Header menu: fly-out sub-categories ---------- */
.catmenu,
.catmenu__sub { margin: 0; padding: 6px 0; list-style: none; }

.catmenu__item { position: relative; }
.catmenu__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.catmenu__arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: none;
    stroke: #999;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.catmenu__item:hover > .catmenu__link,
.catmenu__item:focus-within > .catmenu__link { background: rgba(63, 186, 194, 0.1); color: var(--color-accent-dark); }

.catmenu__sub {
    position: absolute;
    top: -7px;                               /* lines the first sub-item up with its parent */
    right: calc(100% - 2px);                 /* opens toward the left, the reading direction */
    z-index: 5;
    min-width: 210px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-card);
    box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateX(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}
.catmenu__item:hover > .catmenu__sub,
.catmenu__item:focus-within > .catmenu__sub {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition-delay: 0s;
}

/* touch screens have no hover: show sub-categories inline instead */
@media (hover: none) {
    .catmenu__sub {
        position: static;
        min-width: 0;
        padding: 0 14px 0 0;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .catmenu__arrow { display: none; }
}

/* ---------- Phone menu sheet ---------- */
.sheet__tree .cat-node { padding-block: 0; }
.sheet__tree .cat-node__row { border-bottom: 1px solid var(--color-border); }
.sheet__tree .cat-node__row a { flex: 1; border-bottom: 0; }
.sheet__tree .cat-node__row a::after { display: none; }
.sheet__tree .cat-node__toggle { width: 44px; height: 44px; }
.sheet__tree .cat-node__children > ul { margin-inline-start: 0; padding-inline-start: 16px; border-inline-start: 0; }

/* The discount section: a thin red outline all the way around */
.carousel-section--sale { border: 2px solid var(--color-sale); }