:root {
  --font-family: 'Mali', 'SF Pro Display', 'Inter', -apple-system, system-ui, 'Segoe UI', sans-serif;
  --surface-base: #E6E7EC;
  --surface-card: #E9EAF0;
  --surface-raised: #EEEFF4;
  --text-primary: #2B2D3A;
  --text-secondary: #636675;   /* AA: 4.6–5.0:1 บนพื้นผิวทั้ง 3 ระดับ (เดิม #8A8D9C = 2.7:1) */
  --text-disabled: #B7B9C4;     /* เฉพาะองค์ประกอบ disabled / ไอคอนตกแต่ง — ห้ามใช้กับตัวหนังสือที่ต้องอ่าน */
  --text-placeholder: var(--text-secondary);
  --accent-text: #5045DA;       /* สีม่วงสำหรับ "ตัวหนังสือ" (ลิงก์/ป้ายกำกับ) ผ่าน AA; --accent-primary ใช้กับพื้น/ไอคอน/วงแหวน */
  --success-text: #1F7141;
  --danger-text: #9E3A3A;
  --accent-primary: #6C63FF;
  --accent-primary-hover: #5A52E0;
  --accent-gradient: linear-gradient(135deg, #6459F0 0%, #4F44DE 100%); /* ตัวขาวบนปุ่มผ่าน AA ทั้งสองปลาย (4.97 / 6.53) */
  --status-success: #4CD97B;
  --status-danger: #FF6B6B;
  --star-color: #FFB84D;
  --shadow-dark: rgba(163, 166, 186, 0.55);
  --shadow-light: rgba(255, 255, 255, 0.9);
}
:root[data-theme="dark"] {
  --surface-base: #24252C;
  --surface-card: #2B2C35;
  --surface-raised: #313240;
  --text-primary: #F1F1F5;
  --text-secondary: #9A9CAA;
  --text-disabled: #5B5C68;
  --text-placeholder: var(--text-secondary);
  --accent-text: #A09BFF;
  --success-text: #4CD97B;
  --danger-text: #FF7E7E;
  --accent-primary: #8B85FF;
  --accent-primary-hover: #A29DFF;
  --accent-gradient: linear-gradient(135deg, #6459F0 0%, #4F44DE 100%);
  --shadow-dark: rgba(0, 0, 0, 0.65);
  --shadow-light: rgba(70, 71, 82, 0.4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-base: #24252C; --surface-card: #2B2C35; --surface-raised: #313240;
    --text-primary: #F1F1F5; --text-secondary: #9A9CAA; --text-disabled: #5B5C68;
    --text-placeholder: var(--text-secondary); --accent-text: #A09BFF; --success-text: #4CD97B; --danger-text: #FF7E7E;
    --accent-primary: #8B85FF; --accent-primary-hover: #A29DFF;
    --accent-gradient: linear-gradient(135deg, #6459F0 0%, #4F44DE 100%);
    --shadow-dark: rgba(0, 0, 0, 0.65); --shadow-light: rgba(70, 71, 82, 0.4);
  }
}
* { box-sizing: border-box; }
html,body { margin:0; padding:0; background:var(--surface-base); color:var(--text-primary);
  font-family: var(--font-family); }
a { text-decoration:none; color:inherit; }
button { font-family:inherit; }
img,svg { display:block; }
::selection { background: rgba(108,99,255,.25); }

/* ---------- icon system ---------- */
.icon { width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round; display:inline-block; vertical-align:middle; flex-shrink:0; }
.icon.icon-sm { width:14px; height:14px; }
.icon.icon-lg { width:26px; height:26px; }
.icon.icon-xl { width:38px; height:38px; }
.icon.icon-huge { width:64px; height:64px; }
.icon.filled { fill:currentColor; }
.icon-star { width:13px; height:13px; color:var(--text-disabled); }
.icon-star.filled { color:var(--star-color); stroke:var(--star-color); fill:currentColor; }

/* ---------- shared elevation ---------- */
.elev { box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light); }
.elev-sm { box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light); }
.inset { box-shadow: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light); }
.inset-sm { box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light); }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@keyframes fadeIn { from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }

