/* RunGoo design system — tokens & components lifted from the MVP prototypes. */
:root{
  --navy:#122A4D; --navy-2:#1B3A66;
  --teal:#147A63; --teal-dark:#106550; --teal-tint:#E4F5EF;
  --bg:#F6F5F1; --surface:#FFFFFF; --line:#E7E4DC;
  --ink:#1B2130; --ink-muted:#68707E;
  --ok:#1B6E45; --ok-tint:#E3F5EA;
  --warn:#8A5F12; --warn-tint:#FBF0DC;
  --danger:#A8322A; --danger-tint:#FBE7E5;
  --radius-s:10px; --radius-m:14px; --radius-l:20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0F1522; --surface:#182136; --line:#2A3550;
    --ink:#EDEFF4; --ink-muted:#9AA4B8; --teal-tint:#123B31; --teal-dark:#5FD3B0; --ok:#5CCB8F; --warn:#E9B35A; --danger:#F08A80;
    --ok-tint:#123423; --warn-tint:#3A2E10; --danger-tint:#3A1815;
    color-scheme: dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0F1522; --surface:#182136; --line:#2A3550;
  --ink:#EDEFF4; --ink-muted:#9AA4B8; --teal-tint:#123B31; --teal-dark:#5FD3B0; --ok:#5CCB8F; --warn:#E9B35A; --danger:#F08A80;
  --ok-tint:#123423; --warn-tint:#3A2E10; --danger-tint:#3A1815;
  color-scheme: dark;
}

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-padding-top:70px;}
body{
  background:var(--bg); color:var(--ink); font-family:'Tajawal',system-ui,sans-serif; line-height:1.5;
  padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
}
h1,h2,h3,.brand,.num{font-family:'Cairo',system-ui,sans-serif;}
a{color:inherit; text-decoration:none;}
button{font-family:inherit; cursor:pointer;}
img,svg{display:block; max-width:100%;}
[x-cloak]{display:none !important;}
:focus-visible{outline:2px solid var(--teal); outline-offset:2px;}
section{padding:52px 20px;}
.wrap{max-width:1080px; margin:0 auto;}
.muted{color:var(--ink-muted);}

