/* =========================================================
   A Boutique — main stylesheet (no external libraries)
   ========================================================= */
:root {
    --primary: #b0706e;
    --primary-dark: #94595a;
    --primary-soft: #f3e4df;
    --wine: #6e1f2c;
    --ink: #2a2324;
    --muted: #7d7170;
    --bg: #fbf7f4;
    --cream: #f6ece7;
    --card: #fff;
    --border: #eddcd5;
    --gold: #f2a93b;
    --success: #3f9b5d;
    --danger: #c0392b;
    --info: #3b82c4;
    --shadow-sm: 0 2px 10px rgba(110, 31, 44, .06);
    --shadow: 0 14px 35px rgba(110, 31, 44, .09);
    --radius: 14px;
    --radius-sm: 8px;
    --container: 1500px;
    --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-body: "Jost", "Segoe UI", Tahoma, sans-serif;
    --header-h: 76px;
}

[dir="rtl"] {
    --font-head: "Amiri", "Playfair Display", serif;
    --font-body: "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }
h1, h2, h3, h4, .serif { font-family: var(--font-head); font-weight: 500; color: var(--wine); line-height: 1.2; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 46px; padding: 0 26px; border-radius: 999px;
    background: var(--primary); color: #fff; font-weight: 500; font-size: 15px;
    border: 1px solid var(--primary); transition: background .2s, transform .2s, box-shadow .2s;
    white-space: nowrap;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }
.btn-rect { border-radius: var(--radius-sm); }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn-light { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.btn-light:hover { background: var(--primary-soft); border-color: var(--primary-soft); }
.btn-icon { width: 46px; padding: 0; }
.link-more { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-size: 14px; font-weight: 500; }
.link-more:hover { color: var(--wine); }
[dir="rtl"] .icon-flip { transform: scaleX(-1); }

/* ---------- Top bar ---------- */
.topbar { background: var(--primary); color: #fff; font-size: 13px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar-perks { display: flex; gap: 48px; flex: 1; justify-content: center; }
.topbar-perks li { display: flex; align-items: center; gap: 8px; }
.topbar-perks .icon { width: 16px; height: 16px; }
.topbar-tools { display: flex; align-items: center; gap: 18px; }
.flag { width: 20px; height: 13px; border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle; }

/* ---------- Dropdown ---------- */
.dd { position: relative; }
.dd-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.dd-toggle .icon { width: 14px; height: 14px; }
.dd-menu {
    position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 60;
    min-width: 200px; padding: 8px; background: #fff; color: var(--ink);
    border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.dd.open > .dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd-menu a, .dd-menu .dd-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.dd-menu a:hover { background: var(--cream); color: var(--wine); }
.dd-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; font-size: 13px; color: var(--muted); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: flex; flex-direction: column; align-items: center; flex: none; line-height: 1; }
.logo img { width: 92px; height: auto; }
.logo small { font-size: 8.5px; letter-spacing: .22em; color: var(--muted); margin-top: 4px; text-transform: uppercase; }
.nav { flex: 1; }
.nav-list { display: flex; align-items: center; gap: 30px; }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; padding: 26px 0; color: var(--ink); }
.nav-link .icon { width: 14px; height: 14px; transition: transform .2s; }
.nav-link::after { content: ""; position: absolute; inset-inline: 0; bottom: 20px; height: 2px; background: var(--primary); transform: scaleX(0); transition: transform .2s; }
.nav-link:hover, .nav-link.active { color: var(--wine); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-item { position: relative; }
.mega {
    position: absolute; top: 100%; inset-inline-start: -20px; z-index: 55;
    min-width: 240px; padding: 14px; background: #fff; border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
}
.nav-item:hover > .mega, .nav-item:focus-within > .mega { opacity: 1; visibility: visible; transform: none; }
.nav-item:hover > .nav-link .icon { transform: rotate(180deg); }
.mega a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.mega a:hover { background: var(--cream); color: var(--wine); }
.mega .mega-all { color: var(--primary); font-weight: 500; border-top: 1px solid var(--border); margin-top: 6px; border-radius: 0 0 8px 8px; }

.search { position: relative; width: 260px; flex: none; }
.search input {
    width: 100%; height: 42px; padding: 0 44px 0 18px; border-radius: 999px;
    border: 1px solid var(--border); background: #fff; font-size: 13px; outline: none; transition: border-color .2s, box-shadow .2s;
}
[dir="rtl"] .search input { padding: 0 18px 0 44px; }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search button { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.hdr-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); transition: background .2s; }
.hdr-btn:hover { background: var(--cream); color: var(--wine); }
.hdr-btn .icon { width: 24px; height: 24px; }
.hdr-cart { background: var(--primary-soft); border-radius: 10px; }
.badge {
    position: absolute; top: -4px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600;
    display: grid; place-items: center; border: 2px solid #fff;
}
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.menu-toggle { display: none; }

/* ---------- Mobile nav ---------- */
.overlay { position: fixed; inset: 0; background: rgba(42, 35, 36, .45); z-index: 80; opacity: 0; visibility: hidden; transition: .25s; }
.overlay.show { opacity: 1; visibility: visible; }
.mobile-bar { display: none; }

/* ---------- Page bits ---------- */
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.eyebrow { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--primary); font-weight: 500; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-title { font-size: clamp(26px, 3vw, 36px); }
.section-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--primary); }
.breadcrumb .icon { width: 12px; height: 12px; }