/* ---------- header ---------- */
header.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface-base);
  padding: 14px 0;
  border-bottom: 1px solid rgba(163,166,186,0.25);
}
.header-inner { display:flex; align-items:center; gap:24px; }
.brand { display:flex; align-items:center; gap:10px; cursor:pointer; flex-shrink:0; }
.brand .mark {
  width:38px; height:38px; border-radius:12px; background:var(--surface-raised);
  display:flex; align-items:center; justify-content:center; color:var(--accent-primary);
}
.brand .word { font-size:19px; font-weight:800; letter-spacing:.02em; }
.brand .word span { color: var(--accent-primary); }

nav.main-nav { display:flex; gap:6px; background:var(--surface-card); border-radius:999px; padding:4px; }
nav.main-nav button {
  border:none; background:transparent; padding:9px 18px; border-radius:999px;
  font-size:14px; font-weight:600; color:var(--text-secondary); cursor:pointer; white-space:nowrap;
}
nav.main-nav button.active { background:var(--accent-gradient); color:#fff; box-shadow:3px 3px 8px rgba(108,99,255,.35); }

.header-icons { display:flex; align-items:center; gap:10px; margin-left:auto; }
.icon-btn {
  width:40px; height:40px; border-radius:50%; border:none; background:var(--surface-raised);
  display:flex; align-items:center; justify-content:center; cursor:pointer; position:relative;
  color:var(--text-primary);
}
.icon-btn:active { box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light); }
.icon-btn.has-items { color:var(--accent-primary); }
.icon-badge {
  position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 4px; border-radius:999px;
  background:var(--accent-gradient); color:#fff; font-size:10px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}

@media (max-width:760px){
  .header-inner{ flex-wrap:wrap; }
  nav.main-nav{ order:3; width:100%; overflow-x:auto; scrollbar-width:none; }
  nav.main-nav::-webkit-scrollbar{display:none;}
  .header-icons{ order:2; }
}

/* ---------- generic ---------- */
.section { padding: 48px 0; }
.section-head { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:26px; gap:16px; }
.section-head h2 { font-size:23px; margin:0 0 4px; }
.section-head p { margin:0; color:var(--text-secondary); font-size:14px; }
.link-btn { border:none; background:transparent; color:var(--accent-text); font-weight:700; font-size:14px; cursor:pointer; display:inline-flex; align-items:center; gap:6px; }

.btn-primary {
  background:var(--accent-gradient); color:#fff; border:none; border-radius:16px;
  padding:14px 26px; font-weight:700; font-size:15px; cursor:pointer;
  box-shadow:5px 5px 14px rgba(108,99,255,.4); transition:transform .1s, filter .1s;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.btn-primary:active { transform:scale(.98); filter:brightness(.95); }
.btn-primary:disabled { background:var(--surface-raised); color:var(--text-disabled); box-shadow:none; cursor:not-allowed; }
.btn-primary.block { width:100%; }
.btn-secondary {
  background:var(--surface-raised); color:var(--text-secondary); border:none; border-radius:16px;
  padding:14px 26px; font-weight:700; font-size:15px; cursor:pointer;
  box-shadow:4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.btn-secondary:active { box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); }

.field {
  display:flex; align-items:center; gap:10px; background:var(--surface-raised);
  border-radius:14px; padding:13px 16px; box-shadow: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light);
}
.field .icon { color:var(--text-secondary); }
.field input, .field select, .field textarea {
  border:none; background:transparent; outline:none; width:100%; font-size:15px;
  color:var(--text-primary); font-family:inherit;
}
.field textarea { resize:vertical; min-height:70px; }
.field input::placeholder { color:var(--text-placeholder); }
.field-label { font-size:13px; font-weight:700; color:var(--text-secondary); margin:0 0 8px; display:block; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:560px){ .field-row{ grid-template-columns:1fr; } }

.panel { background:var(--surface-card); border-radius:28px; padding:28px; }

.stars { display:inline-flex; align-items:center; gap:2px; }
.price { font-size:17px; font-weight:800; color:var(--text-primary); }
.price-old { font-size:13px; color:var(--text-secondary); text-decoration:line-through; margin-left:6px; font-weight:600; }
.badge-tag {
  position:absolute; top:12px; left:12px; font-size:11px; font-weight:800; letter-spacing:.03em;
  padding:5px 10px; border-radius:999px; color:#fff; text-transform:uppercase;
}
.badge-tag.sale { background:linear-gradient(135deg,#C8443F,#B53434); } /* ตัวขาว 4.82 / 5.99:1 */
.badge-tag.new { background:var(--accent-gradient); }

/* toggle */
.toggle { width:44px; height:26px; border-radius:999px; background:var(--surface-raised); border:none; cursor:pointer;
  box-shadow: inset 2px 2px 6px var(--shadow-dark), inset -2px -2px 6px var(--shadow-light); position:relative; flex-shrink:0; }
.toggle.on { background:var(--accent-gradient); box-shadow:none; }
.toggle .thumb { width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:1px 1px 4px rgba(0,0,0,.25);
  position:absolute; top:3px; left:3px; transition:transform .2s; }
.toggle.on .thumb { transform: translateX(18px); }

.checkbox { width:22px; height:22px; border-radius:7px; border:none; cursor:pointer; background:var(--surface-raised);
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light); color:var(--accent-primary); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.radio { width:20px; height:20px; border-radius:50%; border:none; cursor:pointer; background:var(--surface-raised);
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.radio .rdot { width:9px; height:9px; border-radius:50%; background:var(--accent-primary); opacity:0; }
.radio.selected .rdot { opacity:1; }
.check-row { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--text-primary); cursor:pointer; }

/* ---------- HOME ---------- */
.hero { display:grid; grid-template-columns:1.1fr .9fr; gap:32px; align-items:center; padding:44px; border-radius:32px; }
@media (max-width:800px){ .hero{ grid-template-columns:1fr; padding:28px; } }
.hero-badge { display:inline-block; background:rgba(108,99,255,.15); color:var(--accent-text); font-size:13px; font-weight:700;
  padding:6px 14px; border-radius:999px; margin-bottom:16px; }
.hero h1 { font-size:40px; line-height:1.2; margin:0 0 14px; }
@media (max-width:800px){ .hero h1{ font-size:29px; } }
.hero p { color:var(--text-secondary); font-size:15px; margin:0 0 24px; max-width:420px; }
.hero-actions { display:flex; gap:12px; flex-wrap:wrap; }
.hero-visual { width:100%; aspect-ratio:1/1; border-radius:28px; background:var(--surface-raised);
  display:flex; align-items:center; justify-content:center; position:relative; color:var(--accent-primary); }
.hero-visual::before,.hero-visual::after{ content:''; position:absolute; border-radius:50%; border:1px solid rgba(108,99,255,.18); }
.hero-visual::before{ inset:18px; } .hero-visual::after{ inset:36px; }

.cat-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:16px; }
@media (max-width:800px){ .cat-grid{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:520px){ .cat-grid{ grid-template-columns:repeat(2,1fr); } }
.cat-card { background:var(--surface-card); border-radius:20px; padding:22px 14px; text-align:center; cursor:pointer; border:none;
  box-shadow:5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light); }
.cat-card:active { box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); }
.cat-card .ic { width:52px; height:52px; margin:0 auto 10px; border-radius:16px; background:var(--surface-raised);
  display:flex; align-items:center; justify-content:center; color:var(--accent-primary); box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light); }
