/* udyhome storefront — tokens taken from the udyhome متجر design */
:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --ink: #242424;
  --muted: #5F6670;
  --body: #555B63;
  --text-soft: #3F444A;
  --line: #E3E8EE;
  --line-soft: #EDF1F5;
  --field: #CFD8E3;
  --field-strong: #A9B4C2;
  --accent: #F59A57;
  --accent-ink: #B35A1A;
  --accent-hover: #8F4512;
  --accent-soft: #FEF1E7;
  --sale: #A1361F;
  --ok: #2F6B3A;
  --ok-soft: #E5F0E3;
  --ph: #EEF2F6;
  --ph-ink: #8794A3;
  --ph-line: #D5DEE8;
  --hero: #E2E8EF;
  --hero-ph: #CBD5E0;
  --search: #F1F4F8;
  --font: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --display: 'Reem Kufi', serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  /* Safety net: nothing may ever push the page sideways on small screens. */
  overflow-x: hidden; overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
a { color: var(--accent-ink); }
a:hover { color: var(--accent-hover); }
img, svg, video { max-width: 100%; }
img { display: block; height: auto; }
svg { flex-shrink: 0; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1280px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 24px); }
.display { font-family: var(--display); font-weight: 600; }
.muted { color: var(--muted); }
.link-strong { font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: #F08A40; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-soft { height: 44px; padding: 0 20px; font-size: 16px; background: #fff; color: var(--accent-ink); border: 1.5px solid var(--accent); }
.btn-soft:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-block { width: 100%; }
.btn-lg { height: 56px; font-size: 18px; font-weight: 700; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; color: var(--ink); background: transparent; border: 0; cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--search); color: var(--ink); }
.dot-count {
  position: absolute; top: 2px; left: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: var(--ink); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-block: 16px; }
.logo { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--ink); text-decoration: none; direction: ltr; line-height: 1.2; }
.logo span { color: var(--accent); }
.logo:hover { color: var(--ink); }
.search {
  flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--search);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 16px 4px 6px;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,154,87,.2); }
