:root {
  --black: #0d0d0d;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e7e7e7;
  --soft: #f4f4f4;
  --red: #d32f2f;
  --green: #2e7d32;
  --wa: #25d366;
  --radius: 12px;
  --wrap: 1240px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 15px; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.topbar { background: var(--black); color: #fff; text-align: center; font-size: 13px; padding: 6px 12px; font-weight: 600; }
.header { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 14px; height: 64px; }
.logo img { height: 30px; width: auto; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 999px; padding: 0 14px; height: 42px; max-width: 520px; margin-inline: auto; }
.search svg { width: 18px; height: 18px; color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; }
.header-actions { display: flex; gap: 4px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.badge { position: absolute; top: 2px; left: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.cats-bar { border-top: 1px solid var(--line); }
.cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; padding-bottom: 8px; }
.cats::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; }
.chip.on, .chip:hover { background: var(--black); color: #fff; border-color: var(--black); }
.only-mobile { display: none; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer-panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(320px, 85vw); background: #fff; padding: 16px; overflow-y: auto; transform: translateX(100%); transition: transform .25s; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer-head img { height: 26px; }
.drawer a { display: block; padding: 12px 6px; border-bottom: 1px solid var(--line); font-weight: 600; }

/* ---------- common ---------- */
main { min-height: 60vh; padding-top: 14px; padding-bottom: 40px; outline: none; }
h1 { font-size: 22px; margin: 6px 0 14px; }
h2 { font-size: 19px; margin: 22px 0 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: var(--radius); border: 0; background: var(--black); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.light { background: #fff; color: var(--black); border: 1.5px solid var(--black); }
.btn.wa { background: var(--wa); }
.btn.sm { height: 40px; font-size: 14px; width: auto; padding: 0 16px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.empty { text-align: center; padding: 60px 10px; color: var(--muted); }
.empty .big { font-size: 46px; }
.loader { display: grid; place-items: center; padding: 60px; }
.loader::after { content: ""; width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--black); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.field input, .field select, .field textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--black); }
.field small { color: var(--muted); }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; }
.row { display: flex; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.price { font-weight: 800; }
.price.sale { color: var(--red); }
.old { color: #999; text-decoration: line-through; font-size: .9em; }

/* ---------- banner ---------- */
.banner { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 2.4; background: var(--soft); margin-bottom: 8px; }
.slides { display: flex; height: 100%; transition: transform .5s ease; }
.slide { position: relative; flex: 0 0 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide .cap { position: absolute; inset-inline: 0; bottom: 0; padding: 40px 18px 16px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.slide .cap b { font-size: 22px; }
.slide .cap span { background: #fff; color: #000; border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 6px 0 4px; }
.dots i { width: 7px; height: 7px; border-radius: 4px; background: #ccc; transition: width .25s; }
.dots i.on { width: 20px; background: var(--black); }
.wheel-card { display: flex; align-items: center; gap: 14px; background: var(--black); color: #fff; border-radius: 14px; padding: 14px 16px; margin: 12px 0 6px; }
.wheel-card .e { font-size: 32px; }
.wheel-card b { display: block; font-size: 16px; }
.wheel-card small { color: #bbb; }
.wheel-card .go { margin-inline-start: auto; background: #fff; color: #000; border-radius: 999px; padding: 6px 16px; font-weight: 800; }

/* ---------- product grid (LC Waikiki style) ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 10px; }
.pcard { display: block; min-width: 0; }
.pcard .ph { position: relative; aspect-ratio: 3/4; background: #f2f2f2; overflow: hidden; }
.pcard .ph img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s; }
.pcard:hover .ph img { transform: scale(1.04); }
.pcard .off { position: absolute; top: 8px; right: 8px; background: var(--red); color: #fff; font-weight: 800; font-size: 12px; padding: 2px 7px; border-radius: 4px; direction: ltr; }
.pcard .out { position: absolute; inset: 0; background: rgba(255,255,255,.55); display: grid; place-items: center; }
.pcard .out span { background: #000; color: #fff; padding: 4px 12px; font-weight: 700; }
.pcard .nm { margin: 8px 4px 2px; font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.pcard .pr { margin: 0 4px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.more { margin: 24px auto 0; display: block; max-width: 280px; }

/* ---------- product page ---------- */
.pd { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.gal-main { position: relative; aspect-ratio: 3/4; background: #f2f2f2; border-radius: 6px; overflow: hidden; }
.gal-main img { width: 100%; height: 100%; object-fit: contain; }
.gal-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.gal-thumbs img { width: 64px; height: 84px; object-fit: cover; background: #f2f2f2; border-radius: 4px; cursor: pointer; border: 2px solid transparent; flex: none; }
.gal-thumbs img.on { border-color: var(--black); }
.pd h1 { font-size: 24px; margin-top: 0; }
.pd .prices { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 24px; }
.pd .save { background: #fde8e8; color: var(--red); font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.opt { margin: 18px 0 6px; }
.opt h3 { font-size: 15px; margin: 0 0 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts button { min-width: 52px; height: 44px; padding: 0 14px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; }
.opts button.on { border-color: var(--black); background: var(--black); color: #fff; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 42px; height: 44px; border: 0; background: #fff; font-size: 20px; cursor: pointer; }
.qty span { min-width: 40px; text-align: center; font-weight: 800; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; background: var(--soft); border-radius: 12px; padding: 12px 14px; margin: 16px 0; font-weight: 700; font-size: 14px; }
.trust span::before { content: "✓ "; color: var(--green); }
.desc { white-space: pre-line; color: #333; }
.stock { font-weight: 700; font-size: 14px; }
.stock.low { color: var(--red); }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 10px; overflow-x: auto; padding-bottom: 6px; }

/* ---------- cart & checkout ---------- */
.layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.citem { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.citem img { width: 84px; height: 110px; object-fit: cover; background: #f2f2f2; border-radius: 6px; }
.citem .nm { font-weight: 700; }
.citem .attrs { color: var(--muted); font-size: 13px; }
.link-btn { background: none; border: 0; color: var(--red); cursor: pointer; padding: 0; font-size: 13px; }
.sum div { display: flex; justify-content: space-between; padding: 5px 0; }
.sum .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 18px; font-weight: 800; }
.sum .neg { color: var(--green); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs button { flex: 1; height: 42px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.tabs button.on { background: var(--black); color: #fff; border-color: var(--black); }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; }
.ok-box { background: #e8f5e9; color: var(--green); border-radius: 10px; padding: 10px 12px; font-weight: 700; margin-top: 8px; }
.sticky { position: sticky; top: 130px; }

/* ---------- account ---------- */
.order { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.order .st { display: inline-block; background: var(--soft); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 13px; }

/* ---------- wheel ---------- */
.wheel-page { background: #111; color: #fff; border-radius: 18px; padding: 22px 16px 28px; text-align: center; }
.wheel-box { position: relative; width: min(380px, 88vw); margin: 18px auto; }
.wheel-box canvas { width: 100%; height: auto; display: block; transition: transform 5.2s cubic-bezier(.12,.75,.12,1); }
.wheel-box .pin { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 17px solid transparent; border-right: 17px solid transparent; border-top: 36px solid #e53935; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); z-index: 2; }
.wheel-box .hub { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; background: #fff; color: #000; border: 4px solid #000; display: grid; place-items: center; font-weight: 900; }
.code { display: inline-flex; gap: 10px; align-items: center; background: #f4f4f4; color: #000; border: 1px dashed #999; border-radius: 10px; padding: 8px 14px; font-size: 22px; font-weight: 900; letter-spacing: 2px; direction: ltr; cursor: pointer; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; z-index: 80; padding: 16px; }
.modal .box { background: #fff; color: #000; border-radius: 18px; padding: 22px; max-width: 380px; width: 100%; text-align: center; }

/* ---------- footer etc ---------- */
.footer { background: var(--black); color: #ddd; margin-top: 30px; padding: 30px 0 14px; }
.footer h4 { color: #fff; margin: 0 0 8px; }
.footer p { margin: 4px 0; font-size: 14px; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer-logo { height: 28px; margin-bottom: 8px; }
.copy { border-top: 1px solid #333; margin-top: 18px; padding-top: 12px; font-size: 13px; color: #999; }
.wa-float { position: fixed; bottom: 18px; left: 18px; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 40; }
.wa-float svg { width: 32px; height: 32px; stroke: none; }
.toast { position: fixed; bottom: 86px; left: 50%; transform: translateX(-50%) translateY(20px); background: #111; color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; opacity: 0; transition: .25s; z-index: 90; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 760px) {
  .only-mobile { display: inline-grid; }
  .header-row { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; gap: 6px; }
  .search { order: 5; flex-basis: 100%; max-width: none; height: 40px; }
  .logo { margin-inline-end: auto; }
  .logo img { height: 24px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px 6px; }
  .pd { grid-template-columns: 1fr; gap: 14px; }
  .pd h1 { font-size: 20px; }
  .banner { aspect-ratio: 2; border-radius: 12px; }
  .slide .cap b { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr; }
  .buybar { position: sticky; bottom: 0; background: #fff; padding: 10px 0; border-top: 1px solid var(--line); z-index: 5; }
  .wa-float { bottom: 84px; }
  .hscroll { grid-auto-columns: 150px; }
}