.cat-card .lbl { font-size:13px; font-weight:700; color:var(--text-primary); }

.promo-row { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media (max-width:700px){ .promo-row{ grid-template-columns:1fr; } }
.promo-item { display:flex; align-items:center; gap:14px; background:var(--surface-card); border-radius:20px; padding:18px 20px;
  box-shadow:5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light); }
.promo-item .ic { width:44px; height:44px; border-radius:12px; background:var(--surface-raised); display:flex; align-items:center; justify-content:center;
  color:var(--accent-primary); flex-shrink:0; box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light); }
.promo-item .t1 { font-size:14px; font-weight:700; }
.promo-item .t2 { font-size:12px; color:var(--text-secondary); }

.newsletter { text-align:center; padding:44px; border-radius:32px; }
.newsletter h2 { margin:0 0 8px; font-size:23px; }
.newsletter p { color:var(--text-secondary); font-size:14px; margin:0 0 22px; }
.newsletter-form { display:flex; gap:10px; max-width:420px; margin:0 auto; }
.newsletter-form .field { flex:1; }

/* ---------- product card ---------- */
.product-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:22px; }
.product-card { background:var(--surface-card); border-radius:24px; padding:16px; position:relative;
  box-shadow:5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light); display:flex; flex-direction:column; }
.product-img { aspect-ratio:1/1; border-radius:18px; background:var(--surface-raised); display:flex; align-items:center; justify-content:center;
  color:var(--accent-primary); margin-bottom:14px; cursor:pointer; box-shadow: inset 2px 2px 6px var(--shadow-dark), inset -2px -2px 6px var(--shadow-light); position:relative; }