/* width:100% makes the input's minimum size 0 — its default intrinsic width was what pushed the page sideways on phones. */
.search input { flex: 1; width: 100%; min-width: 0; border: 0; background: transparent; padding: 8px 12px; outline: none; }
.search input::-webkit-search-cancel-button { margin-inline-start: 4px; }
.search button {
  width: 40px; height: 40px; border: 0; border-radius: 999px; background: var(--accent); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.account-nav { display: flex; align-items: center; gap: 4px; }
.cart-pill {
  height: 44px; padding: 0 14px; display: flex; align-items: center; gap: 8px; color: #fff; background: var(--ink);
  border-radius: 999px; text-decoration: none; font-weight: 600;
}
.cart-pill:hover { color: #fff; background: #000; }
.cart-pill .count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--ink);
  font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.cat-nav { border-top: 1px solid var(--line-soft); }
.cat-nav .wrap { display: flex; gap: 4px 28px; font-size: 15px; overflow-x: auto; scrollbar-width: none; }
.cat-nav .wrap::-webkit-scrollbar { display: none; }
.cat-nav a { padding: 12px 0; color: var(--ink); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.cat-nav a:hover { color: var(--accent-ink); }
.cat-nav a[aria-current="page"] { color: var(--accent-ink); font-weight: 700; border-bottom-color: var(--accent); }
.cat-nav a.offers { color: var(--sale); font-weight: 600; }

/* Checkout header steps */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.steps .n {
  width: 28px; height: 28px; border-radius: 999px; border: 1.5px solid var(--field-strong);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.steps li.current { color: var(--ink); font-weight: 700; }
.steps li.current .n { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.steps li.done, .steps li.done a { color: var(--ok); }
.steps li.done .n { background: var(--ok-soft); border-color: var(--ok-soft); }

/* ---------- Flash ---------- */
.flash { margin-top: 16px; padding: 14px 18px; border-radius: 14px; font-weight: 500; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.flash-success { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: #FBE9E5; color: var(--sale); }
.flash a { font-weight: 700; }

/* ---------- Sections / headings ---------- */
.section { padding-block: 48px 16px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.section-head h2 { font-family: var(--display); font-size: clamp(24px, 2.2vw + 16px, 34px); line-height: 1.3; font-weight: 600; }
.page-title { font-family: var(--display); font-size: clamp(26px, 2.8vw + 16px, 40px); font-weight: 600; line-height: 1.3; }
.breadcrumb { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.main { padding-block: 24px 64px; }

/* ---------- Hero ---------- */
.hero { padding-block: 40px 24px; }
.hero-box { display: flex; flex-wrap: wrap; gap: 32px; background: var(--hero); border-radius: 24px; overflow: hidden; }
.hero-copy { flex: 1 1 420px; min-width: 0; padding: clamp(28px, 5vw, 56px) clamp(20px, 4.5vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.hero-kicker { color: var(--accent-ink); font-weight: 600; font-size: 15px; }
.hero h1 { font-family: var(--display); font-size: clamp(30px, 4vw + 14px, 52px); line-height: 1.25; font-weight: 700; }
.hero-text { color: var(--body); font-size: clamp(16px, .5vw + 14px, 18px); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-media { flex: 1 1 420px; min-width: 0; min-height: clamp(200px, 35vw, 420px); background: var(--hero-ph); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* Placeholder image */
.ph { background: var(--ph); color: var(--ph-ink); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; }
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Perks ---------- */
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; padding-block: 8px 16px; }
.perk { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.perk-title { font-weight: 600; }
.perk-sub { font-size: 14px; color: var(--muted); }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 20px; }
.cat-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); text-align: center; }
.cat-card .ph { aspect-ratio: 1 / 1; border-radius: 999px; border: 1px solid var(--ph-line); overflow: hidden; transition: transform .2s; }
.cat-card:hover { color: var(--ink); }
.cat-card:hover .ph { transform: scale(1.03); border-color: var(--accent); }
.cat-name { font-weight: 600; font-size: 17px; }
.cat-count { font-size: 14px; color: var(--muted); }

/* ---------- Product card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.card-media.square { aspect-ratio: 1 / 1; }
.card-media .ph { position: absolute; inset: 0; }
.card-media img { transition: transform .3s; }
.card:hover .card-media img { transform: scale(1.04); }
.badge-sale { position: absolute; top: 12px; right: 12px; background: var(--sale); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.badge-out { position: absolute; top: 12px; right: 12px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.card-wish { position: absolute; top: 8px; left: 8px; }
.card-wish .icon-btn { background: rgba(255,255,255,.9); }
.card-wish .icon-btn[aria-pressed="true"] { color: var(--sale); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 13px; color: var(--muted); }
.card-name { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; line-height: 1.45; }
.card-name:hover { color: var(--accent-ink); }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.price { font-weight: 700; font-size: 19px; }
.old-price { font-size: 14px; color: var(--muted); }
.card { position: relative; }
.card-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.card-actions > .card-cart, .card-actions > .btn { flex: 1; min-width: 0; margin: 0; }
.card-wish-form { margin: 0; flex: none; }
.card .btn-soft { width: 100%; }
.wish-btn.sm { width: 44px; height: 44px; }

/* ---------- Promo ---------- */
.promo { padding-block: 0 64px; }
.promo-box { background: var(--ink); color: var(--bg); border-radius: 24px; padding: clamp(28px, 5vw, 48px) clamp(20px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.promo-box h2 { font-family: var(--display); font-size: clamp(24px, 1.8vw + 16px, 32px); font-weight: 600; margin-bottom: 8px; }
.promo-box p { color: #CFD8E3; font-size: 17px; }
.promo-copy { flex: 1 1 420px; min-width: 0; }
.footer-logo { font-size: 26px; text-align: right; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 32px; padding-block: 48px 24px; }
.site-footer h3 { margin: 0 0 12px; font-size: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.pay-badges { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.pay-badges span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.footer-bottom { padding-block: 16px 32px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 14px; }

/* ---------- Listing ---------- */
.listing-head { margin: 12px 0 28px; }
.listing-head p { margin-top: 4px; color: var(--muted); }
.listing { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.filters {
  flex: 1 1 260px; min-width: 0; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; display: flex; flex-direction: column; gap: 24px;
}
.filters-toggle { display: none; }
.filters-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--ink);
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.filters-toggle:hover .filters-count { color: var(--ink); }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-head h2 { font-size: 18px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent-ink); }
.range { display: flex; gap: 10px; align-items: center; }
.input, .select, .textarea {
  width: 100%; min-width: 0; height: 48px; border: 1px solid var(--field); border-radius: 12px; padding: 0 14px; background: var(--bg);
}
.textarea { height: auto; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,154,87,.2); }
.input.small { height: 44px; border-radius: 10px; }
.results { flex: 999 1 560px; min-width: 0; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.sort { display: flex; align-items: center; gap: 10px; }
.sort .select { height: 44px; width: auto; border-radius: 10px; background: #fff; }
.empty { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 64px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty h2 { font-size: 24px; }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
  min-width: 44px; height: 44px; padding: 0 14px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.pagination [aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pagination .disabled { color: var(--field-strong); }

/* ---------- Product page ---------- */
.product { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.gallery { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.gallery-main { aspect-ratio: 1 / 1; border-radius: 22px; border: 1px solid var(--line); overflow: hidden; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.thumb { aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; padding: 0; cursor: pointer; border: 2px solid var(--line); background: var(--ph); }
.thumb[aria-pressed="true"] { border-color: var(--accent); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.sku { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.pinfo h1 { font-family: var(--display); font-size: clamp(26px, 2.6vw + 16px, 40px); line-height: 1.3; font-weight: 600; }
.pprice { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pprice .now { font-size: clamp(26px, 1.2vw + 20px, 32px); font-weight: 700; }
.pill-ok { font-size: 14px; color: var(--ok); background: var(--ok-soft); padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.pill-out { font-size: 14px; color: var(--sale); background: #FBE9E5; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.psummary { color: var(--body); font-size: 17px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  min-height: 44px; padding: 0 18px; border-radius: 999px; display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: #fff; color: var(--ink); border: 1.5px solid var(--field);
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.swatch { width: 20px; height: 20px; border-radius: 999px; border: 1px solid rgba(0,0,0,.15); flex: none; }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--field); border-radius: 999px; background: #fff; height: 52px; }
.qty button { width: 48px; height: 48px; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--ink); border-radius: 999px; }
.qty input { width: 36px; text-align: center; font-weight: 700; font-size: 18px; border: 0; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty.sm { height: 46px; }
.qty.sm button { width: 44px; height: 44px; font-size: 20px; }
.buy-row .btn-primary { flex: 1 1 200px; font-weight: 700; }
.wish-btn { width: 52px; height: 52px; border: 1.5px solid var(--field); border-radius: 999px; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.wish-btn[aria-pressed="true"] { color: var(--sale); border-color: var(--sale); }
.wish-btn[aria-pressed="true"] svg { fill: currentColor; }
.info-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.info-tile { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 14px; }

.tabs-box { margin-top: 56px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 8px 32px 32px; }
.tablist { display: flex; flex-wrap: wrap; gap: 8px 28px; border-bottom: 1px solid var(--line); }
.tab { min-height: 52px; padding: 0 2px; border: 0; background: transparent; font-size: 17px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.tabpanel { padding-top: 24px; max-width: 760px; color: var(--text-soft); font-size: 17px; white-space: pre-line; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; white-space: normal; }
.specs dt { padding: 12px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.specs dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-weight: 600; color: var(--ink); }

.related { margin-top: 56px; }
.related h2 { font-family: var(--display); font-size: clamp(24px, 1.4vw + 18px, 30px); font-weight: 600; margin-bottom: 24px; }
.mini-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.mini-card:hover { color: var(--ink); border-color: var(--accent); }
.mini-card .ph { aspect-ratio: 4 / 3; }
.mini-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }

/* ---------- Cart & Checkout ---------- */
.two-col { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; }
.col-side { flex: 1 1 340px; min-width: 0; position: sticky; top: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.panel h2 { font-size: 22px; margin-bottom: 16px; }
.cart-list { padding: 8px 24px; }
.cart-item { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.cart-thumb { width: 112px; height: 112px; flex: none; border-radius: 16px; overflow: hidden; }
.cart-info { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-info a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 18px; }
.cart-total { min-width: 120px; text-align: left; font-weight: 700; font-size: 18px; }
.del-btn { width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--search); color: var(--sale); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.del-btn:hover { background: #FBE9E5; }
.summary { display: flex; flex-direction: column; gap: 16px; }
.summary h2 { margin: 0; }
.coupon-form { display: flex; gap: 8px; }
.coupon-form .input { height: 46px; }
.coupon-form button { height: 46px; padding: 0 18px; border: 1.5px solid var(--ink); background: #fff; border-radius: 12px; font-weight: 600; cursor: pointer; }
.coupon-on { display: flex; justify-content: space-between; align-items: center; background: var(--ok-soft); color: var(--ok); padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.coupon-on button { border: 0; background: transparent; color: var(--sale); cursor: pointer; font-weight: 600; }
.totals { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals .grand { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.totals .grand dt { font-weight: 700; font-size: 18px; color: var(--ink); }
.totals .grand dd { font-weight: 700; font-size: 24px; }
.totals .discount dd { color: var(--ok); }
.secure { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 15px; }
.field .error { color: var(--sale); font-size: 14px; }
.input.invalid, .select.invalid { border-color: var(--sale); }
.stack { display: flex; flex-direction: column; gap: 24px; }

.radio-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; min-height: 72px; border-radius: 16px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line);
}
.radio-card input, .pay-option > label input { position: absolute; opacity: 0; pointer-events: none; }
.radio-dot { width: 20px; height: 20px; flex: none; border-radius: 999px; border: 2px solid var(--field-strong); background: #fff; }
.radio-card:has(input:checked) { background: var(--accent-soft); border: 2px solid var(--accent); }
.radio-card:has(input:checked) .radio-dot, .pay-option:has(> label input:checked) .radio-dot { border: 6px solid var(--accent); }
.radio-card:has(input:focus-visible), .pay-option:has(> label input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.radio-text { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; }
.radio-text strong { font-weight: 700; }
.radio-text span { font-size: 14px; color: var(--muted); }
.ship-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.pay-list { display: flex; flex-direction: column; gap: 12px; }
.pay-option { border-radius: 16px; overflow: hidden; background: #fff; border: 1.5px solid var(--line); }
.pay-option:has(> label input:checked) { background: var(--accent-soft); border: 2px solid var(--accent); }
.pay-option > label { width: 100%; min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; }
.pay-badges-sm { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pay-badges-sm span { font-size: 12px; font-weight: 600; padding: 3px 8px; border: 1px solid var(--field); border-radius: 6px; background: #fff; direction: ltr; }
.pay-extra { display: none; padding: 0 18px 18px; font-size: 14px; color: var(--body); }
.pay-option:has(> label input:checked) .pay-extra { display: block; }
.pay-extra .input { background: #fff; max-width: 360px; }
.months { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.month {
  min-height: 56px; padding: 6px 18px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; background: #fff; color: var(--ink); border: 1.5px solid var(--field); position: relative;
}
.month input { position: absolute; opacity: 0; }
.month:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.month small { font-size: 13px; }
.order-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.order-lines li { display: flex; gap: 12px; align-items: center; }
.order-thumb { position: relative; width: 56px; height: 56px; flex: none; border-radius: 12px; }
.order-thumb .ph { width: 100%; height: 100%; border-radius: 12px; overflow: hidden; }
.order-thumb .q { position: absolute; top: -6px; left: -6px; min-width: 22px; height: 22px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.order-lines .nm { flex: 1; min-width: 0; font-size: 15px; }
.order-lines .nm small { display: block; color: var(--muted); font-size: 13px; }

.success-box { max-width: 640px; margin: 40px auto; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 56px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.success-icon { width: 72px; height: 72px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--accent-soft); color: var(--accent-ink); }
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.timeline li { flex: 1 1 100px; padding: 10px; border-radius: 12px; text-align: center; font-size: 14px; background: var(--search); color: var(--muted); }
.timeline li.on { background: var(--ok-soft); color: var(--ok); font-weight: 600; }

/* ---------- Stars & reviews ---------- */
.stars { display: inline-flex; gap: 1px; font-size: var(--s, 16px); line-height: 1; vertical-align: middle; direction: ltr; }
.star { color: #D5DEE8; }
.star.full { color: #E0A21B; }
.star.half { background: linear-gradient(90deg, #E0A21B 50%, #D5DEE8 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-rating { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rating-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); text-decoration: none; font-size: 15px; }
.rating-link strong { color: var(--ink); }
.reviews { scroll-margin-top: 16px; }
.reviews-grid { display: flex; flex-wrap: wrap; gap: 32px; padding: 24px 0; align-items: flex-start; }
.rev-summary { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rev-score { font-family: var(--display); font-size: 48px; font-weight: 700; line-height: 1; }
.rev-bars { list-style: none; margin: 10px 0 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.rev-bars li { display: flex; align-items: center; gap: 10px; }
.rev-bars li > span:first-child { width: 34px; white-space: nowrap; }
.rev-bars .bar { flex: 1; height: 8px; border-radius: 999px; background: var(--ph); overflow: hidden; }
.rev-bars .bar span { display: block; height: 100%; background: #E0A21B; border-radius: 999px; }
.rev-list { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rev { padding: 16px 0; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; }
.rev:last-of-type { border-bottom: 0; }
.rev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rev p { color: var(--text-soft); white-space: pre-line; }
.rev-reply { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.rev-form-wrap { border-top: 1px solid var(--line); padding-top: 20px; }
.rev-form-wrap > summary { list-style: none; display: inline-flex; }
.rev-form-wrap > summary::-webkit-details-marker { display: none; }
.rev-form-wrap[open] > summary { display: none; }
.rev-form { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 34px; line-height: 1; color: #D5DEE8; cursor: pointer; transition: color .1s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #E0A21B; }
.star-input input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.field .error, fieldset .error { color: var(--sale); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.testimonial { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.testimonial blockquote { margin: 0; font-size: 17px; color: var(--text-soft); }
.testimonial figcaption { font-size: 14px; color: var(--muted); }

/* ---------- Coupons in store ---------- */
.coupon-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.coupon-card { display: flex; align-items: stretch; background: var(--accent-soft); border: 1.5px dashed var(--accent); border-radius: 18px; overflow: hidden; }
.coupon-off { flex: none; min-width: 96px; display: flex; align-items: center; justify-content: center; padding: 12px; background: var(--accent); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 22px; direction: ltr; }
.coupon-body { min-width: 0; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.coupon-code { border: 1px solid var(--accent-ink); background: #fff; color: var(--accent-ink); border-radius: 8px; padding: 1px 10px; font-weight: 700; cursor: pointer; direction: ltr; letter-spacing: .04em; }
.coupon-code.copied { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.coupon-picks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.coupon-picks form { margin: 0; }
.coupon-pick { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border: 1.5px dashed var(--accent); background: var(--accent-soft); border-radius: 12px; cursor: pointer; text-align: right; font-size: 13px; }
.coupon-pick strong { font-size: 14px; color: var(--accent-ink); }
.coupon-pick:disabled { opacity: .5; cursor: not-allowed; border-color: var(--field); background: #fff; }

/* ---------- Customer service ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 16px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.contact-card:hover { border-color: var(--accent); color: var(--ink); }
.contact-ic { width: 48px; height: 48px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.faq { display: flex; flex-direction: column; }
.faq details { border-bottom: 1px solid var(--line-soft); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin-top: 8px; color: var(--text-soft); }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 20px; z-index: 50;
  height: 56px; padding: 0 20px 0 14px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px;
  background: #25D366; color: #fff; text-decoration: none; font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  transition: transform .15s, box-shadow .15s;
}
.wa-float:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.wa-float:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (max-width: 720px) {
  .wa-float { width: 56px; padding: 0; justify-content: center; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 16px; }
  .wa-float .wa-label { display: none; }
}
@media print { .wa-float { display: none; } }

/* =====================================================================
   Responsive — kept last so it overrides every component above.
   Breakpoints: 1024 (small laptop / tablet landscape), 900 (tablet),
   720 (phone), 380 (small phone).
   ===================================================================== */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 20px; }
  .product { gap: 32px; }
  .listing { gap: 24px; }
}

@media (max-width: 900px) {
  /* Filters collapse behind a button so products are visible on the first screen. */
  /* Header: logo + icons on one row, full-width search under them */
  .search { order: 3; flex: 1 1 100%; }
  .account-nav { margin-inline-start: auto; }
  .hero-media.is-empty { display: none; }
  /* fade on the scroll edge hints that the category bar scrolls */
  .cat-nav .wrap { -webkit-mask-image: linear-gradient(to left, #000 85%, transparent); mask-image: linear-gradient(to left, #000 85%, transparent); }

  .js .filters-toggle { display: inline-flex; flex: 1 1 100%; height: 48px; font-size: 16px; }
  .js .filters:not(.open) { display: none; }
  .filters { flex-basis: 100%; }
  .results { flex-basis: 100%; }
  .listing { gap: 16px; }
}

@media (max-width: 720px) {
  /* Header */
  .header-row { gap: 10px 8px; padding-block: 10px 12px; }
  .logo { font-size: 24px; }
  .search { padding: 3px 12px 3px 4px; }
  .search button { width: 38px; height: 38px; }
  .search input { padding: 6px 8px; }
  .account-nav { gap: 0; }
  .icon-btn { width: 40px; height: 40px; }
  .cart-pill { height: 40px; padding: 0 12px; gap: 6px; margin-inline-start: 4px; }
  .cart-pill .label { display: none; }
  .cat-nav .wrap { gap: 22px; font-size: 14px; }
  .cat-nav a { padding: 10px 0; }
  .steps { font-size: 13px; gap: 6px 12px; }
  .steps .n { width: 24px; height: 24px; font-size: 12px; }

  .btn { height: 48px; padding: 0 20px; font-size: 16px; }
  .btn-lg { height: 52px; font-size: 17px; }

  /* Home */
  .hero { padding-block: 12px 16px; }
  .hero-box { border-radius: 18px; gap: 0; }
  .hero-copy { gap: 14px; }
  .hero-actions .btn { flex: 1 1 130px; }
  .perks { grid-template-columns: 1fr; gap: 10px; }
  .perk { padding: 14px 16px; border-radius: 14px; }
  .section { padding-block: 32px 8px; }
  .section-head { margin-bottom: 16px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  .cat-card { gap: 8px; }
  .cat-name { font-size: 14px; line-height: 1.4; }
  .cat-count { font-size: 12px; }
  .coupon-off { min-width: 76px; font-size: 18px; padding: 10px; }
  .coupon-body { padding: 12px 14px; }
  .promo { padding-bottom: 40px; }
  .promo-box { border-radius: 18px; }
  .promo-box .btn { width: 100%; }
  .testimonial, .contact-card { padding: 18px; }

  /* Product cards: 2 per row, wishlist heart floats on the image */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { border-radius: 14px; }
  .card-body { padding: 10px 12px 12px; gap: 4px; }
  .card-cat { font-size: 12px; }
  .card-name { font-size: 15px; line-height: 1.4; }
  .price { font-size: 16px; }
  .old-price { font-size: 13px; }
  .badge-sale, .badge-out { top: 8px; right: 8px; font-size: 12px; padding: 2px 8px; }
  .card .btn-soft { height: auto; min-height: 40px; padding: 6px 8px; font-size: 14px; line-height: 1.3; white-space: normal; text-align: center; }
  .card-wish-form { position: absolute; top: 8px; left: 8px; z-index: 2; }
  .wish-btn.sm { width: 36px; height: 36px; border: 0; background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
  .wish-btn.sm svg { width: 18px; height: 18px; }

  /* Listing */
  .main { padding-block: 16px 48px; }
  .listing-head { margin: 8px 0 16px; }
  .results-bar { margin-bottom: 14px; }
  .filters { padding: 18px; gap: 18px; border-radius: 16px; }
  .pagination { margin-top: 28px; }

  /* Product page */
  .product { gap: 20px; }
  .gallery { gap: 10px; }
  .gallery-main { border-radius: 16px; }
  .thumbs { gap: 8px; }
  .thumb { border-radius: 10px; }
  .pinfo { gap: 16px; }
  .psummary { font-size: 16px; }
  .buy-row { flex-wrap: nowrap; gap: 8px; }
  .buy-row .btn-primary { flex: 1 1 0; min-width: 0; padding: 0 14px; }
  .qty { height: 48px; flex: none; }
  .qty button { width: 40px; height: 44px; }
  .qty input { width: 30px; }
  .wish-btn { width: 48px; height: 48px; flex: none; }
  .info-tiles { grid-template-columns: 1fr; }
  .tabs-box { margin-top: 32px; padding: 4px 16px 20px; border-radius: 16px; }
  .tablist { flex-wrap: nowrap; overflow-x: auto; gap: 20px; scrollbar-width: none; }
  .tablist::-webkit-scrollbar { display: none; }
  .tab { font-size: 15px; white-space: nowrap; min-height: 48px; }
  .tabpanel { font-size: 16px; padding-top: 16px; }
  .reviews-grid { gap: 20px; padding: 16px 0; }
  .rev-score { font-size: 40px; }
  .star-input label { font-size: 38px; }
  .related { margin-top: 36px; }
  .related h2 { margin-bottom: 16px; }

  /* Cart: thumbnail | name + delete, then quantity and line total */
  .panel { padding: 20px; border-radius: 18px; }
  .cart-list { padding: 4px 16px; }
  .cart-item {
    display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 10px 14px;
    grid-template-areas: "thumb info del" "thumb qty total";
  }
  .cart-thumb { width: 80px; height: 80px; grid-area: thumb; align-self: start; border-radius: 12px; }
  .cart-info { grid-area: info; }
  .cart-info a { font-size: 16px; }
  .cart-qty { grid-area: qty; justify-self: start; align-self: center; }
  .cart-total { grid-area: total; align-self: center; min-width: 0; font-size: 16px; }
  .cart-del { grid-area: del; align-self: start; }
  .del-btn { width: 40px; height: 40px; }
  .col-side { position: static; }

  /* Checkout & misc pages */
  .radio-card { padding: 12px 14px; min-height: 64px; }
  .pay-option > label { padding: 12px 14px; }
  .pay-extra { padding: 0 14px 14px; }
  .success-box { margin: 16px auto; padding: 36px 20px; border-radius: 18px; }
  .empty { padding: 40px 20px; border-radius: 18px; }

  /* Footer: link columns side by side, room left for the WhatsApp button */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; padding-block: 32px 16px; }
  .footer-grid > :first-child, .footer-grid > :last-child { grid-column: 1 / -1; }
  .footer-bottom { padding-bottom: 88px; }
}

@media (max-width: 380px) {
  .hide-xs { display: none; }
  .logo { font-size: 22px; }
  .grid { gap: 10px; }
  .card-body { padding: 8px 10px 10px; }
  .hero-actions .btn { flex-basis: 100%; }
  .buy-row .btn-primary svg { display: none; }
  .pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 10px; }
}

/* Hover zoom only where there is a real pointer — avoids "stuck" zoom after a tap on phones. */
@media (hover: none) {
  .card:hover .card-media img, .cat-card:hover .ph { transform: none; }
}