/* ---------- Header ---------- */
.site-header{position:sticky; top:0; z-index:30; background:rgba(18,42,77,.97); backdrop-filter:blur(6px);}
.nav{display:flex; align-items:center; justify-content:space-between; padding:14px 20px; max-width:1080px; margin:0 auto; gap:12px;}
.brand{color:#fff; font-size:19px; font-weight:800; display:flex; align-items:center; gap:8px;}
.brand-mark{width:28px; height:28px; border-radius:8px; background:var(--teal); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.brand-mark svg{width:16px; height:16px;}
.nav-links{display:none; gap:26px; color:#C7D0E0; font-size:14px; font-weight:500;}
.nav-links a:hover{color:#fff;}
.nav-actions{display:flex; align-items:center; gap:12px;}
.icon-btn{position:relative; background:none; border:none; color:#C7D0E0; padding:6px;}
.icon-btn svg{width:20px; height:20px;}
.cart-dot{position:absolute; top:2px; inset-inline-end:2px; background:var(--teal); color:#fff; font-size:9px; font-weight:800; border-radius:999px; min-width:15px; height:15px; display:flex; align-items:center; justify-content:center; padding:0 3px;}
.cta-btn{background:var(--teal); color:#fff; padding:9px 18px; border-radius:9px; font-size:13.5px; font-weight:700; border:none; white-space:nowrap;}
.menu-toggle{display:flex; background:none; border:none; color:#fff;}
.menu-toggle svg{width:22px; height:22px;}
.mobile-menu{display:flex; flex-direction:column; gap:2px; background:var(--navy-2); padding:8px 20px 16px;}
.mobile-menu a{color:#DCE3EE; font-size:14.5px; font-weight:600; padding:11px 4px; border-bottom:1px solid rgba(255,255,255,.08);}
@media (min-width:860px){ .nav-links{display:flex;} .menu-toggle,.mobile-menu{display:none;} }

/* ---------- Hero ---------- */
.hero{position:relative; overflow:hidden; background:linear-gradient(160deg,var(--navy) 0%, var(--navy-2) 55%, #1F4A72 100%); padding:56px 20px 64px; text-align:center;}
.hero-bag{position:absolute; inset-inline-end:-40px; top:-30px; width:230px; height:230px; opacity:.07; stroke:#fff;}
.hero .wrap{position:relative; z-index:1;}
.hero h1{color:#fff; font-size:clamp(26px,6vw,42px); font-weight:800; line-height:1.25; max-width:680px; margin:0 auto 14px;}
.hero p{color:#B9C4D8; font-size:15px; max-width:480px; margin:0 auto 28px; line-height:1.7;}
.hero-search{display:flex; align-items:center; gap:8px; background:var(--surface); border-radius:14px; padding:6px 6px 6px 16px; max-width:480px; margin:0 auto; box-shadow:0 12px 30px -10px rgba(0,0,0,.35);}
.hero-search svg{margin-inline-start:10px; color:var(--ink-muted);}
.hero-search input{flex:1; min-width:0; border:none; outline:none; background:transparent; font-size:14px; font-family:inherit; padding:9px 0; color:var(--ink);}
.hero-search button{background:var(--teal); color:#fff; border:none; padding:11px 20px; border-radius:9px; font-size:13.5px; font-weight:700;}
.trust-row{display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:22px;}
.trust-chip{display:flex; align-items:center; gap:6px; background:rgba(255,255,255,.08); color:#D6DEEC; font-size:12px; font-weight:600; padding:7px 13px; border-radius:999px;}
.trust-chip svg{width:14px; height:14px; color:var(--teal); flex-shrink:0;}

/* ---------- Section heads ---------- */
.sec-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:22px; gap:12px;}
.sec-head h2{font-size:21px; font-weight:800;}
.sec-head a{font-size:13px; font-weight:700; color:var(--teal); white-space:nowrap;}

/* ---------- Categories ---------- */
.cat-grid{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
.cat-tile{background:var(--tint); border-radius:16px; padding:22px 16px; text-align:center; border:1px solid var(--line); transition:transform .15s;}
.cat-tile:active{transform:scale(.97);}
.cat-tile .ic{width:44px; height:44px; margin:0 auto 12px; color:var(--accent);}
.cat-tile .name{font-size:13.5px; font-weight:700; color:var(--ink);}
@media (min-width:640px){ .cat-grid{grid-template-columns:repeat(4,1fr);} }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .cat-tile, :root:not([data-theme="light"]) .p-thumb{background:color-mix(in srgb, var(--accent) 16%, var(--surface));} }
:root[data-theme="dark"] .cat-tile, :root[data-theme="dark"] .p-thumb{background:color-mix(in srgb, var(--accent) 16%, var(--surface));}

/* ---------- Product card ---------- */
.grid{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
@media (min-width:640px){ .grid{grid-template-columns:repeat(4,1fr);} }
.p-card{background:var(--surface); border:1px solid var(--line); border-radius:16px; overflow:hidden; display:flex; flex-direction:column;}
.p-thumb{position:relative; aspect-ratio:1.3; background:var(--tint); display:flex; align-items:center; justify-content:center;}
.p-thumb > svg{width:36px; height:36px; color:var(--accent); opacity:.85;}
.p-thumb img{width:100%; height:100%; object-fit:cover;}
.p-body{padding:12px 13px 14px; display:flex; flex-direction:column; gap:5px; flex:1;}
.p-cat{font-size:11px; color:var(--accent); font-weight:700;}
.p-title{font-size:13.5px; font-weight:700; line-height:1.35;}
.p-store{font-size:11.5px; color:var(--ink-muted);}
.p-price{font-size:14.5px; font-weight:800; margin-top:auto;}
.p-price s{font-size:12px; font-weight:500; color:var(--ink-muted); margin-inline-start:6px;}
.p-add{margin-top:7px; border:none; background:var(--ink); color:var(--surface); padding:9px; border-radius:9px; font-size:12.5px; font-weight:700;}
.p-add:disabled{opacity:.45; cursor:not-allowed;}
.wish-btn{position:absolute; top:7px; inset-inline-start:7px; width:27px; height:27px; border-radius:50%; background:rgba(255,255,255,.92); border:none; display:flex; align-items:center; justify-content:center; padding:0;}
.wish-btn svg{width:14px; height:14px; color:#9299A6;}
.wish-btn.active svg{color:#E0476B;}

/* ---------- Badges, stats, rows (dashboards) ---------- */
.badge{font-size:11px; font-weight:700; padding:3px 10px; border-radius:999px; white-space:nowrap;}
.badge.ok{background:var(--ok-tint); color:var(--ok);}
.badge.warn{background:var(--warn-tint); color:var(--warn);}
.badge.danger{background:var(--danger-tint); color:var(--danger);}
.badge.muted{background:var(--line); color:var(--ink-muted);}
.stat-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:18px;}
@media (min-width:520px){ .stat-grid{grid-template-columns:repeat(4,1fr);} }
.stat-card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-m); padding:14px; border-inline-start:4px solid var(--accent, var(--teal));}
.stat-card .num{font-size:22px; font-weight:800; line-height:1.1;}
.stat-card .label{font-size:12px; color:var(--ink-muted); margin-top:4px;}
/* Admin visits page: web/app split under a figure, and the 30-day bar chart (website teal, app purple, stacked). */
.visit-split{font-size:11.5px; color:var(--ink-muted); margin-top:6px;}
.visit-chart-card{padding:16px;}
.visit-legend{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--ink-muted); margin-bottom:10px;}
.visit-legend span{width:10px; height:10px; border-radius:3px; display:inline-block; margin-inline-start:8px;}
.visit-chart{display:flex; align-items:flex-end; gap:3px; height:160px; border-bottom:1px solid var(--line);}
.visit-bar{flex:1; height:100%; display:flex; flex-direction:column; justify-content:flex-end; min-width:0;}
.visit-bar:hover span{opacity:.75;}
.visit-bar span{display:block;}
.visit-legend span.web, .visit-bar .web{background:var(--teal);}
.visit-legend span.app, .visit-bar .app{background:#7C5CC4;}
.visit-bar .app{border-radius:3px 3px 0 0;}
.visit-axis{display:flex; justify-content:space-between; font-size:11px; color:var(--ink-muted); margin-top:6px;}
.empty{text-align:center; padding:36px 16px; color:var(--ink-muted); font-size:13.5px; background:var(--surface); border:1px dashed var(--line); border-radius:var(--radius-m);}

/* ---------- Value props ---------- */
.value-list{display:flex; flex-direction:column; gap:18px;}
.value-item{display:flex; gap:16px; align-items:flex-start;}
.value-ic{width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.value-ic svg{width:22px; height:22px;}
.value-item h3{font-size:15px; font-weight:700; margin-bottom:4px;}
.value-item p{font-size:13px; color:var(--ink-muted); line-height:1.6;}
@media (min-width:760px){ .value-list{flex-direction:row;} .value-item{flex:1; flex-direction:column;} }

/* ---------- Seller CTA ---------- */
.seller-cta{background:var(--teal); border-radius:22px; padding:40px 26px; text-align:center; color:#fff;}
.seller-cta h2{font-size:22px; font-weight:800; margin-bottom:10px;}
.seller-cta p{font-size:14px; color:#DFF6EE; max-width:440px; margin:0 auto 22px; line-height:1.7;}
.seller-cta a{display:inline-block; background:#fff; color:var(--teal-dark); padding:13px 26px; border-radius:11px; font-size:14px; font-weight:800;}

/* ---------- Ads ---------- */
.ad-banner{background:var(--surface); border:1.5px dashed var(--line); border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:var(--ink-muted); font-size:11.5px; font-weight:700; text-align:center; gap:4px; overflow:hidden;}
.ad-banner span{font-size:10.5px; font-weight:500; opacity:.75;}
.ad-banner img{width:100%; height:100%; object-fit:cover;}
.ad-banner.has-ad{border:none; padding:0 !important;}
.ad-top,.ad-bottom{margin:18px 20px; padding:14px; min-height:64px;}
@media (min-width:1120px){ .ad-top,.ad-bottom{max-width:1080px; margin:18px auto;} }
.ad-rail{position:fixed; top:50%; transform:translateY(-50%); width:150px; min-height:420px; z-index:5; padding:14px; display:none !important;}
.ad-rail.left{left:14px;} .ad-rail.right{right:14px;}
@media (min-width:1320px){ .ad-rail{display:flex !important;} }

/* ---------- Footer ---------- */
.site-footer{background:var(--navy); color:#B9C4D8; padding:44px 20px 28px;}
.foot-grid{display:flex; flex-direction:column; gap:28px; margin-bottom:28px;}
.foot-brand .brand{margin-bottom:10px;}
.foot-brand p{font-size:13px; color:#8FA0BC; max-width:280px; line-height:1.7;}
.foot-col h4{color:#fff; font-size:13.5px; font-weight:700; margin-bottom:12px;}
.foot-col a{display:block; font-size:13px; color:#AEBBD1; padding:5px 0;}
.foot-bottom{border-top:1px solid rgba(255,255,255,.1); padding-top:18px; font-size:12px; color:#7A8BA8; text-align:center;}
@media (min-width:700px){ .foot-grid{flex-direction:row; justify-content:space-between;} }

/* ---------- Toast ---------- */
.toast{position:fixed; bottom:calc(22px + env(safe-area-inset-bottom,0px)); right:50%; transform:translateX(50%); background:var(--ink); color:var(--surface); padding:11px 20px; border-radius:999px; font-size:13px; font-weight:600; z-index:50; white-space:nowrap;}
@media (prefers-reduced-motion: reduce){ *{transition:none !important; animation:none !important;} }

/* ---------- Forms & buttons ---------- */
.field{margin-bottom:14px;}
.field label,.field .label{display:block; font-size:12.5px; font-weight:700; color:var(--ink-muted); margin-bottom:6px;}
.field input,.field select,.field textarea{width:100%; border:1px solid var(--line); background:var(--surface); border-radius:10px; padding:11px 13px; font-size:14px; color:var(--ink); font-family:inherit; outline:none;}
.field textarea{min-height:90px; resize:vertical;}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--teal);}
.field .hint{font-size:11.5px; color:var(--ink-muted); margin-top:5px;}
.field .error{font-size:12px; color:var(--danger); margin-top:5px; font-weight:600;}
.field.has-error input,.field.has-error select,.field.has-error textarea{border-color:var(--danger);}
.field-row{display:grid; gap:0 12px;}
@media (min-width:560px){ .field-row{grid-template-columns:1fr 1fr;} }
.check{display:flex; align-items:center; gap:9px; font-size:13.5px; font-weight:600; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); cursor:pointer; margin-bottom:8px;}
.check input{width:17px; height:17px; accent-color:var(--teal); flex-shrink:0;}
.chip-checks{display:flex; flex-wrap:wrap; gap:7px;}
.chip-checks label{display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; padding:6px 11px; border:1px solid var(--line); border-radius:999px; background:var(--surface); cursor:pointer;}
.chip-checks input{accent-color:var(--teal);}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid transparent; padding:12px 22px; border-radius:10px; font-size:14px; font-weight:700; background:var(--ink); color:var(--surface);}
.btn.primary{background:var(--teal); color:#fff;}
.btn.ghost{background:var(--surface); color:var(--ink); border-color:var(--line);}
.btn.danger{background:var(--danger); color:#fff;}
.btn.block{width:100%;}
.btn:disabled{opacity:.5; cursor:not-allowed;}
.mini-btn{display:inline-flex; align-items:center; border:1px solid var(--line); background:var(--surface); color:var(--ink); padding:6px 12px; border-radius:8px; font-size:12px; font-weight:700;}
.mini-btn.ok-btn{background:var(--ok); color:#fff; border-color:var(--ok);}
.mini-btn.danger-btn{background:var(--danger); color:#fff; border-color:var(--danger);}
.btn-row{display:flex; gap:6px; flex-wrap:wrap; align-items:center;}
.link{color:var(--teal-dark); font-weight:700;}
.alert{padding:12px 14px; border-radius:12px; font-size:13.5px; font-weight:600; margin-bottom:16px;}
.alert.ok{background:var(--ok-tint); color:var(--ok);}
.alert.warn{background:var(--warn-tint); color:var(--warn);}
.alert.danger{background:var(--danger-tint); color:var(--danger);}
.swatch-row{display:flex; gap:9px; flex-wrap:wrap;}
.swatch-row label{position:relative; cursor:pointer;}
.swatch-row input{position:absolute; opacity:0; inset:0;}
.swatch-row span{display:block; width:30px; height:30px; border-radius:50%; border:3px solid var(--surface); box-shadow:0 0 0 1.5px var(--line);}
.swatch-row input:checked + span{box-shadow:0 0 0 2.5px var(--ink);}
.swatch-row input:focus-visible + span{outline:2px solid var(--teal); outline-offset:3px;}

/* ---------- Auth pages ---------- */
.auth-wrap{min-height:calc(100vh - 260px); display:flex; align-items:center; justify-content:center; padding:40px 16px;}
.card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-l); padding:28px 22px;}
.auth-card{width:100%; max-width:400px;}
.auth-card h1{font-size:22px; font-weight:800; margin-bottom:6px;}
.auth-card > p{font-size:13.5px; color:var(--ink-muted); margin-bottom:22px; line-height:1.7;}
.phone-input{display:flex; direction:ltr; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--surface);}
.phone-input span{padding:11px 12px; background:var(--bg); color:var(--ink-muted); font-weight:700; font-size:14px; border-inline-end:1px solid var(--line);}
.field .phone-input input{border:none; border-radius:0; direction:ltr; text-align:left; letter-spacing:1px;}
.code-input{direction:ltr; text-align:center; font-size:24px !important; letter-spacing:10px; font-weight:800; font-family:'Cairo',sans-serif !important;}
.debug-code{background:var(--warn-tint); color:var(--warn); border-radius:10px; padding:10px; font-size:12.5px; text-align:center; margin-bottom:14px;}

/* ---------- Dashboard shell ---------- */
.dash-top{background:linear-gradient(180deg,var(--navy),var(--navy-2)); padding:14px 16px 0; position:sticky; top:0; z-index:20;}
.dash-top .row{display:flex; align-items:center; justify-content:space-between; max-width:960px; margin:0 auto 12px; gap:12px;}
.dash-top .who{color:#AEB9CC; font-size:12px; font-weight:600; display:flex; align-items:center; gap:10px;}
.dash-top .who a,.dash-top .who button{color:#DCE3EE; background:none; border:none; font-size:12px; font-weight:700;}
.subnav{display:flex; gap:6px; overflow-x:auto; max-width:960px; margin:0 auto; scrollbar-width:none;}
.subnav::-webkit-scrollbar{display:none;}
.subnav{flex-wrap:wrap; overflow:visible; gap:2px 4px;}
.subnav a{padding:10px 12px;}
@media (max-width:759px){ .subnav{padding:4px 8px 6px;} .subnav a{padding:7px 10px; font-size:13px; border-bottom-width:2px;} }
.subnav a{flex-shrink:0; color:#C7D0E0; padding:10px 14px; font-size:13.5px; font-weight:600; border-bottom:3px solid transparent;}
.subnav a.active{color:#fff; border-bottom-color:var(--teal);}
.dash-main{max-width:960px; margin:0 auto; padding:20px 16px 56px;}
.page-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; flex-wrap:wrap;}
.page-head h1{font-size:19px; font-weight:800;}
.row-list{display:flex; flex-direction:column; gap:10px;}
.row-item{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-m); padding:12px 14px; display:flex; align-items:center; gap:12px;}
.row-item.child{margin-inline-start:28px; border-style:dashed;}
.row-icon{width:38px; height:38px; border-radius:10px; background:var(--tint, var(--teal-tint)); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.row-icon svg{width:19px; height:19px; color:var(--accent, var(--teal));}
.row-main{flex:1; min-width:0;}
.row-title{font-size:13.5px; font-weight:700;}
.row-sub{font-size:12px; color:var(--ink-muted); margin-top:2px;}
.row-end{display:flex; flex-direction:column; align-items:flex-end; gap:6px;}
.filter-tabs{display:flex; gap:6px; margin-bottom:14px; flex-wrap:wrap;}
.filter-tabs a{padding:7px 14px; border-radius:999px; border:1px solid var(--line); background:var(--surface); font-size:12.5px; font-weight:700; color:var(--ink-muted);}
.filter-tabs a.active{background:var(--ink); color:var(--surface); border-color:var(--ink);}
.dl{display:grid; grid-template-columns:auto 1fr; gap:8px 16px; font-size:13.5px;}
.dl dt{color:var(--ink-muted); font-weight:600;}
.dl dd{font-weight:600;}
.section-title{font-size:15px; font-weight:800; margin:22px 0 12px;}

/* ---------- Product form ---------- */
.img-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:10px; margin-bottom:14px;}
.img-tile{background:var(--bg); border:1px solid var(--line); border-radius:12px; overflow:hidden; font-size:11.5px; font-weight:600;}
.img-tile img{width:100%; aspect-ratio:1; object-fit:cover;}
.img-tile label{display:flex; align-items:center; gap:5px; padding:4px 8px; cursor:pointer;}
.img-tile label.danger{color:var(--danger);}
.variant-row{display:grid; grid-template-columns:1fr 1fr; gap:0 10px; align-items:end; padding:12px; border:1px dashed var(--line); border-radius:12px; margin-bottom:10px;}
.variant-row .field{margin-bottom:8px;}
.variant-row .mini-btn{grid-column:1 / -1; justify-self:start; margin-bottom:4px;}
@media (min-width:640px){ .variant-row{grid-template-columns:1.2fr 1.2fr 1fr 1fr 1fr auto;} .variant-row .mini-btn{grid-column:auto; margin-bottom:10px;} }

/* ---------- Product page ---------- */
.pdp{display:grid; gap:24px;}
@media (min-width:820px){ .pdp{grid-template-columns:1.1fr 1fr; align-items:start;} }
.gallery-main{aspect-ratio:1; border-radius:var(--radius-l); overflow:hidden; background:var(--tint); display:flex; align-items:center; justify-content:center; border:1px solid var(--line);}
.gallery-main img{width:100%; height:100%; object-fit:cover;}
.gallery-main > svg{width:72px; height:72px; color:var(--accent);}
.gallery-thumbs{display:flex; gap:8px; margin-top:10px; overflow-x:auto;}
.gallery-thumbs button{width:64px; height:64px; flex-shrink:0; border-radius:10px; overflow:hidden; border:2px solid transparent; padding:0; background:none;}
.gallery-thumbs button.active{border-color:var(--teal);}
.gallery-thumbs img{width:100%; height:100%; object-fit:cover;}
.pdp h1{font-size:clamp(22px,4vw,28px); font-weight:800; line-height:1.3; margin:6px 0 10px;}
.pdp-price{font-family:'Cairo',sans-serif; font-size:26px; font-weight:800; margin:8px 0 4px;}
.pdp-price s{font-size:15px; font-weight:600; color:var(--ink-muted); margin-inline-start:8px;}
.option-pills{display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 4px;}
.option-pills button{padding:8px 14px; border-radius:10px; border:1.5px solid var(--line); background:var(--surface); color:var(--ink); font-size:13px; font-weight:700;}
.option-pills button.active{border-color:var(--teal); background:var(--teal-tint);}
.option-pills button:disabled{opacity:.45; text-decoration:line-through;}
.info-list{display:flex; flex-direction:column; gap:10px; margin-top:18px; font-size:13.5px;}
.info-list div{display:flex; gap:10px; align-items:flex-start;}
.info-list svg{width:18px; height:18px; color:var(--teal); flex-shrink:0; margin-top:2px;}
.store-card{display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--line); border-radius:var(--radius-m); background:var(--surface); margin-top:18px;}
.store-logo{width:48px; height:48px; border-radius:12px; background:var(--teal-tint); color:var(--teal); display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden;}
.store-logo img{width:100%; height:100%; object-fit:cover;}
.store-logo svg{width:24px; height:24px;}
.prose{font-size:14.5px; line-height:1.9; white-space:pre-line; color:var(--ink);}
.preview-bar{background:var(--warn-tint); color:var(--warn); text-align:center; padding:10px 16px; font-size:13px; font-weight:700;}
.breadcrumbs{font-size:12.5px; color:var(--ink-muted); margin-bottom:16px; display:flex; gap:6px; flex-wrap:wrap;}
.breadcrumbs a:hover{color:var(--teal);}
.store-hero{background:linear-gradient(160deg,var(--navy),var(--navy-2)); color:#fff; padding:36px 20px;}
.store-hero .wrap{display:flex; align-items:center; gap:16px; flex-wrap:wrap;}
.store-hero .store-logo{width:72px; height:72px; border-radius:18px; background:rgba(255,255,255,.12); color:#fff;}
.store-hero h1{font-size:24px; font-weight:800;}
.store-hero p{color:#B9C4D8; font-size:13.5px; margin-top:4px;}
.store-meta{display:flex; flex-wrap:wrap; gap:8px; margin-top:12px;}

/* ---------- Cart & checkout ---------- */
.cart-line{display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--line);}
.cart-line:last-of-type{border-bottom:none;}
.qty-ctrl{display:flex; align-items:center; gap:8px; background:var(--bg); border-radius:8px; padding:4px 8px;}
.qty-ctrl button{width:22px; height:22px; border:none; background:none; font-size:16px; font-weight:800; color:var(--ink);}
.qty-ctrl button:disabled{opacity:.3;}
.qty-ctrl span{min-width:16px; text-align:center; font-weight:700; font-size:13.5px;}
.sum-row{display:flex; justify-content:space-between; gap:12px; font-size:13.5px; margin-bottom:8px; color:var(--ink-muted);}
.sum-row strong,.sum-row .v{color:var(--ink);}
.sum-row.total{color:var(--ink); font-weight:800; font-size:16px; border-top:1px solid var(--line); padding-top:10px; margin-top:4px;}
.sum-row.discount .v{color:var(--ok);}
.choice{display:flex; gap:10px; align-items:flex-start; padding:12px; border:1.5px solid var(--line); border-radius:12px; margin-bottom:8px; cursor:pointer; background:var(--surface);}
.choice:has(input:checked){border-color:var(--teal); background:var(--teal-tint);}
.choice input{margin-top:3px; accent-color:var(--teal);}
.choice.disabled{opacity:.5; cursor:not-allowed;}
.coupon-row{display:flex; gap:8px; margin-top:8px;}
.coupon-row input{flex:1; min-width:0; border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:9px; padding:9px 12px; font-family:inherit; text-transform:uppercase; direction:ltr;}
.timeline{list-style:none; display:flex; flex-direction:column; gap:10px; margin-top:8px; font-size:13px;}
.timeline li{display:flex; gap:10px; align-items:baseline;}
.timeline li::before{content:''; width:9px; height:9px; border-radius:50%; background:var(--teal); flex-shrink:0;}
.timeline time{color:var(--ink-muted); font-size:12px; margin-inline-start:auto;}
.order-head{display:flex; justify-content:space-between; gap:12px; align-items:flex-start; flex-wrap:wrap;}

/* ---------- Reviews & disputes ---------- */
.stars{color:#E0A526; letter-spacing:1px; font-size:14px;}
.star-input{display:flex; flex-direction:row-reverse; justify-content:flex-end; gap:2px;}
.star-input input{position:absolute; opacity:0; width:0;}
.star-input label{font-size:26px; color:var(--line); cursor:pointer; line-height:1;}
.star-input input:checked ~ label,.star-input label:hover,.star-input label:hover ~ label{color:#E0A526;}
.star-input input:focus-visible + label{outline:2px solid var(--teal);}
.reply{background:var(--bg); border-radius:10px; padding:9px 12px; font-size:13px; margin-top:8px;}
.review{padding:14px 0; border-bottom:1px solid var(--line);}
.review:last-child{border-bottom:none;}
.thread{display:flex; flex-direction:column; gap:10px; margin:12px 0;}
.msg{max-width:85%; padding:10px 13px; border-radius:14px; font-size:13.5px; line-height:1.7; background:var(--bg);}
.msg.customer{align-self:flex-start; border-start-start-radius:4px;}
.msg.merchant{align-self:flex-end; background:var(--teal-tint); border-start-end-radius:4px;}
.msg.admin{align-self:center; background:var(--warn-tint); max-width:95%;}
.msg .who{font-size:11.5px; font-weight:700; color:var(--ink-muted); margin-bottom:3px;}
.msg img{max-width:220px; border-radius:8px; margin-top:6px;}
.ledger-amount.pos{color:var(--ok);} .ledger-amount.neg{color:var(--danger);}
.table{width:100%; border-collapse:collapse; font-size:13px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-m); overflow:hidden;}
.table th,.table td{padding:10px 12px; text-align:start; border-bottom:1px solid var(--line);}
.table th{font-size:12px; color:var(--ink-muted); font-weight:700; background:var(--bg);}
.table-wrap{overflow-x:auto;}

/* ---------- Legal pages ---------- */
.legal h1{font-size:26px; font-weight:800; margin-bottom:4px;}
.legal h2{font-size:17px; font-weight:800; margin:26px 0 10px;}
.legal p,.legal li{font-size:14.5px; line-height:1.95;}
.legal p{margin-bottom:10px;}
.legal ol,.legal ul{padding-inline-start:22px; margin-bottom:10px; display:flex; flex-direction:column; gap:4px;}
.legal .card{margin:14px 0;}

/* ---------- Wishlist ---------- */
.p-card > .wish-btn,.p-card > form > .wish-btn{position:absolute; top:8px; inset-inline-start:8px; z-index:2;}
.wish-btn-lg{flex-shrink:0; width:42px; height:42px; border-radius:50%; border:1px solid var(--line); background:var(--surface); color:#9299A6; display:flex; align-items:center; justify-content:center; padding:0; margin-top:6px;}
.wish-btn-lg svg{width:20px; height:20px;}
.wish-btn-lg.active,.wish-btn.active{color:#E0476B;}
.wish-btn.active svg,.wish-btn-lg.active svg{color:#E0476B;}
.ad-banner{position:relative;}
.ad-label{position:absolute; top:4px; inset-inline-end:6px; background:rgba(0,0,0,.55); color:#fff; font-size:10px; font-weight:700; padding:1px 7px; border-radius:6px;}
.cell-input{width:100%; min-width:70px; border:1px solid var(--line); border-radius:8px; padding:7px 9px; font-family:inherit; background:var(--surface); color:var(--ink);}
.legal-custom h2{font-size:17px; font-weight:800; margin:26px 0 10px;}
.legal-custom p,.legal-custom li{font-size:14.5px; line-height:1.95;}
.legal-custom ul,.legal-custom ol{padding-inline-start:22px; margin-bottom:10px;}
.legal-note{font-size:14px; padding:10px 14px; border-radius:10px; background:var(--sf-bg, #f4f4f2); margin-bottom:16px;}
.icon-picker{display:flex; flex-wrap:wrap; gap:6px;}
.icon-picker label{position:relative; cursor:pointer;}
.icon-picker input{position:absolute; opacity:0; inset:0;}
.icon-picker span{display:flex; width:38px; height:38px; align-items:center; justify-content:center; border:1.5px solid var(--line); border-radius:10px; background:var(--surface); color:var(--ink-muted);}
.icon-picker span svg{width:20px; height:20px;}
.icon-picker input:checked + span{border-color:var(--teal); color:var(--teal); background:var(--teal-tint);}
.icon-picker input:focus-visible + span{outline:3px solid var(--teal); outline-offset:2px;}
.color-field{display:flex; align-items:center; gap:10px;}
.color-field input[type=color]{width:46px; height:38px; padding:2px; border:1px solid var(--line); border-radius:9px; background:var(--surface);}
.editor-block{border:1px dashed var(--line); border-radius:14px; padding:14px; margin-bottom:12px; background:var(--bg);}
.editor-block .btn-row{justify-content:flex-end;}
.theme-preview{display:flex; gap:10px; flex-wrap:wrap; align-items:center; padding:14px; border-radius:12px; border:1px solid var(--line); margin:10px 0;}
.theme-preview .tp-head{padding:10px 14px; border-radius:10px; color:#fff; font-weight:800;}
.theme-preview .tp-btn{padding:9px 16px; border-radius:9px; color:#fff; font-weight:700;}
.theme-preview .tp-sale{padding:3px 8px; border-radius:7px; color:#fff; font-weight:800; font-size:12px;}
.row-icon{overflow:hidden;}
.row-icon .vis-img{width:100%; height:100%;}
.img-current{display:flex; align-items:center; gap:12px; margin-bottom:8px;}
.pager{display:flex; flex-wrap:wrap; gap:6px; align-items:center; justify-content:center; margin:6px 0;}
.pager-btn{min-width:38px; height:38px; padding:0 12px; display:inline-flex; align-items:center; justify-content:center; border-radius:10px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font-weight:700; font-size:13.5px;}
a.pager-btn:hover{border-color:var(--teal); color:var(--teal);}
.pager-btn.current{background:var(--teal); border-color:var(--teal); color:#fff;}
.pager-btn.disabled{opacity:.45;}
.pager-gap{padding:0 4px; color:var(--ink-muted);}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) [style*="--tint"][style*="--accent"]{--tint:color-mix(in srgb, var(--accent) 22%, var(--surface)) !important;} }
:root[data-theme="dark"] [style*="--tint"][style*="--accent"]{--tint:color-mix(in srgb, var(--accent) 22%, var(--surface)) !important;}

/* English pages are left-to-right: arrows written as text ("←", see .arr) point the reading direction. */
.arr{display:inline-block;}
[dir=ltr] .arr{transform:scaleX(-1);}
/* Merchant panel: new-order alert (js/order-alert.js) */
.order-alert-banner{position:fixed; inset-inline:12px; bottom:16px; z-index:60; max-width:520px; margin:0 auto; display:flex; align-items:center; gap:12px; background:var(--navy,#122A4D); color:#fff; padding:14px 16px; border-radius:14px; box-shadow:0 10px 30px rgba(0,0,0,.25); font-weight:700; font-size:14px;}
.order-alert-banner span{flex:1;}
.order-alert-banner a{color:#fff; background:#E8392C; padding:8px 12px; border-radius:10px; text-decoration:none; white-space:nowrap;}
.order-alert-banner button{background:none; border:none; color:#C7D0E0; font-size:22px; line-height:1; cursor:pointer; padding:0 4px;}