.wish-btn { position:absolute; top:10px; right:10px; width:34px; height:34px; border-radius:50%; border:none; background:var(--surface-raised);
  display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text-secondary);
  box-shadow:3px 3px 7px var(--shadow-dark), -3px -3px 7px var(--shadow-light); }
.wish-btn .icon.filled { color:var(--status-danger); }
.product-cat { font-size:11px; color:var(--text-secondary); text-transform:uppercase; letter-spacing:.04em; font-weight:700; margin-bottom:4px; }
.product-name { font-size:15px; font-weight:700; margin:0 0 6px; cursor:pointer; line-height:1.3; }
.product-bottom { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:10px; }
.add-btn { width:38px; height:38px; border-radius:12px; border:none; background:var(--accent-gradient); color:#fff;
  display:flex; align-items:center; justify-content:center; cursor:pointer; box-shadow:3px 3px 8px rgba(108,99,255,.35); flex-shrink:0; }
.add-btn:active { transform:scale(.94); }

/* ---------- SHOP ---------- */
.shop-layout { display:grid; grid-template-columns:250px 1fr; gap:28px; align-items:start; }
@media (max-width:800px){ .shop-layout{ grid-template-columns:1fr; } }
.filter-box { background:var(--surface-card); border-radius:24px; padding:22px; box-shadow:5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light); }
.filter-title { font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--text-secondary); margin:18px 0 12px; }
.filter-title:first-child { margin-top:0; }
.filter-list { display:flex; flex-direction:column; gap:12px; }
.shop-toolbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; gap:12px; flex-wrap:wrap; }
.result-count { font-size:14px; color:var(--text-secondary); }
.sort-select { min-width:170px; }
.pagination { display:flex; justify-content:center; gap:8px; margin-top:32px; }
.page-btn { width:36px; height:36px; border-radius:12px; border:none; background:var(--surface-raised); color:var(--text-secondary); font-weight:700; font-size:14px; cursor:pointer;
  box-shadow:3px 3px 7px var(--shadow-dark), -3px -3px 7px var(--shadow-light); }
.page-btn.active { background:var(--accent-gradient); color:#fff; box-shadow:3px 3px 8px rgba(108,99,255,.35); }

/* ---------- PRODUCT DETAIL ---------- */
.pd-layout { display:grid; grid-template-columns:1fr 1fr; gap:40px; }
@media (max-width:800px){ .pd-layout{ grid-template-columns:1fr; } }
.pd-main-img { aspect-ratio:1/1; border-radius:28px; background:var(--surface-raised); display:flex; align-items:center; justify-content:center;
  color:var(--accent-primary); margin-bottom:14px; box-shadow: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light); }
.pd-thumbs { display:flex; gap:10px; }
.pd-thumb { width:60px; height:60px; border-radius:14px; background:var(--surface-raised); display:flex; align-items:center; justify-content:center;
  color:var(--accent-primary); cursor:pointer; box-shadow:3px 3px 7px var(--shadow-dark), -3px -3px 7px var(--shadow-light); }
