/* ============================================================
   CartaLogue — Stylesheet (mobile-first)
   ============================================================ */
:root {
  --primary: #155EEF;
  --primary-dark: #0d4fd0;
  --secondary: #0B1F3A;
  --cta: #FF7A00;
  --cta-dark: #e96e00;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --text: #0B1F3A;
  --muted: #64748b;
  --border: #e2e8f0;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #f59e0b;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(11,31,58,.07);
  --shadow-lg: 0 8px 30px rgba(11,31,58,.12);
  --font: 'Poppins', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --header-h: 64px;
  --bottom-nav-h: 62px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); font-size: 15px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: none; transition: all .18s ease; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-cta { background: var(--cta); color: #fff; box-shadow: 0 4px 14px rgba(255,122,0,.32); }
.btn-cta:hover { background: var(--cta-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ============ Toasts ============ */
.toast-stack { position: fixed; top: 74px; right: 14px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; max-width: 90vw; }
.toast {
  background: var(--secondary); color: #fff; padding: 12px 16px; border-radius: 12px;
  font-size: 14px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px;
  animation: toast-in .25s ease; max-width: 340px;
}
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.warning { background: #f59e0b; color: #fff; }
.toast.out { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 500; background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 14px; height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 34px; width: auto; }
.brand-text { font-size: 20px; font-weight: 800; color: var(--secondary); letter-spacing: -.3px; }
.search-bar {
  flex: 1; display: flex; align-items: center; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden;
  max-width: 560px; margin: 0 auto;
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,94,239,.12); }
.search-category {
  border: none; background: transparent; padding: 11px 10px; color: var(--muted);
  font-size: 13px; border-right: 1px solid var(--border); outline: none; max-width: 130px;
}
.search-bar input {
  flex: 1; border: none; background: transparent; padding: 11px 12px; outline: none; min-width: 0;
}
.search-bar button {
  border: none; background: transparent; color: var(--primary); padding: 0 14px; height: 44px;
}
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-icon { position: relative; padding: 8px; border-radius: 10px; color: var(--secondary); display: inline-flex; }
.header-icon:hover { background: var(--bg); color: var(--primary); }
.header-icon .badge {
  position: absolute; top: -2px; right: -4px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.header-icon .badge-cart { background: var(--cta); }
.header-icon .badge-wish { background: var(--red); }
.header-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; margin-left: 6px;
}
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.btn-login { font-size: 14px; padding: 8px 16px; }
.menu-toggle { display: none; border: none; background: none; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 2.5px; background: var(--secondary); margin: 5px 0; border-radius: 2px; }

.main-nav { background: var(--secondary); }
.main-nav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.main-nav-inner::-webkit-scrollbar { display: none; }
.main-nav a {
  color: #cbd5e1; font-size: 14px; font-weight: 500; padding: 11px 14px; white-space: nowrap;
  border-bottom: 3px solid transparent; transition: all .15s;
}
.main-nav a:hover, .main-nav a.active { color: #fff; border-bottom-color: var(--cta); }

/* Slide menu */
.slide-menu {
  position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 84vw;
  background: #fff; z-index: 600; transform: translateX(-105%); transition: transform .25s ease;
  box-shadow: var(--shadow-lg); padding: 20px;
}
.menu-open .slide-menu { transform: none; }
.menu-open .menu-backdrop { display: block; }
.menu-backdrop { display: none; position: fixed; inset: 0; background: rgba(11,31,58,.5); z-index: 550; }
.slide-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.menu-close { border: none; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; color: var(--secondary); }
.slide-menu-nav a { display: block; padding: 13px 6px; color: var(--text); font-weight: 500; border-bottom: 1px solid var(--border); }
.slide-menu-nav a:hover { color: var(--primary); }

/* ============ Hero ============ */
.hero { background: linear-gradient(135deg, #0B1F3A 0%, #123a75 100%); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 34px 16px 40px; align-items: center; }
.hero-content h1 { font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; margin-bottom: 10px; }
.hero-content p { color: #c7d2fe; font-size: 16px; margin-bottom: 22px; max-width: 480px; }
.hero-trust { display: flex; gap: 18px; margin-top: 20px; flex-wrap: wrap; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; color: #93c5fd; font-size: 13px; font-weight: 500; }
.hero-media img { border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); max-height: 380px; object-fit: cover; width: 100%; }
.hero-default { background: rgba(255,255,255,.06); border: 1px dashed rgba(255,255,255,.25); border-radius: 18px; padding: 40px; text-align: center; }
.hero-default h3 { margin: 12px 0 6px; }
.hero-default p { color: #c7d2fe; margin: 0; }

/* ============ Benefits ============ */
.benefits { background: #fff; border-bottom: 1px solid var(--border); }
.benefits-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px 16px; }
.benefit { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 12px; background: var(--bg); }
.benefit-icon {
  width: 40px; height: 40px; border-radius: 11px; background: rgba(21,94,239,.1); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.benefit strong { display: block; font-size: 13.5px; }
.benefit small { color: var(--muted); font-size: 12px; }

/* ============ Home sections ============ */
.home-section { padding: 30px 0 4px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; flex: 1; min-width: 160px; }
.section-desc { color: var(--muted); font-size: 13.5px; flex-basis: 100%; margin-top: -8px; }
.see-all { color: var(--primary); font-size: 13.5px; font-weight: 600; }
.flash-title { color: var(--cta); }
.flash-countdown { display: flex; align-items: center; gap: 3px; font-weight: 700; font-size: 14px; color: var(--red); background: #fef2f2; padding: 6px 12px; border-radius: 10px; }
.flash-countdown span { background: var(--red); color: #fff; padding: 2px 6px; border-radius: 6px; min-width: 24px; text-align: center; }

/* ============ Product grids ============ */
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-bottom: 10px;
}
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease; position: relative;
}
.product-card-media {
  position: relative; display: block; aspect-ratio: 1; background: var(--bg); overflow: hidden;
}
.product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-card-media img { transform: scale(1.04); }
.sale-badge, .stock-badge {
  position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 8px; z-index: 2;
}
.sale-badge { background: var(--cta); color: #fff; }
.stock-badge { background: rgba(245,158,11,.9); color: #fff; top: 38px; }
.stock-badge.soldout { background: rgba(100,116,139,.9); top: 8px; left: auto; right: 8px; }
.product-card-body { padding: 10px 11px 12px; position: relative; }
.wishlist-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.92); color: var(--muted);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: all .15s;
}
.wishlist-btn.active { color: var(--red); }
.wishlist-btn:active { transform: scale(.9); }
.product-card-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13.5px; font-weight: 500; color: var(--text); line-height: 1.35; min-height: 36px;
}
.product-card-name:hover { color: var(--primary); }
.product-card-meta { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 12px; flex-wrap: wrap; }
.rating { display: inline-flex; align-items: center; gap: 3px; color: var(--amber); font-weight: 700; }
.review-count, .sold-count { color: var(--muted); }
.product-card-price { display: flex; align-items: center; gap: 8px; }
.price { font-size: 16px; font-weight: 800; color: var(--text); }
.old-price { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.product-card-delivery { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11.5px; margin-top: 6px; }

/* ============ Categories ============ */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-bottom: 10px; }
.category-tile {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 8px; text-align: center; transition: all .15s;
}
.category-tile:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.category-icon {
  width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 14px; background: rgba(21,94,239,.09);
  color: var(--primary); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.category-icon img { width: 100%; height: 100%; object-fit: cover; }
.category-name { display: block; font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; }

/* ============ Why section ============ */
.why-section { background: #fff; border-top: 1px solid var(--border); margin-top: 24px; padding-bottom: 34px; }
.why-section .section-head { padding-top: 28px; }
.why-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.why-card { padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); position: relative; overflow: hidden; }
.why-num { position: absolute; top: 6px; right: 14px; font-size: 44px; font-weight: 800; color: rgba(21,94,239,.08); }
.why-card h3 { font-size: 16px; margin-bottom: 6px; }
.why-card p { color: var(--muted); font-size: 13.5px; }

/* ============ Newsletter ============ */
.newsletter { background: linear-gradient(135deg, #0B1F3A, #123a75); padding: 36px 0; color: #fff; margin-top: 30px; }
.newsletter-inner { text-align: center; }
.newsletter h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.newsletter p { color: #c7d2fe; margin-bottom: 18px; }
.newsletter-form { display: flex; gap: 8px; max-width: 440px; margin: 0 auto 10px; }
.newsletter-form input {
  flex: 1; padding: 13px 16px; border-radius: 12px; border: none; outline: none; min-width: 0;
}
.newsletter small { color: #93c5fd; }

/* ============ Promo banner ============ */
.promo-card {
  display: block; border-radius: var(--radius); overflow: hidden; position: relative;
  background: var(--secondary); color: #fff; border: 1px solid var(--border);
}
.promo-card img { width: 100%; height: 220px; object-fit: cover; }
.promo-content { padding: 20px; }
.promo-content h2 { font-size: 20px; margin-bottom: 6px; }
.promo-content p { color: #cbd5e1; margin-bottom: 12px; }

/* ============ Footer ============ */
.site-footer { background: var(--secondary); color: #cbd5e1; margin-top: 40px; padding-bottom: 90px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 26px; padding: 36px 16px 26px; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col a { display: block; color: #cbd5e1; font-size: 13.5px; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-about { color: #94a3b8; font-size: 13px; margin: 12px 0; max-width: 300px; }
.china-note { background: rgba(255,255,255,.06); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; max-width: 320px; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px; gap: 10px; flex-wrap: wrap; }
.footer-bottom p { font-size: 12.5px; color: #94a3b8; }
.pay-badges span { background: rgba(255,255,255,.08); padding: 5px 12px; border-radius: 8px; font-weight: 600; }

/* ============ Bottom navigation ============ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-h);
  background: #fff; border-top: 1px solid var(--border); display: flex; z-index: 500;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: #94a3b8; font-size: 10.5px; font-weight: 600; position: relative;
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active svg { color: var(--primary); }
.bottom-badge {
  position: absolute; top: 4px; right: 22%; background: var(--cta); color: #fff;
  font-size: 9px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.mobile-padding { height: var(--bottom-nav-h); }

/* ============ Page header ============ */
.page-head { padding: 26px 0 8px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--primary); }

/* ============ Filters / search toolbar ============ */
.filter-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0; }
.filter-toolbar select, .filter-toolbar input[type=search] {
  padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 11px; background: #fff;
  outline: none; font-size: 13.5px;
}
.filter-toolbar select:focus, .filter-toolbar input:focus { border-color: var(--primary); }
.filter-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: none; }
.filter-panel.open { display: block; }
.filter-group { margin-bottom: 16px; }
.filter-group h4 { font-size: 13.5px; margin-bottom: 8px; }
.filter-group label { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 4px 0; color: var(--text); cursor: pointer; }
.filter-actions { display: flex; gap: 8px; }

/* ============ Product detail ============ */
.pd-layout { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 18px 0 30px; }
.pd-gallery { position: sticky; top: 80px; align-self: start; }
.pd-main-image {
  background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
}
.pd-main-image img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.pd-thumb {
  width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid var(--border);
  cursor: pointer; flex-shrink: 0; background: #fff;
}
.pd-thumb.active { border-color: var(--primary); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.pd-rating-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.pd-price-row { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.pd-price { font-size: 30px; font-weight: 800; }
.pd-old-price { font-size: 18px; color: var(--muted); text-decoration: line-through; }
.pd-discount { background: rgba(255,122,0,.12); color: var(--cta-dark); font-weight: 700; padding: 3px 10px; border-radius: 8px; font-size: 14px; }
.pd-shipping-note {
  display: flex; align-items: flex-start; gap: 10px; background: rgba(21,94,239,.07);
  border: 1px solid rgba(21,94,239,.15); border-radius: 12px; padding: 12px 14px; margin: 16px 0;
}
.pd-shipping-note svg { flex-shrink: 0; color: var(--primary); margin-top: 2px; }
.pd-shipping-note strong { display: block; font-size: 14px; }
.pd-shipping-note small { color: var(--muted); font-size: 12.5px; }
.var-group { margin: 14px 0; }
.var-group > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.var-options { display: flex; flex-wrap: wrap; gap: 8px; }
.var-option {
  padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer;
  font-size: 13.5px; background: #fff; transition: all .15s;
}
.var-option.active { border-color: var(--primary); color: var(--primary); background: rgba(21,94,239,.06); font-weight: 600; }
.var-option.out { opacity: .4; pointer-events: none; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.qty-label { font-weight: 600; font-size: 14px; }
.qty-control { display: inline-flex; align-items: center; border: 1.5px solid var(--border); border-radius: 11px; overflow: hidden; }
.qty-control button { width: 40px; height: 42px; border: none; background: var(--bg); font-size: 19px; color: var(--text); }
.qty-control input { width: 52px; height: 42px; border: none; text-align: center; outline: none; font-weight: 700; }
.pd-cta-row { display: flex; gap: 10px; margin: 18px 0; }
.pd-cta-row .btn { flex: 1; }
.pd-accordion { margin-top: 20px; }
.accordion-item { background: #fff; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.accordion-head {
  padding: 15px 16px; font-weight: 600; font-size: 14.5px; display: flex; justify-content: space-between;
  align-items: center; cursor: pointer; user-select: none;
}
.accordion-head svg { transition: transform .2s; }
.accordion-item.open .accordion-head svg { transform: rotate(180deg); }
.accordion-body { padding: 0 16px 16px; display: none; color: #475569; font-size: 14px; }
.accordion-item.open .accordion-body { display: block; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); }
.spec-table td:first-child { font-weight: 600; color: var(--muted); width: 40%; }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed; bottom: var(--bottom-nav-h); left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--border); padding: 10px 16px; display: none; gap: 10px; z-index: 490;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.sticky-cta .btn { flex: 1; }
.sticky-cta .price { font-size: 18px; font-weight: 800; margin-right: auto; }

/* ============ Cart ============ */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 20px 0 30px; }
.cart-item {
  display: flex; gap: 12px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; margin-bottom: 10px; position: relative;
}
.cart-item img { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; }
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-var { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-item-price { font-weight: 700; font-size: 15px; margin-top: 5px; }
.cart-item-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cart-item-remove { border: none; background: none; color: var(--red); font-size: 12.5px; font-weight: 600; }
.price-changed-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 12px; padding: 6px 10px; border-radius: 8px; margin-top: 6px; }
.cart-summary-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  align-self: start; position: sticky; top: 80px;
}
.cart-summary-card h3 { font-size: 17px; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--text); }
.summary-row.total { font-weight: 800; font-size: 17px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }
.summary-row.discount { color: var(--green); }
.coupon-form { display: flex; gap: 8px; margin: 14px 0; }
.coupon-form input { flex: 1; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px; outline: none; }
.min-checkout-box { background: rgba(21,94,239,.07); border: 1px solid rgba(21,94,239,.15); border-radius: 12px; padding: 14px; margin: 14px 0; }
.min-checkout-box h4 { font-size: 15px; color: var(--primary); margin-bottom: 6px; }
.min-checkout-box p { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.progress-bar { height: 8px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 6px; transition: width .4s ease; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state img { max-width: 220px; margin: 0 auto 20px; }
.empty-state h2 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }

/* ============ Checkout ============ */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 20px 0 30px; }
.checkout-steps { display: flex; gap: 4px; margin: 16px 0; }
.checkout-step {
  flex: 1; text-align: center; font-size: 11px; font-weight: 700; color: #94a3b8;
  padding: 10px 4px; background: #fff; border-radius: 10px; border: 1.5px solid var(--border);
}
.checkout-step.active { color: var(--primary); border-color: var(--primary); background: rgba(21,94,239,.05); }
.checkout-step.done { color: var(--green); border-color: var(--green); background: rgba(22,163,74,.06); }
.checkout-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.checkout-panel h3 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 11px; outline: none;
  transition: border .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--red); font-size: 12.5px; margin-top: 5px; }
.address-card {
  border: 1.5px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px;
  cursor: pointer; transition: all .15s; background: #fff;
}
.address-card.active { border-color: var(--primary); background: rgba(21,94,239,.04); }
.address-card strong { display: block; font-size: 14px; }
.address-card p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.order-summary-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: sticky; top: 80px; }
.order-summary-card h3 { font-size: 17px; margin-bottom: 12px; }
.summary-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.summary-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.summary-item-body { flex: 1; font-size: 12.5px; min-width: 0; }
.summary-item-body strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-item-body small { color: var(--muted); }
.summary-item-price { font-weight: 700; font-size: 13px; }
.checkout-actions { display: flex; gap: 10px; margin-top: 16px; }
.checkout-actions .btn { flex: 1; }
.pay-method { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1.5px solid var(--border); border-radius: 11px; margin-bottom: 8px; cursor: pointer; }
.pay-method.active { border-color: var(--primary); background: rgba(21,94,239,.04); }
.pay-method input { accent-color: var(--primary); }
.pay-method img { height: 26px; width: auto; }

/* ============ Orders ============ */
.order-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.order-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.order-number { font-weight: 800; font-size: 15px; }
.order-date { color: var(--muted); font-size: 12.5px; }
.status-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 8px; }
.status-order_placed, .status-processing { background: rgba(21,94,239,.1); color: var(--primary); }
.status-payment_confirmed, .status-supplier_order_placed, .status-supplier_confirmed, .status-preparing_shipment { background: rgba(21,94,239,.1); color: var(--primary); }
.status-shipped_from_china, .status-in_transit, .status-arrived_in_nigeria, .status-out_for_delivery { background: rgba(245,158,11,.12); color: #b45309; }
.status-delivered { background: rgba(22,163,74,.12); color: var(--green); }
.status-cancelled { background: rgba(220,38,38,.1); color: var(--red); }
.status-refund_requested, .status-refunded { background: rgba(139,92,246,.12); color: #7c3aed; }
.order-items-preview { display: flex; gap: 8px; }
.order-items-preview img { width: 52px; height: 52px; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); }
.order-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.order-total { font-weight: 800; }
.order-card-foot .btn { font-size: 13px; }

/* Tracking timeline */
.timeline { position: relative; padding-left: 26px; margin: 20px 0; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item::before {
  content: ''; position: absolute; left: -24px; top: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; border: 2px solid var(--border);
}
.timeline-item.done::before { background: var(--green); border-color: var(--green); }
.timeline-item.current::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px rgba(21,94,239,.18); }
.timeline-item h4 { font-size: 14px; font-weight: 700; color: var(--muted); }
.timeline-item.done h4, .timeline-item.current h4 { color: var(--text); }
.timeline-item p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ============ Account ============ */
.account-layout { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 20px 0 30px; }
.account-sidebar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; align-self: start; }
.account-user { padding: 18px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #0B1F3A, #123a75); color: #fff; }
.account-avatar { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; overflow: hidden; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-user strong { display: block; font-size: 15px; }
.account-user small { color: #c7d2fe; font-size: 12px; }
.account-nav a { display: flex; align-items: center; gap: 10px; padding: 13px 18px; color: var(--text); font-size: 14px; border-bottom: 1px solid var(--border); }
.account-nav a:hover, .account-nav a.active { background: rgba(21,94,239,.06); color: var(--primary); }
.account-nav a svg { width: 18px; height: 18px; color: var(--muted); }
.account-nav a.active svg { color: var(--primary); }
.dash-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.dash-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.dash-card h3 { font-size: 24px; font-weight: 800; }
.dash-card p { font-size: 12.5px; color: var(--muted); }
.dash-card a { font-size: 12.5px; font-weight: 600; }

/* ============ Auth pages ============ */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 30px 24px; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; margin-bottom: 18px; }
.auth-card h1 { font-size: 22px; text-align: center; font-weight: 800; margin-bottom: 6px; }
.auth-card > p.sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 12px; border-radius: 12px; border: 1.5px solid var(--border); background: #fff;
  font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 16px;
}
.google-btn:hover { border-color: #4285F4; box-shadow: var(--shadow); }
.google-btn svg { width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-foot { text-align: center; font-size: 13.5px; margin-top: 18px; color: var(--muted); }
.verify-box { text-align: center; padding: 20px 0; }
.verify-box svg { width: 70px; height: 70px; color: var(--green); margin-bottom: 14px; }

/* ============ Support / AI chat ============ */
.support-layout { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 20px 0 30px; }
.chat-window { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; height: 560px; }
.chat-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #0B1F3A, #123a75); color: #fff; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
.chat-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.chat-head strong { display: block; font-size: 15px; }
.chat-head small { color: #c7d2fe; font-size: 12px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-msg.system { align-self: center; background: transparent; color: var(--muted); font-size: 12px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input textarea { flex: 1; resize: none; border: 1.5px solid var(--border); border-radius: 11px; padding: 10px 12px; outline: none; min-height: 44px; max-height: 110px; }
.chat-input button { padding: 0 20px; }
.typing-indicator { display: inline-flex; gap: 4px; padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; border-bottom-left-radius: 4px; align-self: flex-start; }
.typing-indicator span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.suggest-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; }
.suggest-chip { font-size: 12.5px; padding: 7px 13px; border-radius: 20px; border: 1.5px solid var(--border); background: #fff; color: var(--text); }
.suggest-chip:hover { border-color: var(--primary); color: var(--primary); }
.ticket-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; margin-bottom: 10px; }
.ticket-card h4 { font-size: 14.5px; }
.ticket-card p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.ticket-msg { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.ticket-msg .sender { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.ticket-msg.admin-msg .sender { color: var(--green); }

/* ============ Admin-style tables ============ */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; padding: 12px 14px; background: var(--bg); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(21,94,239,.03); }

/* ============ Pagination ============ */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 24px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1.5px solid var(--border); background: #fff; font-size: 14px; font-weight: 600; color: var(--text);
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============ Misc ============ */
.badge-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }
.dot-amber { background: var(--amber); }
.dot-blue { background: var(--primary); }
.help-text { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 8px; }
.badge.blue { background: rgba(21,94,239,.1); color: var(--primary); }
.badge.orange { background: rgba(255,122,0,.12); color: var(--cta-dark); }
.badge.green { background: rgba(22,163,74,.12); color: var(--green); }
.badge.red { background: rgba(220,38,38,.1); color: var(--red); }
.badge.navy { background: rgba(11,31,58,.1); color: var(--secondary); }

/* Cookie banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--secondary); color: #fff; padding: 16px; z-index: 700; display: flex; flex-direction: column; gap: 12px; align-items: center; box-shadow: 0 -4px 20px rgba(0,0,0,.2); }
.cookie-banner p { font-size: 13px; text-align: center; }
.cookie-banner a { color: #93c5fd; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; }

/* Install prompt */
.install-prompt { position: fixed; bottom: calc(var(--bottom-nav-h) + 10px); left: 12px; right: 12px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px; display: flex; gap: 12px; align-items: center; z-index: 690; border: 1px solid var(--border); }
.install-prompt[hidden] { display: none; }
.install-icon img { width: 46px; height: 46px; border-radius: 11px; }
.install-prompt strong { font-size: 14.5px; display: block; }
.install-prompt p { font-size: 12.5px; color: var(--muted); margin: 3px 0 8px; }
.install-actions { display: flex; gap: 8px; }

/* Offline notice */
.offline-notice { display: none; position: fixed; top: 0; left: 0; right: 0; background: var(--secondary); color: #fff; text-align: center; font-size: 13px; padding: 7px; z-index: 900; }
body.offline .offline-notice { display: block; }
body.offline .site-header { top: 32px; }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* FAQ accordion */
.faq-list { max-width: 760px; margin: 0 auto; }

/* CMS content */
.cms-content { max-width: 820px; margin: 0 auto; padding: 20px 0 40px; }
.cms-content h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.cms-content .updated { color: var(--muted); font-size: 12.5px; margin-bottom: 20px; }
.cms-content .content-body { font-size: 15px; line-height: 1.75; color: #334155; }
.cms-content .content-body h2 { font-size: 21px; margin: 26px 0 10px; color: var(--text); }
.cms-content .content-body h3 { font-size: 17px; margin: 20px 0 8px; color: var(--text); }
.cms-content .content-body p { margin: 12px 0; }
.cms-content .content-body ul, .cms-content .content-body ol { margin: 12px 0 12px 22px; }
.cms-content .content-body li { margin: 5px 0; }
.cms-content .content-body a { color: var(--primary); text-decoration: underline; }
.cms-content .content-body blockquote { border-left: 4px solid var(--primary); padding: 10px 16px; background: rgba(21,94,239,.05); border-radius: 0 10px 10px 0; margin: 14px 0; }

/* 404 */
.error-page { text-align: center; padding: 70px 20px; }
.error-page .code { font-size: 110px; font-weight: 900; color: rgba(21,94,239,.15); line-height: 1; letter-spacing: -4px; }
.error-page h1 { font-size: 26px; margin: 14px 0 8px; }
.error-page p { color: var(--muted); margin-bottom: 24px; }
.error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Review */
.review-item { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(21,94,239,.1); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.review-head strong { font-size: 13.5px; }
.review-head small { color: var(--muted); font-size: 12px; display: block; }
.review-stars { color: var(--amber); font-size: 13px; }
.verified-badge { background: rgba(22,163,74,.1); color: var(--green); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.review-text { font-size: 13.5px; color: #475569; }

/* Star rating input */
.star-input { display: flex; gap: 4px; font-size: 28px; }
.star-input span { cursor: pointer; color: var(--border); transition: color .15s; }
.star-input span.active, .star-input span:hover { color: var(--amber); }

/* Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(11,31,58,.5); z-index: 800; display: none; }
.sheet { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-radius: 20px 20px 0 0; z-index: 810; transform: translateY(100%); transition: transform .25s ease; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 82vh; overflow-y: auto; }
.sheet.open { transform: none; }
.sheet-backdrop.open { display: block; }
.sheet-handle { width: 44px; height: 5px; border-radius: 4px; background: var(--border); margin: 0 auto 16px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11,31,58,.6); z-index: 800; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; max-width: 500px; width: 100%; padding: 24px; max-height: 86vh; overflow-y: auto; }

/* ============ Media queries ============ */
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .benefits-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-cards { grid-template-columns: repeat(4, 1fr); }
  .category-grid { grid-template-columns: repeat(6, 1fr); }
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .hero-content h1 { font-size: 40px; }
  .pd-layout { grid-template-columns: 1fr 1fr; gap: 30px; }
  .cart-layout { grid-template-columns: 2fr 1fr; }
  .account-layout { grid-template-columns: 280px 1fr; }
  .support-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 2fr 1fr; }
  .sticky-cta { display: none; }
  .site-footer { padding-bottom: 40px; }
  .cookie-banner { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .category-grid { grid-template-columns: repeat(8, 1fr); }
  .benefits-grid { grid-template-columns: repeat(5, 1fr); }
  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(6, 1fr); }
  .bottom-nav { display: none; }
  .mobile-padding { display: none; }
  .menu-toggle { display: none; }
}
@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 899px) {
  .menu-toggle { display: block; }
  .header-avatar, .btn-login { display: none; }
  .search-category { display: none; }
  .header-actions { gap: 2px; }
  .header-actions .header-icon { padding: 7px; }
  .main-nav { display: none; }
  .sticky-cta { display: flex; }
}
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .product-card-name { font-size: 12.5px; }
  .price { font-size: 15px; }
  .form-row { grid-template-columns: 1fr; }
  .dash-cards { grid-template-columns: repeat(2, 1fr); }
  .search-bar input { padding: 11px 8px; }
}
