/* Components added for the real site, on top of app.css (the v3 design). */

/* Hebrew uses Heebo; English headings use the Latin serif. */
body.lang-he { --body: "Heebo", "Almarai", "Segoe UI", Tahoma, sans-serif; --display: "Heebo", "El Messiri", sans-serif; }
body.lang-en { --display: "Cormorant Garamond", Georgia, serif; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#view { min-height: 60vh; }
.page-h { font-size: 25px; margin-block-end: 12px; }
.page-col { max-width: 760px; }

/* Header details */
.search > svg { position: absolute; inset-inline-start: 15px; top: 13px; color: var(--muted); pointer-events: none; }
.soc a { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); }
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; padding: 3px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; border: 1px solid var(--line-2); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { background: var(--blush); }
.lang-switch ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 50; min-width: 140px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.lang-switch a { display: block; padding: 7px 10px; border-radius: 6px; font-size: 14px; }
.lang-switch a:hover { background: var(--blush); }
.lang-switch a[aria-current] { color: var(--rose-d); font-weight: 700; }

/* Phone: language switch next to the logo, since the utility bar is hidden. */
.hdr-lang { display: block; }
@media (min-width: 720px) { .hdr-lang { display: none; } }

/* Hero picture inside the arch */
.hero-art { position: absolute; bottom: 4%; inset-inline: 2%; width: 96%; height: auto; max-height: 92%; object-fit: contain; object-position: bottom; }
.slide-tx h2 em { font-style: normal; }

/* Categories page */
.cat-block { margin-block-end: 22px; }
.cat-block-h { display: flex; gap: 8px; align-items: baseline; font: 600 20px/1.4 var(--display); color: var(--rose-d); margin-block-end: 10px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 14px; }
.cat-grid .circle { width: auto; }

/* Cart page (rendered by app.js from localStorage) */
.cart-sum { margin-block-start: 12px; display: grid; gap: 10px; }
.ln-note { margin-block-start: 8px; }
.ln-note input { width: 100%; min-height: 38px; padding-inline: 10px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 14px; background: var(--bg); }
.ln-note input:focus { outline: none; border-color: var(--rose); }

/* Product gallery thumbnails are images now */
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pc-img > img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.pc:hover .pc-img > img { transform: scale(1.05); }
.fav.on svg { fill: var(--rose); stroke: var(--rose); }
.check { gap: 9px; }
.f-g .check span.small { margin-inline-start: auto; }
.f-head a.btn { margin-inline-start: auto; }

/* ---------- Cart, checkout and order pages ---------- */
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ck-main { display: grid; gap: 14px; min-width: 0; }
.stepper a { color: inherit; text-decoration: underline; }
.sum-rows { display: grid; gap: 6px; margin-block-start: 10px; padding-block-start: 10px; border-top: 1px solid var(--line); }
.cart-sum .sum-rows { margin-block-start: 0; border-top: 0; padding-block-start: 0; }
.ck-line { display: flex; justify-content: space-between; gap: 10px; margin-block-end: 8px; font-size: 14px; }
.ck-line > span:last-child { flex: none; font-variant-numeric: tabular-nums; }
.ck-line small { display: block; }
.item-note { display: block; width: fit-content; margin-block-start: 4px; padding: 2px 8px; border-radius: 6px; background: var(--blush); color: var(--rose-d); font-size: 12.5px; }
.warn-t { display: block; color: var(--warn); font-weight: 600; font-size: 12.5px; }
.bad-t, .coupon-msg.bad { color: var(--bad); }
.good-t, .coupon-msg.good { color: var(--good); font-weight: 700; }
.coupon-msg { min-height: 1.4em; margin-block: 6px 2px; }
.form-err { padding: 8px 12px; border-radius: 10px; background: var(--bad-bg); margin-block-start: 8px; }
.note.bad { background: var(--bad-bg); color: var(--bad); margin-block-end: 10px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 4px; vertical-align: -1px; border: 1px solid rgba(0, 0, 0, .1); }
.sub-h { font-size: 15px; margin-block: 16px 8px; }
.order-page .timeline { margin-block-end: 6px; }
.order-note { white-space: pre-wrap; padding: 10px 12px; border-radius: 10px; background: var(--blush); }
.order-items { display: grid; }
.order-items li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding-block: 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.order-items li > b { font-variant-numeric: tabular-nums; }
.order-items .th { width: 52px; height: 52px; border-radius: 9px; overflow: hidden; background: var(--blush); }
.order-items .th img { width: 100%; height: 100%; object-fit: cover; }
.order-items a { font-weight: 600; }