.pd-thumb.active { box-shadow:0 0 0 2px var(--accent-primary); }
.pd-cat { font-size:13px; color:var(--accent-text); font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.pd-title { font-size:27px; font-weight:800; margin:8px 0 10px; }
.pd-rating { display:flex; align-items:center; gap:8px; font-size:14px; color:var(--text-secondary); margin-bottom:16px; }
.pd-price { font-size:27px; font-weight:800; margin-bottom:18px; }
.pd-desc { font-size:14px; color:var(--text-secondary); line-height:1.7; margin-bottom:22px; }
.pd-block-label { font-size:13px; font-weight:800; margin-bottom:10px; }
.swatch-row { display:flex; gap:10px; margin-bottom:20px; }
.swatch { width:32px; height:32px; border-radius:50%; cursor:pointer; box-shadow:0 0 0 2px var(--surface-base); border:2px solid transparent; }
.swatch.active { border-color:var(--accent-primary); }
.size-row { display:flex; gap:10px; margin-bottom:22px; flex-wrap:wrap; }
.size-btn { padding:10px 16px; border-radius:12px; border:none; background:var(--surface-raised); color:var(--text-primary); font-weight:700; font-size:14px; cursor:pointer;
  box-shadow:3px 3px 7px var(--shadow-dark), -3px -3px 7px var(--shadow-light); }
.size-btn.active { background:var(--accent-gradient); color:#fff; box-shadow:3px 3px 8px rgba(108,99,255,.35); }
.qty-stepper { display:flex; align-items:center; gap:0; background:var(--surface-raised); border-radius:14px; box-shadow: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light); width:fit-content; }
.qty-stepper button { width:38px; height:42px; border:none; background:transparent; color:var(--text-primary); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.qty-stepper .qty-val { width:36px; text-align:center; font-weight:700; font-size:15px; }
.pd-actions { display:flex; gap:12px; align-items:center; margin-top:24px; flex-wrap:wrap; }
.pd-actions .btn-primary { flex:1; min-width:160px; }
.pd-actions .icon-btn.wished .icon { color: var(--status-danger); }

.mini-tabs { display:flex; gap:6px; background:var(--surface-card); border-radius:999px; padding:4px; width:fit-content; margin:44px auto 22px; }
.mini-tabs button { border:none; background:transparent; padding:10px 20px; border-radius:999px; font-size:14px; font-weight:700; color:var(--text-secondary); cursor:pointer; }
.mini-tabs button.active { background:var(--accent-gradient); color:#fff; }
.tab-panel { display:none; }
.tab-panel.active { display:block; }
.review-item { padding:16px 0; border-bottom:1px solid rgba(163,166,186,.25); }
.review-item:last-child { border-bottom:none; }
.review-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.review-name { font-weight:700; font-size:14px; }

/* ---------- CART ---------- */
.cart-layout { display:grid; grid-template-columns:1.6fr 1fr; gap:28px; align-items:start; }
@media (max-width:800px){ .cart-layout{ grid-template-columns:1fr; } }
.cart-row { display:flex; align-items:center; gap:16px; background:var(--surface-card); border-radius:20px; padding:16px;
  box-shadow:5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light); margin-bottom:14px; }
.cart-row .img { width:64px; height:64px; border-radius:14px; background:var(--surface-raised); display:flex; align-items:center; justify-content:center; color:var(--accent-primary); flex-shrink:0; }
.cart-row .info { flex:1; min-width:0; }
.cart-row .name { font-weight:700; font-size:15px; margin-bottom:3px; }
.cart-row .variant { font-size:12px; color:var(--text-secondary); }
.cart-row .price-col { font-weight:800; font-size:15px; min-width:80px; text-align:right; }
.remove-btn { width:32px; height:32px; border-radius:50%; border:none; background:var(--surface-raised); color:var(--text-secondary); cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.summary-row { display:flex; justify-content:space-between; font-size:14px; color:var(--text-secondary); margin-bottom:12px; }
.summary-row.total { font-size:17px; font-weight:800; color:var(--text-primary); border-top:1px solid rgba(163,166,186,.3); padding-top:14px; margin-top:6px; }
.coupon-row { display:flex; gap:10px; margin-bottom:20px; }
.coupon-row .field { flex:1; }
.empty-state { text-align:center; padding:50px 20px; color:var(--text-secondary); }
.empty-state .ic { color:var(--text-disabled); margin:0 auto 14px; }

/* ---------- CHECKOUT ---------- */
.checkout-layout { display:grid; grid-template-columns:1.5fr 1fr; gap:28px; align-items:start; }
@media (max-width:800px){ .checkout-layout{ grid-template-columns:1fr; } }
.pay-option { display:flex; align-items:center; gap:14px; background:var(--surface-raised); border-radius:16px; padding:14px 16px; cursor:pointer; margin-bottom:12px;
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light); }
.pay-option.active { box-shadow:0 0 0 2px var(--accent-primary), inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light); }
.pay-option .ic { color:var(--text-primary); }
.pay-option .lbl { font-weight:700; font-size:14px; flex:1; }
.mini-cart-item { display:flex; justify-content:space-between; font-size:13px; color:var(--text-secondary); margin-bottom:10px; }
.mini-cart-item b { color:var(--text-primary); }

/* ---------- ACCOUNT ---------- */
.auth-card { max-width:420px; margin:0 auto; background:var(--surface-card); border-radius:32px; padding:36px; box-shadow:8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light); }
.auth-avatar { width:76px; height:76px; border-radius:50%; margin:0 auto 16px; background:var(--surface-raised); display:flex; align-items:center; justify-content:center; color:var(--text-secondary); box-shadow:5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light); }
.auth-title { font-size:23px; font-weight:800; text-align:center; margin:0 0 4px; }
.auth-sub { text-align:center; color:var(--text-secondary); font-size:14px; margin:0 0 24px; }
.auth-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; }
.auth-link { color:var(--accent-text); font-weight:700; font-size:14px; background:none; border:none; cursor:pointer; display:flex; align-items:center; }
.auth-footer { text-align:center; font-size:14px; color:var(--text-secondary); margin-top:18px; }
.auth-footer b { color:var(--accent-text); cursor:pointer; }