.page-hero { position: relative; background: linear-gradient(90deg, var(--cream) 40%, #ead7cf); overflow: hidden; }
.page-hero .container { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 240px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 58px); margin: 10px 0 8px; }
.page-hero p { color: var(--muted); max-width: 440px; }
.page-hero-img { position: absolute; inset-block: 0; inset-inline-end: 0; width: 55%; height: 100%; object-fit: cover; object-position: center top; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
[dir="rtl"] .page-hero-img { -webkit-mask-image: linear-gradient(-90deg, transparent, #000 30%); mask-image: linear-gradient(-90deg, transparent, #000 30%); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }

/* features strip */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--cream); border-radius: var(--radius); padding: 22px 10px; }
.perk { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 4px 16px; }
.perk + .perk { border-inline-start: 1px solid var(--border); }
.perk .icon { width: 34px; height: 34px; color: var(--wine); stroke-width: 1.3; }
.perk strong { display: block; font-size: 14px; font-weight: 500; }
.perk span { font-size: 12.5px; color: var(--muted); }

/* ---------- Product card ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.p-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: box-shadow .25s, transform .25s; }
.p-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.p-media { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--cream); overflow: hidden; }
.p-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .6s; }
.p-card:hover .p-media img { transform: scale(1.02); }
.p-fav { position: absolute; top: 10px; inset-inline-end: 10px; width: 32px; height: 32px; border-radius: 8px; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); color: var(--ink); z-index: 2; }
.p-fav .icon { width: 17px; height: 17px; }
.p-fav.on, .p-fav:hover { color: var(--primary); }
.p-fav.on .icon { fill: currentColor; }
.p-tag { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--wine); color: #fff; font-size: 11px; padding: 3px 9px; border-radius: 999px; z-index: 2; }
.p-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.p-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.p-title { font-size: 14px; font-weight: 400; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-price { font-weight: 600; font-size: 15px; }
.p-old { color: var(--muted); text-decoration: line-through; font-size: 13px; font-weight: 400; margin-inline-start: 6px; }
.p-rate { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.p-rate .icon { width: 14px; height: 14px; color: var(--gold); }
.swatches { display: flex; gap: 5px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .08); }
.p-card .btn { margin-top: auto; height: 40px; border-radius: 8px; font-size: 14px; }

/* horizontal scroller (replaces slick) */
.rail { position: relative; }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 20px) / 5); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 10px; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }
.rail-btn { position: absolute; top: 40%; z-index: 3; width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.rail-btn:hover { background: var(--primary); color: #fff; }
.rail-prev { inset-inline-start: -18px; }
.rail-next { inset-inline-end: -18px; }
.rail-btn .icon { width: 18px; height: 18px; }

/* ---------- Skeleton / shimmer ---------- */
.skeleton, .lazy-wrap { position: relative; overflow: hidden; background: #efe3dd; }
.skeleton::after, .lazy-wrap:not(.loaded)::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
    animation: shimmer 1.3s infinite;
}
.sk-line { height: 12px; border-radius: 6px; margin: 8px 0; }
.sk-line.w60 { width: 60%; }
.sk-line.w40 { width: 40%; }
.sk-card { border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--border); }
.sk-card .skeleton.media { aspect-ratio: 3 / 4; }
.sk-card .pad { padding: 12px 14px; }
img.lazy { opacity: 0; transition: opacity .4s; }
img.lazy.loaded { opacity: 1; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 500; }
.field label .req { color: var(--danger); }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field input[type=number], .field select, .field textarea {
    width: 100%; height: 46px; padding: 0 16px; border: 1px solid var(--border); border-radius: 8px;
    background: #fdfbfa; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; min-height: 110px; padding: 12px 16px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: #fff; }
.field-error { font-size: 12.5px; color: var(--danger); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

/* ---------- Footer ---------- */
.footer { position: relative; background: #fff; border-top: 1px solid var(--border); margin-top: 40px; overflow: hidden; }
.footer-main { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); gap: 28px; padding: 44px 0 30px; }
.footer-col + .footer-col { border-inline-start: 1px solid var(--border); padding-inline-start: 28px; }
.footer h4 { font-family: var(--font-body); font-size: 14.5px; font-weight: 600; color: var(--wine); margin-bottom: 14px; }
.footer-col li { margin-bottom: 6px; font-size: 13.5px; color: var(--muted); }
.footer-col a:hover { color: var(--primary); }
.footer-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.footer-brand img { width: 120px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; transition: background .2s, transform .2s; }
.socials a:hover { background: var(--wine); transform: translateY(-2px); }
.socials .icon { width: 15px; height: 15px; }
.contact-list li { display: flex; align-items: center; gap: 10px; }
.contact-list .icon { width: 18px; height: 18px; color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-block: 16px; font-size: 12.5px; color: var(--muted); }
.pay { display: flex; align-items: center; gap: 16px; }
.pay-badge { height: 26px; display: inline-flex; align-items: center; font-weight: 800; font-style: italic; letter-spacing: -.02em; }
.pay-visa { color: #1a1f71; font-size: 20px; }
.pay-knet { background: #0c4da2; color: #ffd200; font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 3px; }
.pay-apple { color: #000; font-style: normal; font-weight: 600; font-size: 17px; }
.apps { display: flex; gap: 8px; }
.apps img { height: 34px; width: auto; }
.dev { display: inline-flex; align-items: center; gap: 8px; }
.dev img { height: 26px; width: auto; }
.footer-leaf { position: absolute; inset-inline-end: -30px; top: 10px; width: 180px; opacity: .35; pointer-events: none; color: var(--primary); }

.wa-float { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 70; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37, 211, 102, .4); transition: transform .2s; }
.wa-float:hover { transform: scale(1.07); }
.wa-float .icon { width: 28px; height: 28px; }

/* ---------- Toast + dialog (replaces sweetalert) ---------- */
.toasts { position: fixed; top: 20px; inset-inline-end: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 360px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-inline-start: 4px solid var(--primary); border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; animation: toastIn .3s ease; }
.toast.success { border-inline-start-color: var(--success); }
.toast.error { border-inline-start-color: var(--danger); }
.toast.hide { opacity: 0; transform: translateY(-6px); transition: .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
.dialog { border: 0; border-radius: 18px; padding: 0; max-width: 420px; width: calc(100% - 32px); box-shadow: var(--shadow); color: var(--ink); }
.dialog::backdrop { background: rgba(42, 35, 36, .5); }
.dialog-body { padding: 32px 28px 26px; text-align: center; }
.dialog-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.dialog-icon .icon { width: 30px; height: 30px; stroke-width: 2; }
.dialog.success .dialog-icon { background: #e4f3e9; color: var(--success); }
.dialog.error .dialog-icon { background: #fbe5e2; color: var(--danger); }
.dialog h3 { font-size: 22px; margin-bottom: 8px; }
.dialog p { color: var(--muted); margin-bottom: 20px; }

/* legacy popup helpers still used by some pages */
.popup { display: none; position: fixed; inset: 0; z-index: 150; background: rgba(42, 35, 36, .5); overflow: auto; }
.popup-content { background: #fff; margin: 10vh auto; padding: 24px; width: min(560px, 94%); border-radius: 18px; }
.close { float: inline-end; font-size: 26px; color: var(--wine); cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .search { width: 200px; }
    .nav-list { gap: 20px; }
    .rail-track { grid-auto-columns: calc((100% - 3 * 20px) / 4); }
}
@media (max-width: 992px) {
    :root { --header-h: 64px; }
    .topbar-perks li:not(:first-child) { display: none; }
    .topbar-perks { justify-content: flex-start; }
    .menu-toggle { display: grid; }
    .nav {
        position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 90; width: min(320px, 86vw);
        background: #fff; padding: 20px; overflow-y: auto; transform: translateX(-105%); transition: transform .3s;
    }
    [dir="rtl"] .nav { transform: translateX(105%); }
    .nav.open { transform: none; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-link { padding: 14px 4px; justify-content: space-between; width: 100%; border-bottom: 1px solid var(--border); }
    .nav-link::after { display: none; }
    .mega { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 12px; display: none; min-width: 0; }
    .nav-item.open > .mega { display: block; }
    .nav-head { display: flex !important; }
    .search { order: 3; width: 100%; flex: 1 1 100%; }
    .site-header .container { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px 14px; }
    .header-actions { margin-inline-start: auto; }
    .footer-main { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-col + .footer-col { border: 0; padding: 0; }
    .perks { grid-template-columns: repeat(2, 1fr); gap: 16px 0; }
    .perk:nth-child(3) { border: 0; }
    .rail-track { grid-auto-columns: calc((100% - 2 * 16px) / 3); gap: 16px; }
    .page-hero .container { grid-template-columns: 1fr; min-height: 200px; }
    .page-hero-img { width: 60%; opacity: .5; }
}
@media (max-width: 640px) {
    body { font-size: 14px; padding-bottom: 64px; }
    .container { padding-inline: 16px; }
    .topbar-tools .lbl { display: none; }
    .hide-sm { display: none !important; }
    .products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .rail-track { grid-auto-columns: 70%; gap: 12px; }
    .rail-btn { display: none; }
    .section { padding: 36px 0; }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
    .footer-bottom .container { justify-content: center; text-align: center; }
    .perks { grid-template-columns: 1fr 1fr; padding: 16px 0; }
    .perk { flex-direction: column; text-align: center; gap: 6px; }
    .perk + .perk { border: 0; }
    .mobile-bar {
        display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; inset-inline: 0; z-index: 60;
        background: #fff; border-top: 1px solid var(--border); height: 60px;
    }
    .mobile-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); }
    .mobile-bar a.active, .mobile-bar a:hover { color: var(--primary); }
    .mobile-bar .icon { width: 21px; height: 21px; }
    .wa-float { bottom: 76px; width: 48px; height: 48px; }
    .p-card .btn { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   v2 — header, card stars, drawers, auth modal, zoom, chips, footer
   ===================================================================== */
.site-header .container { gap: 24px; }
.nav-list { gap: 26px; }
.nav-link { white-space: nowrap; }
.header-actions { flex: none; }
.search { flex: 0 1 300px; min-width: 200px; }

/* product card */
.p-body { display: flex; flex-direction: column; gap: 6px; }
.p-title { display: block; }
.stars-avg { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.stars-bg { position: relative; display: inline-block; color: #e6d6cf; font-size: 14px; letter-spacing: 2px; white-space: nowrap; }
.stars-fg { position: absolute; inset-block: 0; inset-inline-start: 0; overflow: hidden; color: var(--gold); white-space: nowrap; }
.rating-txt { color: var(--muted); font-size: 13px; margin-inline-start: 8px; }

/* side drawers (cart; filters on phones) */
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 95; width: min(420px, 92vw); background: #fff; display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(42, 35, 36, .18); transform: translateX(105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
[dir="rtl"] .drawer { transform: translateX(-105%); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.drawer-head h3 .icon { color: var(--primary); }
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 20px; overscroll-behavior: contain; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--border); display: grid; gap: 10px; background: #fdfaf8; }
.drawer.is-empty .drawer-foot .drawer-total, .drawer.is-empty .drawer-foot a.btn { display: none; }
.drawer-total { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.drawer-total strong { font-size: 19px; }
.drawer-empty { display: grid; place-items: center; gap: 10px; padding: 60px 0; color: var(--muted); text-align: center; }
.drawer-empty .icon { width: 46px; height: 46px; color: var(--primary); }
.mini-item { display: grid; grid-template-columns: 64px 1fr 30px; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: start; }
.mini-item img, .mini-item.sk .skeleton { width: 64px; height: 78px; object-fit: cover; border-radius: 8px; }
.mini-item.sk { grid-template-columns: 64px 1fr; }
.mini-item.busy { opacity: .5; pointer-events: none; }
.mini-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini-info > a { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-info small { color: var(--muted); font-size: 12px; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.qty.sm button, .qty.sm > span { min-width: 30px; height: 32px; display: grid; place-items: center; font-size: 14px; }
.qty.sm button { color: var(--primary); font-size: 17px; }
.qty.sm button:hover { background: var(--cream); }
.qty.sm > span { border-inline: 1px solid var(--border); padding: 0 6px; }

/* sign in / sign up modal */
.auth { border: 0; padding: 0; border-radius: 20px; width: min(860px, calc(100% - 24px)); max-width: none; max-height: calc(100vh - 24px); overflow: hidden; color: var(--ink);
    box-shadow: 0 30px 80px rgba(42, 35, 36, .3); margin: auto; }
.auth[open] { display: grid; grid-template-columns: 300px 1fr; animation: authIn .28s ease; }
.auth::backdrop { background: rgba(42, 35, 36, .55); backdrop-filter: blur(3px); }
@keyframes authIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.auth-side { background: linear-gradient(160deg, var(--cream), #ecd5cc); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; text-align: center; }
.auth-side img { width: 130px; height: auto; }
.auth-side p { font-family: var(--font-head); font-size: 20px; color: var(--wine); }
.auth-main { padding: 34px 34px 28px; overflow-y: auto; max-height: calc(100vh - 24px); }
.auth-x { position: absolute; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; z-index: 2; }
.auth-x:hover { background: var(--cream); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.auth-tabs button { height: 40px; border-radius: 9px; font-weight: 500; color: var(--muted); transition: .2s; }
.auth-tabs button.on { background: #fff; color: var(--wine); box-shadow: var(--shadow-sm); }
.auth-pane { display: none; }
.auth-pane.on { display: block; }
.auth-pane h2 { font-size: 26px; margin-bottom: 4px; }
.auth-pane > .muted { margin-bottom: 18px; font-size: 14px; }
.auth .field { margin-bottom: 12px; }
.auth .field label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--ink); font-weight: 500; }
.auth .field input, .auth .field select { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: #fdfbfa; font: inherit; }
.auth .field input:focus, .auth .field select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.auth .field.invalid input { border-color: var(--danger); }
.auth .field-error { color: var(--danger); font-size: 12px; }
.auth .field-error:empty { display: none; }
.auth .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 44px !important; }
.pw-eye { position: absolute; top: 0; bottom: 0; inset-inline-end: 4px; width: 40px; display: grid; place-items: center; color: var(--muted); }
.auth-link { display: inline-block; font-size: 13px; color: var(--primary); margin: 2px 0 14px; }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 14px; }
.auth-switch a { color: var(--wine); font-weight: 500; }
.btn.loading { opacity: .7; pointer-events: none; }
@media (max-width: 760px) {
    .auth { width: 100%; max-height: 100%; height: 100%; border-radius: 0; }
    .auth[open] { display: block; }
    .auth-side { display: none; }
    .auth-main { padding: 60px 20px 24px; max-height: 100vh; }
    .auth .grid-2 { grid-template-columns: 1fr; }
}

/* zoom box */
.zoombox { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: rgba(20, 16, 17, .94); color: #fff; }
.zoombox[open] { display: flex; flex-direction: column; }
.zoombox::backdrop { background: rgba(20, 16, 17, .9); }
.zb-view { flex: 1; display: grid; place-items: center; overflow: hidden; cursor: zoom-in; touch-action: none; user-select: none; }
.zb-view.zoomed { cursor: grab; }
.zb-view.zoomed:active { cursor: grabbing; }
.zb-view img { max-width: 92vw; max-height: calc(100vh - 110px); object-fit: contain; transition: transform .12s ease-out; will-change: transform; }
.zb-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; }
.zb-bar button { min-width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; font-size: 13px; padding: 0 10px; }
.zb-bar button:hover { background: rgba(255, 255, 255, .24); }
.zb-bar input[type=range] { width: min(260px, 40vw); accent-color: var(--primary); }
.zb-val { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.zb-x { position: absolute; top: 16px; inset-inline-end: 16px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; }
.zb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; }
.zb-prev { inset-inline-start: 16px; }
.zb-next { inset-inline-end: 16px; }
.zoombox.single .zb-nav { display: none; }

/* square option chips (colour / size) */
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip { min-width: 48px; height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 14px; color: var(--ink); transition: .15s; }
.opt-chip:hover { border-color: var(--primary); }
.opt-chip.on { border-color: var(--wine); background: var(--wine); color: #fff; box-shadow: 0 4px 12px rgba(110, 31, 44, .2); }
.opt-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* footer bottom: copyright | payment | developer */
.footer-bottom .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.footer-bottom .copy { margin: 0; }
.footer-bottom .dev { justify-self: end; }
.pay { gap: 8px; }
.pay-card { height: 30px; min-width: 48px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; background: #fff; border: 1px solid var(--border); border-radius: 6px; font-weight: 700; font-size: 12px; }
.pay-card.pay-knet { background: #0c4da2; color: #ffd200; border-color: #0c4da2; }
.pay-card.pay-apple { background: #000; color: #fff; border-color: #000; font-size: 13px; }

@media (max-width: 992px) {
    .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; } /* a filter would trap the fixed menu inside the header */
    .site-header .container { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "menu logo actions" "search search search"; height: auto; padding-block: 8px; gap: 8px 12px; }
    .menu-toggle { display: grid; grid-area: menu; }
    .site-header .logo { grid-area: logo; justify-self: center; }
    .site-header .logo img { width: 74px; }
    .header-actions { grid-area: actions; margin: 0; }
    .search { grid-area: search; width: 100%; min-width: 0; flex: none; }
}
@media (max-width: 760px) {
    .footer-bottom .container { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .footer-bottom .dev { justify-self: center; }
    .drawer { width: 100vw; }
}

/* =====================================================================
   v3 — bigger cards (4 per row), photo cycling, quick add, square WhatsApp,
   "added" popup, wider top bar
   ===================================================================== */
.topbar { background: linear-gradient(90deg, var(--wine), var(--primary) 55%, var(--wine)); font-size: 13.5px; letter-spacing: .02em; }
.topbar .container { min-height: 40px; }
.topbar-perks { gap: 34px; }
.topbar-perks li { gap: 8px; }
.site-header .container { height: 84px; }
.site-header { box-shadow: 0 6px 24px rgba(110, 31, 44, .05); }

.products { grid-template-columns: repeat(4, 1fr); gap: 24px; }
.rail-track { grid-auto-columns: calc((100% - 3 * 24px) / 4); gap: 24px; scroll-behavior: smooth; }
.p-card { border-radius: 16px; }
.p-media img { transition: transform .6s, opacity .35s; }
.p-media.no-img img, img.is-logo { object-fit: contain !important; padding: 18%; background: var(--cream); opacity: .85; }
.p-dots { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 5px; opacity: 0; transition: opacity .25s; z-index: 2; }
.p-dots i { width: 18px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .6); transition: background .25s; }
.p-dots i.on { background: #fff; }
.p-card:hover .p-dots { opacity: 1; }
.p-body { padding: 14px 16px 16px; gap: 6px; }
.p-title { font-size: 15.5px; font-weight: 500; }
.p-short { color: var(--muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; }
.p-price { font-size: 16px; font-weight: 600; }
.p-tag.sale { background: var(--danger); }
.p-add { width: 100%; margin-top: 8px; }
.p-add.loading { opacity: .6; pointer-events: none; }

/* square WhatsApp button */
.wa-float { border-radius: 14px; width: 52px; height: 52px; }
.wa-float:hover { transform: translateY(-2px); }

/* "added to cart" popup */
.added-pop { position: fixed; z-index: 210; top: 96px; inset-inline-end: 20px; width: min(360px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px;
    padding: 14px 14px 14px 16px; background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(42, 35, 36, .2); border: 1px solid var(--border);
    transform: translateY(-14px); opacity: 0; pointer-events: none; transition: .3s; }
.added-pop.show { transform: none; opacity: 1; pointer-events: auto; }
.ap-ic { width: 40px; height: 40px; border-radius: 50%; background: #e4f3e9; color: var(--success); display: grid; place-items: center; flex: none; }
.ap-ic .icon { stroke-width: 2.4; }
.added-pop div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.added-pop strong { font-size: 14.5px; }
.added-pop small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge.bump { animation: bump .5s ease; }
@keyframes bump { 30% { transform: scale(1.45); } }

@media (max-width: 1200px) {
    .products { grid-template-columns: repeat(3, 1fr); }
    .rail-track { grid-auto-columns: calc((100% - 2 * 20px) / 3); gap: 20px; }
}
@media (max-width: 760px) {
    .products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .rail-track { grid-auto-columns: 62%; gap: 12px; }
    .p-body { padding: 10px 10px 12px; }
    .p-title { font-size: 14px; }
    .p-short { display: none; }
    .added-pop { top: auto; bottom: 76px; inset-inline: 16px; width: auto; }
    .site-header .container { height: auto; }
}

/* the reset above (* { margin: 0 }) removes the browser centring of <dialog>; put it back for every modal */
dialog { margin: auto; inset: 0; max-height: calc(100vh - 32px); overflow-y: auto; }
.zoombox { margin: 0; max-height: 100vh; overflow: hidden; }
.measure-dlg, .addr-dlg, .order-dlg { width: calc(100% - 32px); }

/* footer polish: square social icons (same as the WhatsApp button) and room for the floating button */
.socials a { border-radius: 10px; width: 36px; height: 36px; }
.footer-bottom .container { padding-inline-end: 84px; }
[dir="rtl"] .footer-bottom .container { padding-inline-end: 84px; }
.footer-col h4 { font-size: 15px; letter-spacing: .01em; }
.footer-col li a { transition: color .2s, padding .2s; }
.footer-col li a:hover { padding-inline-start: 4px; }
@media (max-width: 760px) { .footer-bottom .container { padding-inline-end: 16px; padding-bottom: 80px; } }

/* top bar + footer bottom aligned to the same container edges */
.topbar .container { display: grid; grid-template-columns: 1fr auto; }
.topbar-perks { justify-content: flex-start; }
.topbar-tools { justify-self: end; }
.footer-bottom .container, [dir="rtl"] .footer-bottom .container { padding-inline: 20px; }
.footer-bottom { padding-inline-end: 0; }
@media (min-width: 761px) { .wa-float { bottom: 84px; } }

/* ---- mobile menu drawer: above the dark overlay, clearer as a category menu ---- */
@media (max-width: 992px) {
    .site-header:has(.nav.open), body.nav-open .site-header { z-index: 100; }
    .nav { width: min(360px, 88vw); padding: 0; box-shadow: 10px 0 40px rgba(42, 35, 36, .2); display: flex; flex-direction: column; }
    .nav-head { position: sticky; top: 0; z-index: 2; background: linear-gradient(120deg, var(--cream), #efdcd4); padding: 16px 18px; margin: 0 !important; border-bottom: 1px solid var(--border); }
    .nav-title { display: flex; align-items: center; gap: 12px; }
    .nav-title strong { font-family: var(--font-head); font-size: 19px; color: var(--wine); font-weight: 500; }
    .nav-list { padding: 6px 18px 24px; }
    .nav-link { padding: 15px 4px; font-size: 15.5px; font-weight: 500; }
    .nav-link.active { color: var(--wine); }
    .nav-item.has-mega > .nav-link .icon { transition: transform .2s; }
    .nav-item.open > .nav-link .icon { transform: rotate(180deg); }
    .mega { padding: 4px 0 10px; border-inline-start: 2px solid var(--primary-soft); margin-inline-start: 6px; }
    .mega a { padding: 10px 14px; font-size: 14.5px; color: var(--muted); border-radius: 8px; }
    .mega a:hover, .mega a:active { background: var(--cream); color: var(--wine); }
    .mega .mega-all { border-top: 0; margin-top: 0; color: var(--wine); font-weight: 500; }
}

/* language menu with flags */
.topbar .flag, .dd-menu .flag { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.topbar .dd-toggle { display: inline-flex; align-items: center; gap: 6px; }
.topbar .dd-menu a { display: flex; align-items: center; gap: 10px; }
.topbar .dd-menu a.on { font-weight: 600; color: var(--primary, #8e3b46); }