/* Customer accounts */
.note.good { background: var(--good-bg); color: var(--good); }
.icon-btn .dot-in { min-width: 9px; width: 9px; height: 9px; padding: 0; background: var(--good); border: 2px solid var(--surface); top: 6px; inset-inline-end: 6px; }
.auth .link { width: fit-content; }
.acc-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-block: 6px 14px; }
.acc-orders li { border-bottom: 1px solid var(--line); }
.acc-orders li > a { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding-block: 11px; }
.acc-orders .end { text-align: end; flex: none; }
@media (min-width: 1020px) {
  .acc { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}

/* Printable invoice */
.inv-body { background: #f3eef0; padding-inline: 12px; }
.inv-tools { display: flex; justify-content: space-between; max-width: 800px; margin: 14px auto 0; }
.inv { max-width: 800px; margin: 12px auto 40px; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 18px; }
.inv-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block-end: 14px; border-bottom: 2px solid var(--rose-d); }
.inv-logo { font: 600 28px/1.2 var(--display); color: var(--rose-d); }
.inv-meta { text-align: end; }
.inv-meta h1 { font-size: 20px; }
.inv-to { display: grid; gap: 3px; font-size: 14px; }
.inv-note { margin-block-start: 6px; padding: 7px 10px; border-radius: 8px; background: var(--blush); }
.inv-note.admin { background: var(--warn-bg); color: var(--warn); }
.inv-t th, .inv-t td { padding: 8px 6px; }
.inv-t .num { text-align: end; white-space: nowrap; }
.inv-sum { width: min(100%, 330px); margin-inline-start: auto; display: grid; gap: 6px; }
.inv-sum .sum-rows { border-top: 0; margin: 0; padding: 0; }
.inv-thanks { text-align: center; color: var(--muted); font-size: 14px; }
@media print {
  .inv-tools { display: none; }
  .inv-body { background: #fff; padding: 0; }
  .inv { border: 0; margin: 0; max-width: none; padding: 0; }
  @page { margin: 14mm; }
}

/* ---------- Admin ---------- */
.flash { padding: 10px 14px; border-radius: 10px; margin-block-end: 12px; font-weight: 600; font-size: 14px; }
.flash.good { background: var(--good-bg); color: var(--good); }
.flash.bad { background: var(--bad-bg); color: var(--bad); }
.side-out { display: contents; }
.side-out button { flex: none; display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 6px; font-size: 13.5px; color: #c9aebb; }
.side-out button svg { width: 18px; height: 18px; }
.side-out button:hover { background: #442c38; color: #fff; }
.ad-h h1 .st { vertical-align: middle; font-family: var(--body); }
.ad-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ad-acts .btn svg { width: 17px; height: 17px; }
.link { color: var(--rose-d); font-weight: 600; }
.col { display: grid; gap: 12px; min-width: 0; align-content: start; }
.tabs { display: flex; gap: 2px; overflow-x: auto; margin-block-end: 10px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a { padding: 8px 12px; white-space: nowrap; font-size: 14px; border-bottom: 2px solid transparent; margin-block-end: -1px; }
.tabs a.on { border-color: var(--rose); color: var(--rose-d); font-weight: 700; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-block-start: 12px; }
.empty-row { text-align: center; padding: 30px 10px; display: grid; gap: 10px; justify-items: center; }
.mini-list li { border-bottom: 1px solid var(--line); }
.mini-list li, .mini-list li > a { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding-block: 8px; }
.mini-list li > a { flex: 1; padding-block: 0; }
.mini-list .end { text-align: end; flex: none; }
.mini-list svg { width: 17px; height: 17px; vertical-align: -3px; }
.push-cta { display: flex; align-items: center; gap: 12px; margin-block-end: 12px; background: var(--ink); color: #fff; border: 0; }
.push-cta > svg { flex: none; color: var(--gold-l); }
.push-cta div { flex: 1; }
.push-cta .muted { color: #d9c6cf; }
.bars { width: 100%; height: auto; display: block; }
.bars text { font-size: 13px; fill: var(--muted); }

/* Orders */
.order-rows li > a { display: grid; gap: 4px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.order-rows li > a:hover { background: #fdf8fa; }
.or-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.or-total { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.or-who { font-size: 14px; }
.or-items { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.has-note { color: var(--rose-d); font-weight: 700; }

/* Products */
.prod-rows li > a.pr-c { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.prod-rows li > a:hover { background: #fdf8fa; }
.prod-rows .th { width: 52px; height: 52px; background: var(--blush); display: grid; place-items: center; color: var(--rose); }
.pr-main { display: grid; min-width: 0; align-content: center; }
.pr-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-end { display: grid; justify-items: end; gap: 2px; text-align: end; }
.miss { color: var(--warn); }
.dsc-t { color: var(--bad); font-weight: 700; }
.lang-tabs { display: flex; gap: 5px; flex-wrap: wrap; margin-block-end: 12px; }
.lang-tabs button { padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; }
.lang-tabs button.on { background: var(--rose-d); color: #fff; border-color: var(--rose-d); }
.lang-tabs button.on .miss { color: #fde7b0; }
.lang-tabs small { font-weight: 400; font-size: 12px; }
.seo-box summary { cursor: pointer; color: var(--rose-d); }
.seo-box[open] { gap: 12px; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-block-end: 10px; }
.img-cell { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: grid; background: var(--surface); }
.img-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--blush); }
.img-cell .check { padding-inline: 8px; min-height: 30px; font-size: 13px; }
.img-cell .del { color: var(--bad); }
.drop { position: relative; }
.drop > svg { color: var(--rose); }
.prev em { background: rgba(46, 26, 37, .7); }
.shade-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 70px 32px; gap: 6px; margin-block-end: 8px; align-items: start; }
.shade-row input[type=color] { width: 44px; height: 44px; padding: 2px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.shade-row .input { min-height: 44px; padding-inline: 9px; }
.shade-names { display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.shade-row .x { height: 44px; }
.checks { display: flex; flex-wrap: wrap; gap: 0 16px; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { font-weight: 600; font-size: 13.5px; margin-block-end: 4px; }
.save-btn { min-height: 52px; position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 5; box-shadow: var(--shadow); }
.danger-zone { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-block-start: 18px; padding-block-start: 14px; border-top: 1px dashed var(--line-2); }
.danger-zone .btn { color: var(--bad); }

/* Categories, coupons, settings */
.cat-tree { margin-block-end: 12px; }
.cat-row { display: flex; gap: 10px; align-items: center; padding-block: 8px; padding-inline: 34px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.cat-row.top { padding-inline-start: 4px; font-size: 15px; }
.cat-row:hover { background: #fdf8fa; }
.cat-row .th { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--blush); display: grid; place-items: center; flex: none; color: var(--rose); }
.cat-row img { width: 100%; height: 100%; object-fit: cover; }
.cat-row .end { margin-inline-start: auto; }
.cat-img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-block: 8px; }
.coupon-rows li { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; padding-block: 10px; border-bottom: 1px solid var(--line); }
.steps-list { display: grid; gap: 6px; padding-inline-start: 18px; list-style: disc; margin-block-end: 12px; }
.push-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-h h2 svg { vertical-align: -3px; }
.sm-in { min-height: 38px !important; width: 76px !important; padding: 5px 8px !important; font-size: 15px; }
.eta-in { white-space: nowrap; }
.kv dd a { color: var(--rose-d); font-weight: 600; }

/* Tables (products as a table, customers, users, visitors) */
.data-t td, .data-t th { padding: 9px 8px; }
.data-t td { font-size: 13.5px; }
.data-t .num { text-align: end; }
.nowrap { white-space: nowrap; }
.row-alert { background: var(--bad-bg); }
.row-alert:hover { background: var(--bad-bg) !important; }
.path-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.tbl-prod { min-width: 220px; }
.tbl-prod .th { width: 40px; height: 40px; }
.inline-f { display: inline; }
.sm-sel { min-height: 34px; padding-block: 3px; font-size: 13px; }
.view-sw { display: inline-flex; gap: 2px; padding: 3px; margin-block-end: 10px; border-radius: 10px; background: var(--blush); }
.view-sw a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.view-sw a.on { background: var(--surface); color: var(--rose-d); box-shadow: var(--shadow-s); }
.push-status { margin-block-start: 10px; padding: 9px 12px; border-radius: 10px; }
.push-status:empty { display: none; }
.push-status.good { background: var(--good-bg); color: var(--good); font-weight: 600; }
.push-status.bad { background: var(--bad-bg); color: var(--bad); }

/* Store look */
.look-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.logo-prev { display: grid; place-items: center; min-height: 96px; padding: 12px; margin-block-end: 10px; border: 1px dashed var(--line-2); border-radius: 12px; background: repeating-conic-gradient(#f3eef0 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.logo-prev img { max-height: 80px; max-width: 100%; object-fit: contain; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: grid; justify-items: center; gap: 4px; width: 74px; padding: 6px 4px; border-radius: 10px; border: 1.5px solid var(--line); cursor: pointer; font-size: 11.5px; text-align: center; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch i { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.swatch:has(input:checked) { border-color: var(--ink); background: var(--blush); font-weight: 700; }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=color] { width: 56px !important; height: 44px; padding: 3px !important; }
.logo-img { display: block; height: 38px; width: auto; max-width: 116px; object-fit: contain; }
/* Phones: the wishlist is already in the bottom bar, so the header keeps room for the account icon. */
@media (max-width: 719px) { .hdr-end .wish-btn { display: none; } }
.ftr .logo-img { height: 56px; }
.side-logo { max-height: 40px; max-width: 150px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px 6px; }
.inv-logo-img { max-height: 60px; max-width: 220px; object-fit: contain; }

@media (min-width: 720px) {
  .logo-img { height: 56px; max-width: 240px; }
  .look-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1020px) {
  .side-out { display: flex; flex: 1; align-items: flex-end; padding-block-end: 12px; }
}

/* ---------- Live search panel (public/js/app.js) ---------- */
.search.sugg-open input { border-color: var(--rose); background: var(--surface); box-shadow: 0 0 0 3px var(--blush-2); }
.sugg { position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 60; max-height: min(72vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 48px rgba(46, 26, 37, .18); animation: sugg-in .16s ease; }
@keyframes sugg-in { from { opacity: 0; transform: translateY(-6px); } }
.sugg-h { padding: 8px 8px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--muted); }
.sugg-cards { display: grid; gap: 4px; }
.sugg-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 14px; transition: background .12s ease; }
.sugg-card:hover, .sugg-card.on, .sugg-link:hover, .sugg-link.on, .sugg-all:hover, .sugg-all.on { background: var(--blush); }
.sugg-img { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--blush); }
.sugg-img img { width: 100%; height: 100%; object-fit: cover; }
.sugg-img em { position: absolute; top: 4px; inset-inline-start: 4px; padding: 0 6px; border-radius: 999px; background: var(--rose); color: #fff; font: 700 10.5px/1.6 var(--body); font-style: normal; }
.sugg-tx { display: grid; gap: 2px; min-width: 0; }
.sugg-tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.sugg-brand { font: 600 12px/1.2 var(--latin); color: var(--gold); direction: ltr; text-align: start; }
.sugg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.sugg-price { font-weight: 700; color: var(--rose-d); }
.sugg-meta s { color: var(--muted); font-size: 12px; }
.sugg-rate { color: var(--gold); font-size: 12px; }
.sugg-dots { display: inline-flex; gap: 3px; }
.sugg-dots i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .08); }
.sugg-out { color: var(--bad); font-weight: 600; }
.sugg mark { background: transparent; color: var(--rose); font-weight: 800; }
.sugg-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 6px 6px; }
.sugg-link { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; }
.sugg-link small { color: var(--muted); font-size: 11.5px; }
.sugg-all { display: block; margin-block-start: 6px; padding: 11px; border-radius: 12px; border-top: 1px solid var(--line); text-align: center; font-weight: 700; color: var(--rose-d); }
.sugg-empty { padding: 16px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.sugg-loading { animation: sugg-pulse 1s ease-in-out infinite alternate; }
@keyframes sugg-pulse { to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .sugg, .sugg-loading { animation: none; } }

/* ---------- Text size chosen in the admin ----------
   --fs is 1 for "normal" (set in the page head by views/components/Theme.tsx). */
body { font-size: calc(15px * var(--fs, 1)); }
.small { font-size: calc(13px * var(--fs, 1)); }
.crumbs { font-size: calc(13px * var(--fs, 1)); }
.field { font-size: calc(13.5px * var(--fs, 1)); }
.btn { font-size: calc(14px * var(--fs, 1)); }
.btn.sm { font-size: calc(13px * var(--fs, 1)); }
.page-h { font-size: calc(25px * var(--fs, 1)); }
.pc-n { font-size: calc(13.5px * var(--fs, 1)); }
.circle { font-size: calc(12.5px * var(--fs, 1)); }
.menu-l, details.menu summary { font-size: calc(15px * var(--fs, 1)); }
.band h2 { font-size: calc(17px * var(--fs, 1)); }
@media (min-width: 720px) {
  .pc-n { font-size: calc(14.5px * var(--fs, 1)); }
  .band h2 { font-size: calc(20px * var(--fs, 1)); }
}

/* ---------- Footer brand block: name or logo, social links, rights, credit ---------- */
.ftr-brand { display: grid; justify-items: center; gap: 10px; margin-block-start: 26px; padding-block-start: 22px; border-top: 1px solid var(--line-2); text-align: center; }
.ftr-brand .logo { justify-content: center; }
.ftr-soc { display: flex; justify-content: center; gap: 10px; }
.ftr-soc a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #6b5360; color: var(--gold-l); transition: transform .15s ease; }
.ftr-soc a:hover { transform: translateY(-2px); }
.ftr-soc svg { width: 19px; height: 19px; }
.ftr-wa { display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 999px; background: var(--wa); color: #fff; font-weight: 700; font-size: 14px; }
.ftr-wa svg { width: 19px; height: 19px; }
.ftr-rights { margin: 0; font-size: 13px; color: inherit; opacity: .85; }
.ftr-credit { margin: 0; font-size: 12.5px; opacity: .8; }
.ftr-credit a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ftr-credit bdi { opacity: .75; }

/* Arabic store name in the header (beige theme); the classic theme keeps the Latin wordmark. */
.wordmark-ar { display: block; font: 700 30px/1.05 var(--logo-font, serif); color: var(--rose-d); }

/* Settings page: design choices */
.theme-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.theme-card { position: relative; display: grid; gap: 8px; padding: 12px; border: 1.5px solid var(--line-2); border-radius: 14px; cursor: pointer; }
.theme-card:has(input:checked) { border-color: var(--ink); background: var(--blush); }
.theme-card input { position: absolute; opacity: 0; }
.theme-card .tc-prev { display: flex; align-items: center; justify-content: center; gap: 8px; height: 70px; border-radius: 10px; }
.tc-beige { background: linear-gradient(180deg, #fbf4ed, #f1e2d5); color: #cf8a92; font: 700 30px/1 "Aref Ruqaa", serif; }
.tc-classic { background: #5e1a39; color: #fff; font: 600 26px/1 "Cormorant Garamond", serif; }
.tc-prev i { display: inline-block; width: 46px; height: 18px; border-radius: 999px; }
.font-pick { display: grid; gap: 6px; }
.font-sample { padding: 8px 12px; border-radius: 10px; background: var(--blush); font-size: 18px; line-height: 1.6; min-height: 46px; }
.size-row { display: flex; flex-wrap: wrap; gap: 8px; }
.size-row label { display: grid; justify-items: center; gap: 2px; min-width: 74px; padding: 8px 10px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; font-size: 13px; }
.size-row label:has(input:checked) { border-color: var(--ink); background: var(--blush); font-weight: 700; }
.size-row input { position: absolute; opacity: 0; }
.size-row b { font-family: var(--body); line-height: 1.2; }

/* Admin product form: extra categories */
.extra-cats { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: 260px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.extra-cats b { grid-column: 1 / -1; font-size: 13px; color: var(--muted); margin-block-start: 6px; }

/* Categories page: picture of each main category */
.cat-top-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.cat-block-h { align-items: center; }

/* Continue with Google (Google's own look: white, grey border, the G mark) */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; width: 100%; border: 1px solid #dadce0; border-radius: 999px; background: #fff; color: #1f1f1f; font: 600 15px/1 'Roboto', var(--body); transition: background .15s ease, box-shadow .15s ease; }
.btn-google:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(60, 64, 67, .2); }
.auth-or { display: flex; align-items: center; gap: 10px; margin-block: 14px; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }

/* Privacy policy */
.legal h2 { font-size: calc(17px * var(--fs, 1)); margin-block: 18px 6px; color: var(--rose-d); }
.legal p { line-height: 1.9; }

/* =====================================================================
   Round 3: cart drawer, offer pop-up, shop filters, contact, polish
   ===================================================================== */

/* Countdown labels (day/hour/min/sec) readable on every background */
.cd small { color: inherit; opacity: .78; font-weight: 700; font-size: 10.5px; letter-spacing: .01em; }
.deal-box .cd small, .theme-beige .cd small { color: var(--rose-d); opacity: 1; }

/* Product cards: lift and glow on hover (mouse only) */
@media (hover: hover) {
  .pc { transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s ease, border-color .28s ease; will-change: transform; }
  .pc:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(60, 20, 38, .14); border-color: var(--rose-l); }
  .pc-img > img { transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
  .pc:hover .pc-img > img { transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) { .pc, .pc:hover, .pc:hover .pc-img > img { transform: none; transition: none; } }

/* "Hurry, only N left" */
.hurry { display: flex; align-items: center; gap: 9px; margin: 2px 0 0; padding: 9px 13px; border-radius: 12px; background: #fff3e6; color: #a2531a; font-weight: 700; font-size: calc(14px * var(--fs, 1)); border: 1px solid #f6d6b5; }
.hurry i { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #e0702a; box-shadow: 0 0 0 0 rgba(224, 112, 42, .55); animation: hurry 1.6s infinite; }
@keyframes hurry { 70% { box-shadow: 0 0 0 9px rgba(224, 112, 42, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 112, 42, 0); } }
.hurry-s { display: block; color: #a2531a; font-weight: 700; font-size: 12px; }
.shade.sold { opacity: .45; text-decoration: line-through; }
.qty button[disabled] { opacity: .35; cursor: not-allowed; }

/* Cart drawer: slides in from the side the cart icon is on */
.cdrawer { position: fixed; inset: 0 auto 0 0; inset-inline-start: auto; inset-inline-end: 0; margin: 0; width: min(420px, 100vw); height: 100dvh; max-height: none; max-width: none; padding: 0; border: 0; background: var(--surface); box-shadow: -18px 0 50px rgba(30, 10, 20, .2); }
.cdrawer[open] { animation: drawer-in .32s cubic-bezier(.2, .8, .25, 1); }
.cdrawer.closing { animation: drawer-out .22s ease-in forwards; }
.cdrawer::backdrop { background: rgba(30, 14, 22, .45); backdrop-filter: blur(3px); animation: fade-in .3s ease; }
[dir=rtl] .cdrawer { box-shadow: 18px 0 50px rgba(30, 10, 20, .2); }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-out { to { transform: translateX(100%); } }
[dir=rtl] .cdrawer[open] { animation-name: drawer-in-rtl; }
[dir=rtl] .cdrawer.closing { animation-name: drawer-out-rtl; }
@keyframes drawer-in-rtl { from { transform: translateX(-100%); } }
@keyframes drawer-out-rtl { to { transform: translateX(-100%); } }
@keyframes fade-in { from { opacity: 0; } }
.cd-in { display: flex; flex-direction: column; height: 100%; }
.cd-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); font: 700 18px/1.2 var(--display); }
.cd-lines { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 18px; transition: opacity .2s ease; }
.cd-lines.loading { opacity: .55; }
.cd-empty { display: grid; place-items: center; height: 100%; text-align: center; color: var(--muted); }
.cdl { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); animation: line-in .3s ease both; }
@keyframes line-in { from { opacity: 0; transform: translateY(6px); } }
.cdl .th { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--blush); }
.cdl .th img { width: 100%; height: 100%; object-fit: cover; }
.cdl-b { display: grid; gap: 3px; min-width: 0; padding-inline-end: 24px; }
.cdl-n { font-weight: 600; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cdl-row { display: flex; align-items: center; justify-content: space-between; margin-block-start: 4px; }
.cdl-x { position: absolute; top: 12px; inset-inline-end: 0; width: 26px; height: 26px; border-radius: 50%; color: var(--muted); font-size: 18px; line-height: 1; }
.cdl-x:hover { background: var(--blush); color: var(--bad); }
.cd-f { display: grid; gap: 9px; padding: 14px 18px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -10px 24px rgba(30, 10, 20, .05); }

/* Back to top */
.to-top { position: fixed; z-index: 23; inset-inline-start: max(14px, env(safe-area-inset-left, 0px)); bottom: calc(80px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--rose-d); border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: transform .2s ease, opacity .2s ease; }
.to-top:hover { transform: translateY(-3px); }
.to-top[hidden] { display: grid; opacity: 0; pointer-events: none; transform: translateY(12px); }
@media (min-width: 1020px) { .to-top { bottom: 28px; } }

/* Offer pop-up */
.promo { width: min(560px, calc(100vw - 32px)); padding: 14px; border: 0; border-radius: 26px; background: var(--surface); box-shadow: 0 30px 80px rgba(20, 8, 14, .35); text-align: center; overflow: visible; }
.promo[open] { animation: promo-in .45s cubic-bezier(.2, .9, .25, 1.15); }
.promo.closing { animation: promo-out .22s ease-in forwards; }
.promo::backdrop { background: rgba(30, 14, 22, .55); backdrop-filter: blur(4px); animation: fade-in .35s ease; }
@keyframes promo-in { from { opacity: 0; transform: translateY(24px) scale(.92); } }
@keyframes promo-out { to { opacity: 0; transform: scale(.95); } }
.promo-img { display: block; border-radius: 18px; overflow: hidden; }
.promo-img img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.promo-cta { margin-block-start: 14px; min-width: 190px; min-height: 48px; font-size: 16px; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.promo-x { position: absolute; top: -12px; inset-inline-end: -12px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
@media (max-width: 480px) { .promo-x { top: 8px; inset-inline-end: 8px; } }
@media (prefers-reduced-motion: reduce) { .promo[open], .cdrawer[open], .cdl { animation: none; } }
.popup-prev img { max-height: 160px; }

/* Shop link in the department bar */
.dept-shop { display: inline-flex !important; align-items: center; gap: 6px; color: var(--rose) !important; font-weight: 700 !important; }

/* Filters: category ticks and colour chips */
.f-top { font-weight: 700; }
.f-sub { padding-inline-start: 14px; font-size: 13.5px; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.color-chip { position: relative; display: grid; justify-items: center; gap: 3px; width: 58px; cursor: pointer; font-size: 11.5px; text-align: center; }
.color-chip input { position: absolute; opacity: 0; }
.color-chip i { width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), 0 0 0 1px var(--line-2); transition: box-shadow .15s ease, transform .15s ease; }
.color-chip:hover i { transform: scale(1.08); }
.color-chip:has(input:checked) i { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2.5px var(--rose); }
.color-chip:has(input:checked) span { font-weight: 700; color: var(--rose-d); }
.color-chip:has(input:focus-visible) i { outline: 2px solid var(--rose); outline-offset: 2px; }

/* Contact page */
.kind-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kind-chip { position: relative; cursor: pointer; }
.kind-chip input { position: absolute; opacity: 0; }
.kind-chip span { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line-2); font-weight: 600; font-size: 14px; }
.kind-chip:has(input:checked) span { background: var(--rose); border-color: var(--rose); color: #fff; }
.kind-chip:has(input:focus-visible) span { outline: 2px solid var(--rose); outline-offset: 2px; }
.sent-box { display: grid; justify-items: center; gap: 10px; padding: 26px 10px; text-align: center; }
.sent-box svg { width: 54px; height: 54px; padding: 12px; border-radius: 50%; background: var(--good-bg); color: var(--good); }

/* Admin: messages */
.msg-list li { padding: 14px 4px; border-bottom: 1px solid var(--line); }
.msg-list li.unread { background: linear-gradient(90deg, transparent, var(--blush)); }
.msg-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.msg-top .end { margin-inline-start: auto; }
.msg-body { margin: 8px 0; white-space: pre-wrap; line-height: 1.8; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-actions .input { flex: 1 1 220px; min-height: 38px; }

/* Icons: softer, more modern buttons */
.icon-btn { border-radius: 14px; transition: background .15s ease, transform .15s ease, color .15s ease; }
.icon-btn:hover { background: var(--blush); color: var(--rose); transform: translateY(-1px); }
.icon-btn svg, .bnav svg { stroke-width: 1.6; }
.bnav a { transition: color .15s ease; }
.bnav a.act svg { transform: translateY(-1px); }
.bnav a.act::after { content: ""; position: absolute; bottom: 0; width: 18px; height: 3px; border-radius: 3px; background: currentColor; }
.bnav .mid span { box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }

/* ================= Round 4: best sellers, reviews, alerts, views, splash ================= */

/* Splash: the shop's name for a moment on the first page of a visit (CSS only). */
.splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg, #fbf6f1); pointer-events: none; animation: sp-out .45s ease .85s forwards; }
.sp-name { font-family: var(--logo-font, var(--display)); font-size: clamp(40px, 11vw, 64px); color: var(--rose-d); line-height: 1.2; animation: sp-in .6s cubic-bezier(.2, .7, .2, 1) both; }
.sp-line { width: 64px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold, #c9a27e), transparent); transform-origin: center; animation: sp-line .7s ease .15s both; }
@keyframes sp-in { from { opacity: 0; transform: translateY(8px) scale(.97); letter-spacing: .04em; } to { opacity: 1; transform: none; } }
@keyframes sp-line { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes sp-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .splash { display: none; } }

/* Social icons in their real brand colours. */
.brand-ic { color: #fff !important; border: 0 !important; transition: transform .2s ease, box-shadow .2s ease; }
.brand-ic:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.brand-ic.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%) !important; border-radius: 30% !important; }
.brand-ic.fb { background: #1877f2 !important; }
.brand-ic.fb svg path { fill: #fff; stroke: none; }
.brand-ic.wa-ic { background: #25d366 !important; }
.soc .brand-ic svg { width: 15px; height: 15px; }
.ftr-soc .brand-ic svg { width: 20px; height: 20px; }
.ftr-wa, .wa { background: #25d366; }
.ftr-credit .credit-site { font-weight: 400; text-decoration: none; }
.ftr-credit .credit-site:hover { text-decoration: underline; }

/* Section subtitle and numbered best sellers. */
.sec-sub { margin: -6px 0 2px; color: var(--muted); font-size: 13.5px; }
.rail.ranked { counter-reset: rank; }
.rail.ranked > .pc { counter-increment: rank; }
.rail.ranked > .pc::before { content: counter(rank); position: absolute; z-index: 3; inset-block-start: 8px; inset-inline: 0; margin-inline: auto; width: fit-content; min-width: 28px; height: 28px; padding-inline: 6px; display: grid; place-items: center; border-radius: 999px; background: var(--ink, #2b2024); color: #fff; font: 700 13px/1 var(--latin, sans-serif); box-shadow: 0 3px 10px rgba(0, 0, 0, .18); }
.rail.ranked > .pc:nth-child(1)::before { background: linear-gradient(135deg, #e6c27a, #b98a3e); }
.rail.ranked > .pc:nth-child(2)::before { background: linear-gradient(135deg, #d9d9d9, #9a9a9a); }
.rail.ranked > .pc:nth-child(3)::before { background: linear-gradient(135deg, #e0a679, #a8673c); }

/* Grid / list switch on listings. */
.view-sw { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--surface); }
.view-sw button { width: 38px; height: 36px; display: grid; place-items: center; color: var(--muted); background: none; border: 0; cursor: pointer; }
.view-sw button[aria-pressed='true'] { background: var(--blush); color: var(--rose-d); }
.grid.as-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.grid.as-list > .pc { flex-direction: row; align-items: center; }
.grid.as-list > .pc > :first-child { flex: 0 0 108px; align-self: stretch; }
.grid.as-list > .pc .pc-img { height: 100%; aspect-ratio: 1 / 1; }
.grid.as-list > .pc .pc-b { min-width: 0; padding: 8px 12px; gap: 2px; }
.grid.as-list > .pc .pc-brand { font-size: 12px; }
.grid.as-list > .pc .pc-n { min-height: 0; font-size: calc(13px * var(--fs, 1)); -webkit-line-clamp: 2; }
.grid.as-list > .pc .pc-m { display: none; }
.grid.as-list > .pc .low:empty { display: none; }
.grid.as-list > .pc .btn { width: auto; min-height: 32px; align-self: flex-start; padding: 4px 16px; font-size: 12.5px; }
.grid.as-list > .pc .fav { width: 30px; height: 30px; }
.grid.as-list > .pc .fav svg { width: 16px; height: 16px; }
.grid.as-list > .pc .off, .grid.as-list > .pc .tagb { font-size: 10.5px; padding: 2px 6px; }
@media (min-width: 600px) {
  .grid.as-list > .pc > :first-child { flex-basis: 140px; }
  .grid.as-list > .pc .pc-m { display: flex; }
}
@media (min-width: 900px) { .grid.as-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* "Show more" loads the next products in place; they slide in one after another. */
.more .btn[aria-busy='true'] { pointer-events: none; opacity: .75; }
.more .btn[aria-busy='true']::before { content: ''; width: 16px; height: 16px; margin-inline-end: 8px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pc.pop-in { animation: pop-in .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pc.pop-in { animation: none; } }

/* "Let me know when it's back". */
.notify-box { display: grid; gap: 10px; margin-block: 12px; padding: 14px; border: 1px dashed var(--rose-l, var(--line-2)); border-radius: 14px; background: var(--blush); }
.notify-box.done button { display: none; }
.notify-box [data-alert-msg]:empty { display: none; }
.watch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 10px 0; }
.rate-link { display: inline-block; margin-block-start: 3px; color: var(--rose-d); font-weight: 600; }

/* Writing a review: stars picked right-to-left with only CSS. */
.rv-write { margin-block-start: 14px; }
.rv-write > summary { list-style: none; display: inline-flex; cursor: pointer; }
.rv-write > summary::-webkit-details-marker { display: none; }
.rv-write[open] > summary { margin-block-end: 12px; }
.rv-write fieldset { border: 0; padding: 0; margin: 0; }
.star-pick { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
[dir='rtl'] .star-pick { flex-direction: row-reverse; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label { font-size: 30px; line-height: 1; color: var(--line-2); cursor: pointer; transition: color .15s, transform .15s; }
.star-pick label:hover, .star-pick label:hover ~ label, .star-pick input:checked ~ label { color: #e5a93b; }
.star-pick label:hover { transform: scale(1.12); }
.star-pick input:focus-visible + label { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 4px; }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note.good { color: #2f7a4a; }
.note.bad { color: #b3261e; }

/* Loyalty points card on the account page. */
.pts-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, var(--blush), var(--surface)); border: 1px solid var(--line); }
.pts-card b { font-size: 26px; color: var(--rose-d); }

/* Admin: reviews and alerts. */
.stars-txt { color: #e5a93b; letter-spacing: 1px; }
.stars-txt i { color: var(--line-2); font-style: normal; }
.row-ready { background: rgba(37, 211, 102, .08); }
.inline-f { display: inline; }

/* Gentle reveal of sections while scrolling (only where the browser supports it). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sec { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  }
}