.dash-head { display:flex; align-items:center; gap:16px; margin-bottom:28px; }
.dash-avatar { width:64px; height:64px; border-radius:50%; background:var(--surface-raised); display:flex; align-items:center; justify-content:center; color:var(--text-secondary); box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light); }
.order-row { display:flex; align-items:center; justify-content:space-between; background:var(--surface-card); border-radius:18px; padding:16px 18px; margin-bottom:12px; box-shadow:4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light); }
.order-id { font-weight:700; font-size:14px; }
.order-date { font-size:12px; color:var(--text-secondary); }
.status-pill { font-size:12px; font-weight:800; padding:5px 12px; border-radius:999px; }
.status-pill.done { background:rgba(76,217,123,.18); color:var(--success-text); }
.status-pill.transit { background:rgba(108,99,255,.15); color:var(--accent-text); }

/* ---------- ORDER SUCCESS ---------- */
.success-wrap { max-width:480px; margin:60px auto; text-align:center; }
.success-icon { width:90px; height:90px; border-radius:50%; margin:0 auto 22px; background:var(--surface-raised);
  display:flex; align-items:center; justify-content:center; color:var(--status-success);
  box-shadow:6px 6px 16px var(--shadow-dark), -6px -6px 16px var(--shadow-light); }

/* ---------- footer ---------- */
footer.site-footer { margin-top:40px; padding:44px 0 24px; border-top:1px solid rgba(163,166,186,.25); }
.footer-grid { display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr; gap:32px; margin-bottom:32px; }
@media (max-width:760px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
.footer-grid h4 { font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-secondary); margin:0 0 14px; }
.footer-grid ul { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.footer-grid a { font-size:14px; color:var(--text-primary); }
.footer-grid p { font-size:13px; color:var(--text-secondary); line-height:1.6; }
.social-row { display:flex; gap:8px; margin-top:14px; }
.social-row a { width:34px; height:34px; border-radius:50%; background:var(--surface-raised); display:flex; align-items:center; justify-content:center;
  box-shadow:3px 3px 7px var(--shadow-dark), -3px -3px 7px var(--shadow-light); color:var(--text-primary); }
.footer-bottom { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; font-size:13px; color:var(--text-secondary); }
.pay-icons-row { display:inline-flex; align-items:center; gap:8px; }

/* ---------- toast ---------- */
.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); background:var(--text-primary); color:var(--surface-base);
  padding:10px 22px; border-radius:999px; font-size:14px; font-weight:700; opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; z-index:80; white-space:nowrap; }
/* ---------- header search overlay ---------- */
.search-overlay {
  position:absolute; top:100%; left:0; right:0; background:var(--surface-base);
  border-bottom:1px solid rgba(163,166,186,0.25);
  max-height:0; overflow:hidden; opacity:0; transition:max-height .25s ease, opacity .2s ease;
}
.search-overlay.open { max-height:400px; opacity:1; padding-bottom:16px; }
.search-overlay .field { margin-top:14px; }
.search-results { margin-top:10px; display:flex; flex-direction:column; gap:6px; max-height:280px; overflow-y:auto; }
.search-result-item {
  display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px; cursor:pointer;
  background:var(--surface-card);
}
.search-result-item .ic { width:34px; height:34px; border-radius:10px; background:var(--surface-raised); color:var(--accent-primary);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.search-result-item .nm { font-size:13px; font-weight:700; flex:1; }
.search-result-item .pr { font-size:12px; color:var(--text-secondary); font-weight:700; }
.search-empty { font-size:13px; color:var(--text-secondary); padding:8px 4px; }

/* ---------- free shipping progress ---------- */
.ship-progress { margin-bottom:20px; }
.ship-progress-text { font-size:12px; color:var(--text-secondary); margin-bottom:8px; }
.ship-progress-text b { color:var(--accent-text); }
.ship-progress-track { height:8px; border-radius:999px; background:var(--surface-raised);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light); overflow:hidden; }
.ship-progress-fill { height:100%; border-radius:999px; background:var(--accent-gradient); transition:width .3s; }

/* ---------- simple content pages ---------- */
.content-page h1 { font-size:26px; margin:0 0 8px; }
.content-page .lead { color:var(--text-secondary); font-size:14px; margin:0 0 28px; }
.info-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-bottom:8px; }
@media (max-width:700px){ .info-grid{ grid-template-columns:1fr; } }
.faq-item { border-bottom:1px solid rgba(163,166,186,.25); }
.faq-item:last-child { border-bottom:none; }
.faq-q { display:flex; align-items:center; justify-content:space-between; padding:18px 4px; cursor:pointer; font-weight:700; font-size:14px; }
.faq-q .icon { color:var(--text-secondary); transition:transform .2s; }
.faq-item.open .faq-q .icon { transform:rotate(180deg); }
.faq-a { max-height:0; overflow:hidden; transition:max-height .25s ease; font-size:13px; color:var(--text-secondary); line-height:1.7; }
.faq-item.open .faq-a { max-height:200px; padding-bottom:18px; }

/* ---------- address card ---------- */
.addr-card { background:var(--surface-card); border-radius:18px; padding:16px 18px; margin-bottom:12px;
  box-shadow:4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light); display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.addr-card .addr-tag { font-size:11px; font-weight:800; color:var(--accent-text); text-transform:uppercase; margin-bottom:6px; display:inline-block; background:rgba(108,99,255,.12); padding:3px 10px; border-radius:999px; }
.addr-card .addr-text { font-size:13px; color:var(--text-secondary); line-height:1.7; }
.addr-card .addr-actions { display:flex; gap:8px; flex-shrink:0; }
.addr-card .addr-actions button { width:32px; height:32px; border-radius:50%; border:none; background:var(--surface-raised); color:var(--text-secondary); cursor:pointer; display:flex; align-items:center; justify-content:center; }

.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ---------- cart fab (add-to-cart confirmation bar) ---------- */
.cart-fab {
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(30px);
  background:var(--surface-card); border-radius:999px; padding:8px 8px 8px 20px;
  display:flex; align-items:center; gap:16px; z-index:70; max-width:calc(100% - 32px);
  box-shadow:8px 8px 22px var(--shadow-dark), -8px -8px 22px var(--shadow-light);
  opacity:0; pointer-events:none; transition:opacity .25s ease, transform .25s ease;
}
.cart-fab.show { opacity:1; transform:translateX(-50%) translateY(0); pointer-events:auto; }
.cart-fab .fab-icon {
  width:36px; height:36px; border-radius:50%; background:rgba(76,217,123,.18); color:var(--status-success);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.cart-fab .fab-text { font-size:14px; font-weight:700; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cart-fab .fab-sub { font-size:12px; color:var(--text-secondary); font-weight:500; }
.cart-fab .fab-goto {
  background:var(--accent-gradient); color:#fff; border:none; border-radius:999px;
  padding:11px 20px; font-weight:700; font-size:13px; cursor:pointer; white-space:nowrap; flex-shrink:0;
  display:flex; align-items:center; gap:8px; box-shadow:3px 3px 8px rgba(108,99,255,.35);
}
.cart-fab .fab-close {
  width:30px; height:30px; border-radius:50%; border:none; background:transparent; color:var(--text-secondary);
  display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0;
}
@media (max-width:480px){
  .cart-fab .fab-sub { display:none; }
}
.cart-fab { padding-bottom: 8px; }
body { padding-bottom: env(safe-area-inset-bottom); }

/* ================= FULL MOBILE PASS ================= */
@media (max-width:600px){
  .wrap { padding:0 14px; }
  .section { padding:32px 0; }
  .section-head { flex-direction:column; align-items:flex-start; gap:6px; margin-bottom:18px; }
  .section-head h2 { font-size:19px; }
  .panel { padding:20px; border-radius:22px; }
  .hero { padding:22px; border-radius:24px; gap:22px; }
  .hero h1 { font-size:24px; }
  .hero p { font-size:13px; }
  .hero-actions { width:100%; }
  .hero-actions .btn-primary, .hero-actions .btn-secondary { flex:1; }
  .hero-visual { max-height:180px; }
  .newsletter { padding:26px 20px; border-radius:24px; }
  .newsletter-form { flex-direction:column; }
  .promo-item { padding:14px 16px; }
  .cat-card { padding:16px 8px; }
  .cat-card .ic { width:42px; height:42px; }
  .cat-card .lbl { font-size:11px; }
  .product-grid { grid-template-columns:repeat(2,1fr); gap:12px; }
  .product-card { padding:12px; border-radius:18px; }
  .product-name { font-size:13px; }
  .price { font-size:14px; }
  .add-btn { width:32px; height:32px; border-radius:10px; }
  .btn-primary, .btn-secondary { padding:13px 18px; font-size:14px; }
  .pd-title { font-size:21px; }
  .pd-price { font-size:21px; }
  .pd-main-img { border-radius:22px; }
  .mini-tabs { max-width:100%; overflow-x:auto; scrollbar-width:none; margin:30px 0 18px; }
  .mini-tabs::-webkit-scrollbar { display:none; }
  .cart-row { flex-wrap:wrap; padding:14px; gap:10px 14px; position:relative; }
  .cart-row .info { flex:1 1 140px; min-width:140px; padding-right:34px; }
  .cart-row .price-col { flex:0 0 auto; margin-left:66px; text-align:left; }
  .cart-row .remove-btn { position:absolute; top:12px; right:12px; }
  .checkout-layout, .cart-layout, .shop-layout, .pd-layout { gap:18px; }
  .order-row { flex-wrap:wrap; gap:8px; }
  .footer-grid { grid-template-columns:1fr; gap:24px; }
  .footer-bottom { flex-direction:column; align-items:flex-start; text-align:left; }
  .auth-card { padding:24px 20px; border-radius:26px; }
  .dash-head { flex-wrap:wrap; }
  .dash-head .btn-secondary { margin-left:0 !important; width:100%; }
  .cart-fab { left:14px; right:14px; transform:translateY(30px); max-width:none; padding:8px 8px 8px 16px; }
  .cart-fab.show { transform:translateY(0); }
  .cart-fab .fab-goto { padding:10px 14px; font-size:12px; }
}
@media (max-width:360px){
  .brand .word { font-size:15px; }
  nav.main-nav button { padding:8px 12px; font-size:12px; }
  .icon-btn { width:36px; height:36px; }
  .product-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .hero h1 { font-size:21px; }
}
