/* ============================================================
   assets/css/main.css  –  Storefront styles
   All colors/sizes reference CSS variables from :root
   ============================================================ */

/* Verdana is a system font – no external import needed */

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: var(--font-family);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Headings – Verdana bold ─────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.25;
}

/* ── CSS Variables (defaults – overridden by inline <style> from DB) ── */
:root {
  --primary:         #6C63FF;
  --secondary:       #FF6584;
  --accent:          #43C59E;
  --bg:              #FFFFFF;
  --bg-alt:          #F8F8FC;
  --text:            #1A1A2E;
  --text-muted:      #6B7280;
  --border:          #E5E7EB;
  --font-family:     Verdana, Geneva, Tahoma, sans-serif;
  --heading-font:    Verdana, Geneva, Tahoma, sans-serif;
  --radius:          8px;
  --radius-lg:       16px;
  --radius-full:     9999px;
  --card-shadow:     0 4px 24px rgba(0,0,0,0.08);
  --header-h:        70px;
  --transition:      0.3s ease;
  --primary-light:   #6C63FF22;
  --success:         #10B981;
  --warning:         #F59E0B;
  --danger:          #EF4444;
  --info:            #3B82F6;
}

/* ── Utility ─────────────────────────────────────────────── */
.container   { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm{ max-width: 860px;  margin: 0 auto; padding: 0 20px; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.grid-2      { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3      { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4      { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-weight: 600; font-size: .9rem;
  cursor: pointer; border: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: color-mix(in srgb, var(--primary) 85%, #000); transform: translateY(-1px); box-shadow: 0 6px 20px var(--primary-light); }
.btn-secondary{ background: var(--secondary); color: #fff; }
.btn-secondary:hover{ background: color-mix(in srgb, var(--secondary) 85%, #000); transform: translateY(-1px); }
.btn-outline  { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover{ background: var(--primary); color: #fff; }
.btn-ghost    { background: transparent; color: var(--text-muted); }
.btn-ghost:hover{ background: var(--bg-alt); color: var(--text); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover{ background: color-mix(in srgb, var(--danger) 85%, #000); }
.btn-sm       { padding: 7px 16px; font-size: .82rem; }
.btn-lg       { padding: 15px 36px; font-size: 1.05rem; }
.btn-block    { width: 100%; }
.btn-icon     { padding: 10px; border-radius: var(--radius); }
.btn .spinner { width:18px; height:18px; border:2px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; animation: spin .65s linear infinite; }

/* ── Announcement bar ────────────────────────────────────── */
.announcement-bar {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 8px 20px;
  font-size: .85rem;
  font-weight: 500;
  position: relative;
}
.announcement-bar .close-ann {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; cursor: pointer; font-size: 1.1rem;
  opacity: .7; transition: opacity var(--transition);
}
.announcement-bar .close-ann:hover { opacity: 1; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1.5px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.10); }
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: 100%;
  justify-content: space-between;
}
/* Logo */
.header-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.header-logo img { height: 40px; width: auto; display: block; }
.header-logo .logo-text,
.header-logo span {
  font-size: 1.4rem; font-weight: 800;
  color: var(--primary); letter-spacing: -.5px;
  white-space: nowrap;
}

/* Search bar */
.header-search {
  flex: 1; max-width: 460px; position: relative; margin-left: auto;
}
.header-search input {
  width: 100%; padding: 10px 44px 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-size: .9rem;
}
.header-search input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.header-search .search-btn,
.header-search .search-icon-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); transition: color var(--transition);
}
.header-search .search-btn:hover,
.header-search .search-icon-btn:hover { color: var(--primary); }
.search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  max-height: 360px; overflow-y: auto;
  z-index: 999;
  animation: slideDown .2s ease;
}
.search-dropdown-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; cursor: pointer;
  transition: background var(--transition);
}
.search-dropdown-item:hover { background: var(--bg-alt); }
.search-dropdown-item img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius); }
.search-dropdown-item .name { font-weight: 500; font-size: .9rem; }
.search-dropdown-item .price { font-size: .83rem; color: var(--primary); font-weight: 600; }

/* Nav */
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.header-nav li { position: relative; }
.header-nav a {
  padding: 8px 13px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500;
  transition: all var(--transition);
}
.header-nav a:hover, .header-nav a.active { background: var(--bg-alt); color: var(--primary); }

/* Nav dropdown */
.header-nav .dropdown {
  display: none; position: absolute; top: calc(100% + 4px); left: 0;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--card-shadow); border: 1px solid var(--border);
  min-width: 180px; flex-direction: column; gap: 0; padding: 6px 0;
  z-index: 1001;
}
.header-nav .has-dropdown:hover .dropdown { display: flex; }
.header-nav .dropdown li { width: 100%; }
.header-nav .dropdown a { display: block; padding: 9px 16px; border-radius: 0; white-space: nowrap; }
.header-nav .dropdown a:hover { background: var(--bg-alt); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; }
.action-btn {
  position: relative; padding: 8px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.2rem;
  transition: background var(--transition), color var(--transition);
  background: none; border: none; color: var(--text);
}
.action-btn:hover { background: var(--bg-alt); color: var(--primary); }
.cart-badge {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px;
  background: var(--secondary); color: #fff;
  border-radius: 50%; font-size: .67rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0); transition: transform .2s ease;
}
.cart-badge.show { transform: scale(1); }

/* ── Cart popup ───────────────────────────────────────────── */
/* Wrapper sits relative to .action-btn so the popup drops below it */
.cart-btn { position: relative; }

.cart-popup {
  display: none;
  position: absolute;
  top: calc(100% + 14px); right: -8px;
  width: 360px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,.14);
  z-index: 2000;
  overflow: hidden;
  animation: slideDown .18s ease;
}
.cart-popup.open { display: flex; flex-direction: column; }

/* arrow caret */
.cart-popup::before {
  content: '';
  position: absolute; top: -8px; right: 22px;
  border: 8px solid transparent;
  border-bottom-color: var(--border);
  border-top: none;
}
.cart-popup::after {
  content: '';
  position: absolute; top: -7px; right: 22px;
  border: 8px solid transparent;
  border-bottom-color: #fff;
  border-top: none;
}

.cart-popup-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.cart-popup-title { font-weight: 700; font-size: 1rem; }
.cart-popup-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px; border-radius: var(--radius);
  transition: background var(--transition);
  display: flex; align-items: center;
}
.cart-popup-close:hover { background: var(--bg-alt); color: var(--text); }

.cart-popup-body {
  max-height: 340px;
  overflow-y: auto;
  padding: 10px 0;
}
.cart-popup-body::-webkit-scrollbar { width: 4px; }
.cart-popup-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.cart-popup-loading,
.cart-popup-empty {
  text-align: center; padding: 36px 20px;
  color: var(--text-muted); font-size: .9rem;
}

/* Each line item */
.cp-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 18px;
  transition: background var(--transition);
}
.cp-item:hover { background: var(--bg-alt); }
.cp-item-img {
  width: 54px; height: 54px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.cp-item-img-placeholder {
  width: 54px; height: 54px; border-radius: var(--radius);
  background: var(--bg-alt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .7rem; text-align: center;
}
.cp-item-info { min-width: 0; }
.cp-item-name {
  font-size: .87rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
  text-decoration: none; display: block;
}
.cp-item-name:hover { color: var(--primary); }
.cp-item-meta {
  font-size: .78rem; color: var(--text-muted); margin-top: 2px;
}
.cp-item-price {
  font-weight: 700; font-size: .88rem; color: var(--primary);
  white-space: nowrap;
}
.cp-item-actions {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.cp-remove-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 3px; border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  display: flex; align-items: center;
}
.cp-remove-btn:hover { background: #fee2e2; color: #dc2626; }

.cart-popup-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.cp-subtotal-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.cp-subtotal-label { font-size: .88rem; color: var(--text-muted); }
.cp-subtotal-value { font-weight: 800; font-size: 1.05rem; color: var(--text); }
.cp-footer-btns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.cp-btn-view {
  padding: 9px; border-radius: var(--radius);
  border: 1.5px solid var(--primary); color: var(--primary);
  background: #fff; font-size: .85rem; font-weight: 600;
  text-align: center; cursor: pointer; text-decoration: none;
  transition: background var(--transition);
}
.cp-btn-view:hover { background: var(--primary-light); }
.cp-btn-checkout {
  padding: 9px; border-radius: var(--radius);
  background: var(--primary); color: #fff;
  border: none; font-size: .85rem; font-weight: 600;
  text-align: center; cursor: pointer; text-decoration: none;
  transition: background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.cp-btn-checkout:hover { background: color-mix(in srgb, var(--primary) 85%, #000); }

@media (max-width: 480px) {
  .cart-popup { width: calc(100vw - 24px); right: -12px; }
}

/* ── Mobile hamburger toggle ─────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px 6px;
  border: none;
  background: none;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.menu-toggle:hover { background: var(--bg-alt); }
.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  transform-origin: center;
}
/* Hamburger → X animation */
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { transform: scaleX(0); opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu overlay (backdrop) ─────────────────────── */
.mobile-menu-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.50);
  z-index: 1099;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .3s ease;
}
.mobile-menu-overlay.open {
  display: block;
  opacity: 1;
}

/* ── Mobile drawer ───────────────────────────────────────── */
.mobile-menu {
  display: flex;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 88vw);
  background: #fff;
  z-index: 1100;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.18);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .32s cubic-bezier(.4,0,.2,1), visibility .32s;
  overflow: hidden;
}
.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

/* Drawer header */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1.5px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}
.mobile-menu-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -.5px;
}
.mobile-menu-logo img { height: 32px; width: auto; }
.mobile-menu-close {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: none; background: var(--bg-alt);
  border-radius: var(--radius);
  cursor: pointer; color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.mobile-menu-close:hover { background: var(--primary); color: #fff; }

/* Drawer scrollable body */
.mobile-menu-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 0 32px;
  overscroll-behavior: contain;
}
.mobile-menu-body::-webkit-scrollbar { width: 4px; }
.mobile-menu-body::-webkit-scrollbar-track { background: transparent; }
.mobile-menu-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Section grouping */
.mobile-menu-section {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-section:last-child { border-bottom: none; }

.mobile-menu-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 20px 6px;
}

.mobile-menu-section ul { list-style: none; padding: 0; margin: 0; }

/* Nav link rows */
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  font-size: .97rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
  border-radius: 0;
}
.mobile-nav-link svg { flex-shrink: 0; color: var(--text-muted); transition: color var(--transition); }
.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background: var(--bg-alt);
  color: var(--primary);
  padding-left: 26px;
}
.mobile-nav-link:hover svg,
.mobile-nav-link:focus-visible svg { color: var(--primary); }

/* Active state */
.mobile-nav-link.active {
  color: var(--primary);
  background: var(--primary-light, #6C63FF11);
  font-weight: 700;
  border-left: 3px solid var(--primary);
  padding-left: 17px;
}
.mobile-nav-link.active svg { color: var(--primary); }

/* Category links (slightly smaller) */
.mobile-nav-cat {
  font-size: .92rem;
  font-weight: 400;
  color: var(--text-muted);
  padding-top: 10px;
  padding-bottom: 10px;
}
.mobile-nav-cat:hover { color: var(--primary); font-weight: 500; }

/* Logout link colour */
.mobile-nav-logout { color: var(--danger); }
.mobile-nav-logout svg { color: var(--danger); }
.mobile-nav-logout:hover { background: #FEF2F2; color: var(--danger); padding-left: 26px; }

/* Register button accent */
.mobile-nav-register { color: var(--accent); }
.mobile-nav-register svg { color: var(--accent); }
.mobile-nav-register:hover { background: #F0FDF9; color: var(--accent); }

/* ── Hero section ────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: 560px;
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.45);
  transition: transform 8s ease;
}
.hero:hover .hero-bg { transform: scale(1.04); }
.hero-content {
  position: relative; z-index: 2;
  max-width: 600px;
  animation: fadeInUp .8s ease both;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800; color: #fff; line-height: 1.15;
  margin-bottom: 16px;
}
.hero-content p {
  font-size: 1.1rem; color: rgba(255,255,255,.88);
  margin-bottom: 32px; max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero-primary  { background: #fff; color: var(--primary); font-weight: 700; padding: 14px 32px; }
.btn-hero-primary:hover { background: var(--bg-alt); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.btn-hero-outline  { border: 2px solid rgba(255,255,255,.6); color: #fff; padding: 12px 32px; }
.btn-hero-outline:hover{ border-color: #fff; background: rgba(255,255,255,.1); }

/* ── Home hero ─────────────────────────────────────────────── */
.hero-section { width: 100%; overflow: hidden; }
.hero-slide {
  position: relative;
  min-height: 560px;
  display: flex; align-items: stretch;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  background-size: cover; background-position: center;
  overflow: hidden;
}
.hero-slide::before {
  content: ''; position: absolute; inset: 0;
  background: transparent;
}
.hero-slide.hero-has-image::before {
  background: rgba(0,0,0,.42);
}

/* Two-column inner layout */
.hero-inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 80px 0;
  width: 100%;
  min-width: 0;
}

/* Text column */
.hero-text-col { display: flex; flex-direction: column; align-items: flex-start; }
.hero-title {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700; color: #fff; line-height: 1.18;
  margin-bottom: 16px;
}
.hero-sub {
  display: inline-block;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.15);
  padding: 4px 12px; border-radius: var(--radius-full);
  margin-bottom: 14px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-text {
  font-size: 1rem; color: rgba(255,255,255,.85);
  margin-bottom: 32px; max-width: 440px; line-height: 1.75;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* Hero CTA buttons */
.btn-hero {
  background: #fff; color: var(--primary);
  font-weight: 700; padding: 13px 32px;
  border-radius: var(--radius-full);
  font-size: .95rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transition: transform var(--transition), box-shadow var(--transition);
  display: inline-block;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.26); color: var(--primary); }
.btn-hero-outline {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,.7);
  color: #fff; font-weight: 600; font-size: .95rem;
  transition: background var(--transition), border-color var(--transition);
}
.btn-hero-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; }

/* Right decorative column */
.hero-visual {
  position: relative;
  height: 340px;
  display: flex; align-items: center; justify-content: center;
}
.hero-circle {
  position: absolute;
  border-radius: 50%;
  opacity: .22;
}
.hero-circle-1 {
  width: 300px; height: 300px;
  background: #fff;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.hero-circle-2 {
  width: 220px; height: 220px;
  background: rgba(255,255,255,.6);
  top: 30%; left: 58%; transform: translate(-50%,-50%);
  opacity: .18;
}
.hero-circle-3 {
  width: 140px; height: 140px;
  background: rgba(255,255,255,.9);
  top: 62%; left: 40%; transform: translate(-50%,-50%);
  opacity: .14;
}
.hero-badge {
  position: relative; z-index: 2;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.5);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 24px 36px;
  text-align: center;
  color: #fff;
}
.hero-badge-pct { display: block; font-size: 2.8rem; font-weight: 800; line-height: 1; }
.hero-badge-lbl { display: block; font-size: .85rem; font-weight: 600; letter-spacing: .06em; opacity: .85; margin-top: 4px; }

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .hero-inner     { grid-template-columns: 1fr; gap: 0; padding: 52px 0 36px; }
  .hero-visual    { display: none; }
  .hero-title     { font-size: clamp(1.5rem, 5.5vw, 2.2rem); }
  .hero-text      { font-size: .92rem; margin-bottom: 24px; }
  .hero-slide     { min-height: 380px; }
  /* Center all hero text content on mobile */
  .hero-text-col  { align-items: center; text-align: center; }
  .hero-sub       { text-align: center; }
  .hero-text      { text-align: center; max-width: 100%; }
  .hero-actions   { justify-content: center; width: 100%; }
}
@media (max-width: 480px) {
  .hero-inner     { padding: 36px 0 28px; }
  .hero-title     { font-size: clamp(1.3rem, 6vw, 1.8rem); }
  .hero-sub       { font-size: .75rem; letter-spacing: .07em; }
  .hero-text      { font-size: .87rem; margin-bottom: 20px; }
  .hero-slide     { min-height: 320px; }
  .hero-actions   { flex-direction: column; align-items: stretch; gap: 10px; }
  .btn-hero, .btn-hero-outline { width: 100%; text-align: center; padding: 13px 20px; }
}

/* ── Feature strip ─────────────────────────────────────────── */
.feature-strip {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  min-width: 0;
}
.feature-item {
  display: flex; align-items: center; gap: 14px;
}
.feature-item > span { font-size: 2rem; flex-shrink: 0; }
.feature-item strong { display: block; font-size: .95rem; font-weight: 700; }
.feature-item p { margin: 2px 0 0; font-size: .83rem; color: var(--text-muted); }

/* ── Section titles ──────────────────────────────────────── */
.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 32px;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.section-header .section-title { margin-bottom: 0; }
.section-header   a { flex-shrink: 0; }
.section-divider  { width: 60px; height: 4px; background: var(--primary); border-radius: 2px; margin: 12px auto 0; }
section.py { padding: 72px 0; }
section.py-sm { padding: 48px 0; }
.section-bg { background: var(--bg-alt); }
.section { padding: 64px 0; }

/* ── Product card ────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.14);
}
.product-card-img {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
}
.product-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.06); }
.product-card-badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.badge-sale  { background: var(--secondary); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); }
.badge-feat  { background: var(--primary);   color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); }
.badge-new   { background: var(--accent);    color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); }
.product-card-actions {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; transform: translateX(10px);
  transition: all var(--transition);
}
.product-card:hover .product-card-actions { opacity: 1; transform: translateX(0); }
.card-action-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; font-size: 1rem;
  color: var(--text-muted); transition: all var(--transition);
}
.card-action-btn:hover { background: var(--primary); color: #fff; transform: scale(1.1); }
.card-action-btn.in-wishlist { color: var(--secondary); }
.product-card-body { padding: 16px; }
.product-card-cat  { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 500; }
.product-card-name {
  font-weight: 600; font-size: .95rem; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.product-card-name:hover { color: var(--primary); }
.product-card-price { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.price-current { font-weight: 700; font-size: 1.05rem; color: var(--primary); }
.price-original{ font-size: .85rem; color: var(--text-muted); text-decoration: line-through; }
.product-card-footer {
  padding: 0 16px 16px;
}
.add-to-cart-btn {
  width: 100%; padding: 10px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius);
  font-weight: 600; cursor: pointer; font-size: .88rem;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.add-to-cart-btn:hover { background: color-mix(in srgb, var(--primary) 85%, #000); transform: translateY(-1px); }
.add-to-cart-btn.added { background: var(--accent); }
.product-card-rating {
  display: flex; align-items: center; gap: 4px;
  margin-top: 6px; font-size: .8rem; color: var(--text-muted);
}
.stars { color: #F59E0B; letter-spacing: 1px; }
.star { opacity: .3; }
.star.filled, .star.half { opacity: 1; }

/* Product card class-name aliases (template vs CSS reconciliation) */
.product-card-img-wrap {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
}
.product-card-img-wrap img,
img.product-card-img {
  width: 100%; height: 100%; object-fit: contain;
  display: block;
  transition: transform .5s ease;
}
.product-card:hover .product-card-img-wrap img { transform: scale(1.06); }
/* Badge aliases */
.badge-featured { background: var(--primary);   color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); position: absolute; top: 12px; left: 12px; }
.badge-sale     { background: var(--secondary);  color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); position: absolute; top: 12px; left: 12px; }
.badge-oos      { background: #6b7280;            color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); position: absolute; top: 12px; right: 12px; }
/* When sale + oos overlap: push oos down */
.badge-sale ~ .badge-oos, .badge-featured ~ .badge-oos { top: 36px; }
/* Price aliases */
.price-sale, .price { font-weight: 700; font-size: 1.05rem; color: var(--primary); }
/* Action button aliases */
.wishlist-toggle, .quick-view-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; font-size: 1rem;
  color: var(--text-muted); transition: all var(--transition);
}
.wishlist-toggle:hover, .quick-view-btn:hover { background: var(--primary); color: #fff; transform: scale(1.1); }
.wishlist-toggle.in-wishlist { color: var(--secondary); }

/* ── Category grid ───────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.category-card {
  border-radius: var(--radius-lg);
  overflow: hidden; position: relative;
  aspect-ratio: 4 / 3;
  cursor: pointer; text-decoration: none;
  display: block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transition: transform var(--transition), box-shadow var(--transition);
}
.category-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.18); }
.category-card-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transition: filter var(--transition);
}
.category-card:hover .category-card-bg { filter: brightness(.8); }
.category-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .55; z-index: 1;
}
.category-card-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px;
  color: #fff; font-weight: 700; text-align: center; padding: 16px;
  z-index: 2;
}
.category-card-label .icon  { font-size: 1.8rem; }
.category-card-label .name  { font-size: 1rem; font-weight: 700; }
.category-card-label .count { font-size: .78rem; opacity: .85; font-weight: 400; }

/* ── Testimonials ────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.testimonial-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 28px; position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute; top: -8px; left: 24px;
  font-size: 5rem; color: var(--primary); opacity: .15;
  font-family: Georgia, serif; line-height: 1;
}
.testimonial-body { font-size: .93rem; color: var(--text-muted); margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--primary);
}
.testimonial-name  { font-weight: 600; font-size: .9rem; }
.testimonial-role  { font-size: .78rem; color: var(--text-muted); }

/* ── Product listing sidebar ─────────────────────────────── */
.shop-container { padding-top: 24px; padding-bottom: 48px; }
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; margin-top: 16px; }
.shop-sidebar { position: sticky; top: calc(var(--header-h) + 20px); }
.sidebar-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow); padding: 20px; margin-bottom: 16px;
}
.sidebar-title {
  font-weight: 700; font-size: .95rem; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
  color: var(--text-dark);
}
.filter-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 4px; cursor: pointer; border-radius: var(--radius);
  transition: background var(--transition);
}
.filter-item:hover { background: var(--bg-alt); }
.filter-item input[type=radio] { accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.filter-item span { font-size: .88rem; color: var(--text); cursor: pointer; }
.price-range-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-range-inputs .form-control {
  padding: 8px 10px; font-size: .85rem;
}

/* Shop toolbar */
.shop-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
  background: #fff; border-radius: var(--radius-lg);
  padding: 12px 16px; box-shadow: var(--card-shadow);
}
.shop-toolbar .result-count { font-size: .88rem; color: var(--text-muted); font-weight: 500; }
.sort-bar { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.sort-bar label { color: var(--text-muted); }
.sort-bar select {
  padding: 7px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: .88rem; background: #fff;
  cursor: pointer; outline: none;
}
.sort-bar select:focus { border-color: var(--primary); }
.filter-toggle-mobile { display: none; }
.sort-select {
  padding: 8px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: .88rem; background: #fff;
  cursor: pointer;
}
.sort-select:focus { outline: none; border-color: var(--primary); }

/* ── Product detail ──────────────────────────────────────── */
.product-detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-gallery { position: sticky; top: calc(var(--header-h) + 20px); }
.gallery-main {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-alt); cursor: zoom-in;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.gallery-main:hover img { transform: scale(1.04); }
.gallery-thumbs {
  display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px;
}
.gallery-thumb {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: var(--radius); overflow: hidden;
  border: 2px solid transparent; cursor: pointer;
  transition: border-color var(--transition);
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info-badge { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.product-title { font-size: clamp(1.3rem, 2.5vw, 1.9rem); font-weight: 800; line-height: 1.25; }
.product-rating-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; font-size: .88rem; }
.product-price-block { margin: 20px 0; }
.product-price-block .current { font-size: 1.9rem; font-weight: 800; color: var(--primary); }
.product-price-block .original { font-size: 1.1rem; color: var(--text-muted); text-decoration: line-through; margin-left: 8px; }
.product-price-block .save-badge { background: var(--secondary); color: #fff; font-size:.75rem; font-weight:700; padding:3px 10px; border-radius: var(--radius-full); margin-left: 8px; }

.product-short-desc { margin: 16px 0; color: var(--text-muted); font-size: .95rem; line-height: 1.7; }
.qty-selector { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius); width: fit-content; overflow: hidden; }
.qty-selector button { width: 40px; height: 40px; background: var(--bg-alt); border: none; cursor: pointer; font-size: 1.1rem; transition: background var(--transition); }
.qty-selector button:hover { background: var(--primary); color: #fff; }
.qty-selector input { width: 52px; height: 40px; border: none; text-align: center; font-weight: 600; font-size: .95rem; }
.product-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.product-actions .btn { flex: 1; min-width: 160px; }
.stock-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .83rem; margin-top: 12px; }
.stock-badge.in-stock  { color: var(--success); }
.stock-badge.low-stock { color: var(--warning); }
.stock-badge.out-stock { color: var(--danger); }

/* Product tabs */
.product-tabs { margin-top: 48px; }
.tab-nav { display: flex; gap: 0; border-bottom: 2px solid var(--border); }
.tab-btn {
  padding: 12px 24px; font-weight: 600; font-size: .9rem;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted);  border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all var(--transition);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { padding: 28px 0; display: none; }
.tab-content.active { display: block; animation: fadeIn .3s ease; }

/* Reviews */
.review-card { padding: 20px 0; border-bottom: 1px solid var(--border); }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-weight:700; color: var(--primary); font-size:.85rem; }
.review-author { font-weight: 600; font-size: .9rem; }
.review-date   { font-size: .78rem; color: var(--text-muted); }
.review-body   { font-size: .9rem; color: var(--text-muted); margin-top: 6px; }
.review-form   { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 24px; margin-top: 24px; }

/* ── Cart page ───────────────────────────────────────────── */
.cart-page    { padding: 40px 0 80px; background: var(--bg-alt); min-height: 70vh; }
.cart-heading { font-size: 1.6rem; font-weight: 800; margin-bottom: 28px; color: var(--text); display: flex; align-items: center; gap: 10px; }

/* Two-column layout */
.cart-layout  { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.cart-items-col { display: flex; flex-direction: column; gap: 0; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--card-shadow); overflow: hidden; }

/* Header row */
.cart-header-row { display: grid; grid-template-columns: 80px 1fr 120px 110px 110px 44px; gap: 0; padding: 12px 20px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.cart-header-row span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); }
.ch-price, .ch-qty, .ch-total { text-align: center; }
.ch-del { text-align: center; }

/* Item card rows */
.cart-card { display: grid; grid-template-columns: 80px 1fr 120px 110px 110px 44px; gap: 0; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.cart-card:last-of-type { border-bottom: none; }
.cart-card:hover { background: var(--bg-alt); }

/* Thumbnail */
.cart-card-img-wrap { display: block; width: 64px; height: 64px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); flex-shrink: 0; }
.cart-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* Name */
.cart-card-name { padding: 0 14px; }
.cart-card-name a { font-weight: 600; font-size: .9rem; color: var(--text); text-decoration: none; line-height: 1.4; transition: color var(--transition); }
.cart-card-name a:hover { color: var(--primary); }
.cart-card-sku { display: block; font-size: .75rem; color: var(--text-muted); margin-top: 3px; }

/* Price */
.cart-card-price { text-align: center; }
.cp-original { display: block; text-decoration: line-through; color: var(--text-muted); font-size: .78rem; }
.cp-sale     { font-weight: 700; color: var(--danger); }
.cp-regular  { font-weight: 600; color: var(--text); }

/* Qty selector */
.cart-card-qty { display: flex; justify-content: center; }
.qty-selector  { display: inline-flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qty-btn { width: 32px; height: 36px; background: var(--bg-alt); border: none; cursor: pointer; font-size: 1rem; font-weight: 700; color: var(--text); display: flex; align-items: center; justify-content: center; transition: background var(--transition), color var(--transition); }
.qty-btn:hover { background: var(--primary); color: #fff; }
.cart-qty { width: 46px; height: 36px; border: none; border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border); text-align: center; font-weight: 700; font-size: .9rem; -moz-appearance: textfield; background: #fff; color: var(--text); }
.cart-qty::-webkit-inner-spin-button, .cart-qty::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Row total */
.cart-card-total { text-align: center; font-weight: 700; font-size: .95rem; color: var(--text); }

/* Remove button */
.cart-remove { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin: 0 auto; background: none; border: none; cursor: pointer; color: var(--text-muted); border-radius: var(--radius); transition: all var(--transition); }
.cart-remove:hover { color: var(--danger); background: #fee2e2; }

/* Promo */
.promo-section { padding: 18px 20px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.promo-inner { display: flex; align-items: center; gap: 8px; font-size: .87rem; color: var(--text-muted); margin-bottom: 12px; }
.promo-inner strong { color: var(--text); }
.promo-row { display: flex; gap: 10px; align-items: center; }
.promo-row .form-control { flex: 1; max-width: 240px; height: 40px; }
.applied-promo { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #ecfdf5; color: var(--success); padding: 10px 14px; border-radius: var(--radius); font-size: .85rem; font-weight: 600; }
.applied-promo svg { flex-shrink: 0; }

/* ── Cart Summary ────────────────────────────────────────── */
.cart-summary { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--card-shadow); padding: 26px; position: sticky; top: calc(var(--header-h, 72px) + 16px); }
.cart-summary-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1.5px solid var(--border); color: var(--text); }
.cs-rows { display: flex; flex-direction: column; gap: 0; margin-bottom: 4px; }
.cs-row  { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: .9rem; border-bottom: 1px solid var(--border); }
.cs-row:last-child { border-bottom: none; }
.cs-row span:first-child { color: var(--text-muted); }
.cs-row span:last-child  { font-weight: 600; color: var(--text); }
.cs-row.discount span:last-child { color: var(--success); font-weight: 700; }
.cs-total { margin-top: 6px; padding-top: 14px !important; border-top: 2px solid var(--border) !important; border-bottom: none !important; }
.cs-total span { font-weight: 800 !important; font-size: 1.1rem !important; color: var(--text) !important; }
.cs-free { color: var(--success); font-weight: 700; }

/* Free shipping progress bar */
.cs-free-ship-bar  { margin: 16px 0; }
.cs-free-ship-text { font-size: .78rem; color: var(--text-muted); margin-bottom: 7px; text-align: center; }
.cs-free-ship-track { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.cs-free-ship-fill  { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.6s ease; }

.cs-checkout-btn { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1rem; font-weight: 700; border-radius: var(--radius-full); }
.cs-continue-link { display: block; text-align: center; margin-top: 14px; font-size: .85rem; color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
.cs-continue-link:hover { color: var(--primary); }

.cs-trust { display: flex; justify-content: center; gap: 20px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.cs-trust span { display: flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--text-muted); }

/* Empty state */
.empty-state { text-align: center; padding: 80px 20px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--card-shadow); }
.empty-state .empty-icon { font-size: 3rem; display: block; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p  { color: var(--text-muted); margin-bottom: 24px; }

/* Responsive */
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-header-row,
  .cart-card { grid-template-columns: 64px 1fr auto; gap: 12px; }
  .cart-header-row .ch-price,
  .cart-header-row .ch-qty,
  .cart-header-row .ch-total,
  .cart-header-row .ch-del,
  .cart-card-price,
  .cart-card-qty,
  .cart-card-total,
  .cart-remove { display: none; }
  .cart-card-name { padding: 0 0 0 12px; }
  .cart-card-img-wrap { width: 54px; height: 54px; }
}

/* ── Checkout ────────────────────────────────────────────── */
.checkout-page { background: var(--bg-alt); min-height: 100vh; padding-bottom: 80px; }

/* Header */
.checkout-header { background: #fff; border-bottom: 1px solid var(--border); padding: 28px 0 24px; text-align: center; margin-bottom: 36px; }
.checkout-title  { font-size: 1.6rem; font-weight: 800; display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.checkout-title svg { color: var(--primary); }
.checkout-subtitle { font-size: .9rem; color: var(--text-muted); margin-top: 6px; }

/* Layout */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 28px; align-items: start; }
.checkout-left { display: flex; flex-direction: column; gap: 16px; }
.checkout-right { position: sticky; top: calc(var(--header-h, 72px) + 20px); }

/* Card */
.co-card { background: #fff; border-radius: var(--radius-lg); box-shadow: 0 1px 4px rgba(0,0,0,.07); padding: 28px; }

/* Step header */
.co-step-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.co-step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: .88rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.co-step-header h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }

/* Input with icon */
.co-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.co-req       { color: var(--danger); margin-left: 2px; }
.co-email-hint { display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--success); margin-top: 5px; font-weight: 500; }
.co-email-hint svg { flex-shrink: 0; stroke: var(--success); }
.co-input-wrap { position: relative; }
.co-input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.co-input { padding-left: 40px !important; }

/* Saved addresses */
.saved-addresses { display: flex; flex-direction: column; gap: 10px; }
.saved-address-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color var(--transition), background var(--transition); font-size: .88rem; }
.saved-address-card:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, #fff); }
.saved-address-card input { margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }

/* Payment banner */
.co-payment-banner { display: flex; gap: 16px; align-items: flex-start; background: color-mix(in srgb, var(--primary) 8%, #fff); border: 1px solid color-mix(in srgb, var(--primary) 20%, #fff); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 20px; }
.co-payment-banner-icon { width: 44px; height: 44px; border-radius: var(--radius); background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.co-payment-banner-title { font-weight: 700; font-size: .95rem; color: var(--primary); margin-bottom: 4px; }
.co-payment-banner-sub { font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; }
.co-payment-logos { display: flex; gap: 6px; flex-wrap: wrap; }
.co-pay-badge { padding: 3px 8px; border-radius: 4px; border: 1px solid var(--border); font-size: .7rem; font-weight: 700; color: var(--text-muted); background: #fff; }

/* Payment options */
.payment-methods { display: flex; flex-direction: column; gap: 10px; }
.payment-option { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color var(--transition), background var(--transition); overflow: hidden; }
.payment-option:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, #fff); }
.payment-option input[type=radio] { margin: 0 14px; accent-color: var(--primary); flex-shrink: 0; }
.payment-option-content { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 0; flex: 1; }
.payment-option-content svg { color: var(--primary); flex-shrink: 0; }
.payment-option-label { font-weight: 600; font-size: .9rem; }
.payment-option-sub { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* Terms */
.co-terms { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--text-muted); cursor: pointer; }
.co-terms input { margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.co-terms a { color: var(--primary); font-weight: 600; }
.co-check-label { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--text-muted); cursor: pointer; margin-top: 8px; }
.co-check-label input { accent-color: var(--primary); }

/* Order summary panel */
.co-summary { background: #fff; border-radius: var(--radius-lg); box-shadow: 0 1px 4px rgba(0,0,0,.07); overflow: hidden; }
.co-summary-header { background: #0d1117; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; }
.co-summary-title { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1rem; }
.co-summary-title svg { color: var(--primary); }
.co-summary-count { background: rgba(255,255,255,.15); color: rgba(255,255,255,.9); font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.co-summary-items { padding: 0 24px; border-bottom: 1px solid var(--border); }
.co-summary-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.co-summary-item:last-child { border-bottom: none; }
.co-item-thumb { width: 52px; height: 52px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.co-item-info { flex: 1; min-width: 0; }
.co-item-name  { font-size: .88rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-item-meta  { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.co-item-qty   { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.co-item-price { font-size: .9rem; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.co-summary-rows { padding: 16px 24px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); }
.co-sum-row { display: flex; justify-content: space-between; font-size: .88rem; color: var(--text-muted); }
.co-sum-row.total { font-size: 1.1rem; font-weight: 800; color: var(--text); border-top: 1.5px solid var(--border); padding-top: 12px; margin-top: 4px; }
.co-sum-row.discount span:last-child { color: var(--success); font-weight: 700; }
.co-free { color: var(--success); font-weight: 700; }
.co-place-btn { margin: 20px 24px 0; width: calc(100% - 48px); padding: 15px; font-size: 1rem; gap: 10px; border-radius: var(--radius); }
.co-trust-row { display: flex; justify-content: center; gap: 20px; padding: 14px 24px; border-top: 1px solid var(--border); margin-top: 16px; }
.co-trust-item { display: flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--success); }
.co-back-cart { display: block; text-align: center; padding: 12px 24px 20px; font-size: .85rem; color: var(--text-muted); transition: color var(--transition); }
.co-back-cart:hover { color: var(--primary); }

/* Shared step styles */
.checkout-steps { display: flex; align-items: center; margin-bottom: 36px; }
.step { display: flex; align-items: center; gap: 10px; flex: 1; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--border); color: var(--text-muted); font-weight: 700; font-size: .8rem; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.step.active .step-num { background: var(--primary); color: #fff; }
.step.done .step-num { background: var(--success); color: #fff; }
.step-label { font-size: .83rem; font-weight: 500; color: var(--text-muted); }
.step.active .step-label { color: var(--primary); font-weight: 600; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { display: block; font-weight: 600; font-size: .82rem; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .9rem; background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control.error { border-color: var(--danger); }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 4px; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.form-check input { accent-color: var(--primary); width: 18px; height: 18px; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: .9rem; display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error   { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info    { background: #dbeafe; color: #1e40af; }
.alert-icon    { font-size: 1.1rem; }

/* ── Toast notifications ─────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  padding: 14px 20px; display: flex; align-items: center; gap: 12px;
  min-width: 280px; max-width: 380px;
  animation: slideInRight .3s ease;
  border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger);  }
.toast.warning { border-left-color: var(--warning); }
.toast-icon    { font-size: 1.2rem; flex-shrink: 0; }
.toast-message { flex: 1; font-size: .88rem; font-weight: 500; }
.toast-close   { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; flex-shrink: 0; }
.toast-close:hover { color: var(--text); }

/* ── Pagination ──────────────────────────────────────────── */
.pagination ul {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 40px;
}
.pagination li { }
.pagination li a, .pagination li.active a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius);
  font-weight: 600; font-size: .88rem;
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.pagination li a:hover        { border-color: var(--primary); color: var(--primary); }
.pagination li.active a       { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination li.ellipsis span  { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; color: var(--text-muted); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: #0d1117; color: rgba(255,255,255,.7);
  padding: 64px 0 0;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
/* Brand column */
.footer-brand  { display:flex; flex-direction:column; gap:14px; }
.footer-logo   { height:40px; width:auto; }
.footer-logo-text { font-size:1.6rem; font-weight:800; color:#fff; letter-spacing:-.5px; }
.footer-tagline { font-size:.85rem; color:rgba(255,255,255,.55); line-height:1.7; max-width:300px; }
/* Social */
.footer-social { display:flex; gap:8px; }
.social-btn {
  width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,.08);
  display:flex; align-items:center; justify-content:center;
  color:rgba(255,255,255,.75); border:1px solid rgba(255,255,255,.1);
  transition:all var(--transition);
}
.social-btn:hover { background:var(--primary); color:#fff; border-color:var(--primary); transform:translateY(-2px); }
.social-btn svg { pointer-events:none; }
/* Newsletter box */
.footer-newsletter {
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.1);
  border-radius:var(--radius-lg);
  padding:20px;
  margin-top:4px;
}
.footer-newsletter-title {
  display:flex; align-items:center; gap:8px;
  font-weight:700; font-size:.9rem; color:#fff; margin-bottom:6px;
}
.footer-newsletter-sub { font-size:.8rem; color:rgba(255,255,255,.5); margin-bottom:14px; }
.footer-newsletter-form {
  display:flex; gap:0; border-radius:var(--radius); overflow:hidden;
  border:1px solid rgba(255,255,255,.15);
}
.footer-newsletter-form input {
  flex:1; padding:10px 14px;
  background:rgba(255,255,255,.07); border:none;
  color:#fff; font-size:.88rem; outline:none;
}
.footer-newsletter-form input::placeholder { color:rgba(255,255,255,.35); }
.footer-newsletter-form button {
  padding:10px 16px; background:var(--primary); border:none;
  color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background var(--transition);
}
.footer-newsletter-form button:hover { background:color-mix(in srgb,var(--primary) 85%,#000); }
/* Link columns */
.footer-col h4 {
  font-weight:700; font-size:.8rem; color:#fff;
  margin-bottom:18px; text-transform:uppercase; letter-spacing:1.5px;
  padding-bottom:10px;
  border-bottom:2px solid var(--primary);
  display:inline-block;
}
.footer-col ul { list-style:none; padding:0; display:flex; flex-direction:column; gap:10px; }
.footer-col ul li a {
  font-size:.875rem; color:rgba(255,255,255,.6);
  transition:color var(--transition), padding-left var(--transition);
  display:block;
}
.footer-col ul li a:hover { color:var(--primary); padding-left:4px; }
/* Contact cards */
.footer-contact-cards { display:flex; flex-direction:column; gap:10px; }
.footer-contact-card {
  display:flex; align-items:flex-start; gap:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.07);
  border-left:3px solid var(--primary);
  border-radius:var(--radius);
  padding:12px 14px;
}
.footer-contact-icon {
  width:32px; height:32px; flex-shrink:0;
  background:var(--primary); border-radius:var(--radius);
  display:flex; align-items:center; justify-content:center;
  color:#fff;
}
.footer-contact-label { font-size:.68rem; font-weight:700; letter-spacing:1px; color:rgba(255,255,255,.4); text-transform:uppercase; margin-bottom:3px; }
.footer-contact-value { font-size:.83rem; color:rgba(255,255,255,.8); line-height:1.55; }
.footer-contact-value a { color:rgba(255,255,255,.8); text-decoration:none; }
.footer-contact-value a:hover { color:var(--primary); }
/* Bottom bar */
.footer-bottom { padding:20px 0; }
.footer-bottom-inner {
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:16px;
}
.footer-copy { font-size:.8rem; color:rgba(255,255,255,.4); }
.footer-copy p { margin:0; }
/* Trust badges */
.footer-trust-badges { display:flex; gap:8px; }
.trust-badge {
  display:flex; align-items:center; gap:8px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.1);
  border-radius:var(--radius);
  padding:8px 14px;
  color:rgba(255,255,255,.7);
}
.trust-badge svg { color:var(--primary); flex-shrink:0; }
.trust-badge span { font-size:.65rem; font-weight:700; letter-spacing:.5px; line-height:1.3; text-transform:uppercase; }
/* Payment logos */
.footer-payment-logos { display:flex; gap:6px; align-items:center; }
.pay-logo {
  padding:4px 10px; border-radius:4px;
  border:1px solid rgba(255,255,255,.15);
  font-size:.72rem; font-weight:800;
  color:rgba(255,255,255,.65); letter-spacing:.5px;
}
/* Back to top */
#back-to-top {
  position:fixed; bottom:28px; right:28px; z-index:999;
  width:44px; height:44px; border-radius:50%;
  background:var(--primary); color:#fff;
  border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 16px rgba(0,0,0,.3);
  opacity:0; pointer-events:none; transform:translateY(10px);
  transition:opacity .25s ease, transform .25s ease;
}
#back-to-top.show { opacity:1; pointer-events:auto; transform:translateY(0); }
#back-to-top:hover { background:color-mix(in srgb,var(--primary) 85%,#000); }

/* Footer responsive */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: span 2; }
  .footer-bottom-inner { flex-direction: column; text-align: center; align-items: center; }
  .footer-trust-badges { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 640px) {
  .site-footer { padding-top: 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand { grid-column: span 1; }
  .footer-newsletter-form { flex-direction: column; }
  .footer-newsletter-form button { width: 100%; }
  .footer-trust-badges { gap: 6px; }
  .trust-badge { font-size: .6rem; padding: 6px 10px; }
  .footer-payment-logos { flex-wrap: wrap; justify-content: center; }
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .82rem; color: var(--text-muted); margin-bottom: 24px; }
.breadcrumb a { transition: color var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 2px; }

/* ── Page hero (inner pages) ─────────────────────────────── */
.page-hero { background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, var(--secondary)) 100%); padding: 56px 0; color: #fff; }
.page-hero h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; }
.page-hero p  { opacity: .85; margin-top: 8px; }

/* ── Order confirmation ──────────────────────────────────── */
.order-success {
  text-align: center; padding: 64px 24px;
  max-width: 600px; margin: 0 auto;
}
.order-success .check-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--success); color: #fff;
  font-size: 2.2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  animation: popIn .5s cubic-bezier(0.68,-0.55,0.27,1.55) both;
}
.order-number-display { font-size: 1.3rem; font-weight: 800; color: var(--primary); }

/* ── Loading spinner ─────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998;
}
.spinner-lg {
  width: 48px; height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ── Skeleton loader ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-alt) 25%, #e8e8f0 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: var(--radius);
}
.skeleton-card   { height: 320px; }
.skeleton-text   { height: 16px; width: 80%; margin-bottom: 8px; }
.skeleton-text.short { width: 40%; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; padding: 20px;
  animation: fadeIn .2s ease;
}
.modal-box {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp .3s ease;
}
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-title   { font-weight: 700; font-size: 1.05rem; }
.modal-close   { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.3rem; transition: color var(--transition); padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-body    { padding: 24px; }
.modal-footer  { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── Auth modal ──────────────────────────────────────────── */
.auth-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .18s ease;
}
.auth-modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  width: 100%; max-width: 440px;
  max-height: 92vh; overflow-y: auto;
  position: relative;
  animation: slideUp .25s ease;
  padding: 32px 32px 28px;
}
.auth-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; cursor: pointer;
  font-size: 1.5rem; color: var(--text-muted);
  line-height: 1; padding: 4px 8px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.auth-modal-close:hover { background: var(--bg-alt); color: var(--text); }
/* Modal logo */
.auth-modal-logo {
  text-align: center;
  margin-bottom: 20px;
  padding-top: 4px;
}
.auth-modal-logo img { height: 40px; width: auto; display: inline-block; }
.auth-modal-logo-text {
  font-size: 1.5rem; font-weight: 800;
  color: var(--primary); letter-spacing: -.5px;
  display: inline-block;
}
/* Tabs */
.auth-modal-tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1; background: none; border: none;
  padding: 12px 8px; font-size: .95rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-tab:hover:not(.active) { color: var(--text); }
/* Alert */
.auth-modal-alert {
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: .88rem;
  margin-bottom: 16px;
}
.auth-modal-alert.error   { background: #fee2e2; color: #991b1b; }
.auth-modal-alert.success { background: #d1fae5; color: #065f46; }
/* Misc */
.auth-switch-link {
  text-align: center; font-size: .85rem;
  color: var(--text-muted); margin-top: 18px;
}
.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-weight: 600;
  font-size: inherit; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--secondary); }
.forgot-link { float: right; font-size: .8rem; color: var(--primary); font-weight: 400; }
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; cursor: pointer; margin-top: 4px; }
.checkbox-label input { margin-top: 3px; accent-color: var(--primary); flex-shrink: 0; }
.mb-3 { margin-bottom: 12px; }
.password-field { position: relative; display: flex; align-items: center; }
.password-field .form-control { flex: 1; padding-right: 42px; }
.pw-toggle {
  position: absolute; right: 10px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1rem; padding: 4px;
  transition: color var(--transition);
}
.pw-toggle:hover { color: var(--primary); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 480px) {
  .auth-modal-box { padding: 24px 18px 20px; }
  .form-row-2 { grid-template-columns: 1fr; }
}

/* Mobile auth buttons (login/register in mobile menu) */
.mobile-auth-btn {
  background: none; border: none; cursor: pointer;
  width: 100%; text-align: left;
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 1rem; font-weight: 500; color: var(--text);
  border-bottom: 1px solid var(--border);
  font-family: inherit;
  transition: background var(--transition);
}
.mobile-auth-btn:hover { background: var(--bg-alt); }

/* Footer auth buttons */
.footer-link-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: .85rem; color: rgba(255,255,255,.65);
  font-family: inherit; transition: color var(--transition);
}
.footer-link-btn:hover { color: #fff; }

/* ── Status badges ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 600; text-transform: capitalize;
}
.badge-success   { background: #d1fae5; color: #065f46; }
.badge-danger    { background: #fee2e2; color: #991b1b; }
.badge-warning   { background: #fef3c7; color: #92400e; }
.badge-info      { background: #dbeafe; color: #1e40af; }
.badge-primary   { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: #f3f4f6; color: var(--text-muted); }
.badge-accent    { background: #d1fae5; color: #065f46; }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3.5rem; margin-bottom: 16px; opacity: .4; }
.empty-state h3    { font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p     { font-size: .9rem; margin-bottom: 20px; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes spin        { to { transform: rotate(360deg); } }
@keyframes fadeIn      { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp    { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown   { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp     { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight{ from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes popIn       { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes skeleton    { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* fade-in-view (intersection observer trigger) */
.fade-in-view { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in-view.visible { opacity: 1; transform: translateY(0); }

/* ── Newsletter ──────────────────────────────────────────── */
.newsletter-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 60px 0;
}
.newsletter-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.newsletter-inner h2 {
  font-size: 1.6rem; font-weight: 800; color: #fff; margin-bottom: 8px;
}
.newsletter-inner p { color: rgba(255,255,255,.85); font-size: .95rem; }
.newsletter-form {
  display: flex; gap: 10px; flex-wrap: wrap;
  flex: 1; min-width: 280px; max-width: 480px;
}
.newsletter-form input[type=email] {
  flex: 1; padding: 12px 16px;
  border: none; border-radius: var(--radius);
  font-size: .95rem; outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.newsletter-form .btn { white-space: nowrap; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .shop-layout     { grid-template-columns: 1fr; }
  .shop-sidebar    { position: static; display: none; }
  .shop-sidebar.open { display: block; }
  .filter-toggle-mobile { display: flex !important; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .checkout-layout, .cart-layout { grid-template-columns: 1fr; }
  .checkout-right { position: static; }
  .co-place-btn { width: calc(100% - 48px); }
}

@media (max-width: 768px) {
  .header-nav       { display: none; }
  .menu-toggle      { display: flex; }
  .header-search    { display: none; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  .feature-grid     { grid-template-columns: 1fr 1fr; }
  .form-row         { grid-template-columns: 1fr; }
  .footer-grid      { grid-template-columns: 1fr; }
  .hero             { min-height: 420px; }
  .hero-content h1  { font-size: 1.8rem; }
  .hero-slide       { min-height: 400px; }
  .hero-title       { font-size: 1.8rem; }
  .newsletter-inner { flex-direction: column; text-align: center; }
  .newsletter-form  { max-width: 100%; width: 100%; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}

/* ── Utility spacing ─────────────────────────────────────── */
.mt-3  { margin-top: 16px; }

/* ── Missing utility classes ─────────────────────────────── */
.w-full   { width: 100%; }
.mt-2     { margin-top: 8px; }
.mt-4     { margin-top: 24px; }
.d-none   { display: none !important; }
.d-flex   { display: flex !important; }
.gap-2    { gap: 8px; }
.gap-3    { gap: 12px; }
.flex-col { flex-direction: column; }
.align-center { align-items: center; }
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Specs / attributes table ────────────────────────────── */
.specs-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.specs-table th,
.specs-table td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.specs-table th { background: var(--bg-alt,#f7f7f7); font-weight: 600; width: 35%; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════
   COMPREHENSIVE RESPONSIVE IMPROVEMENTS
   Target: all mobile devices (360px → 1024px)
   ═══════════════════════════════════════════════════════════ */

/* Mobile: hide account icon (accessible via hamburger menu) */
@media (max-width: 768px) {
  .header-action-account { display: none !important; }
  .header-actions { gap: 4px; }
  /* Let logo shrink but keep actions pinned right */
  .header-inner { gap: 0; }
  .header-logo  { flex: 1; }
}

/* ── Mobile search bar (below header, toggled via JS) ─────── */
.mobile-search-bar {
  display: none;
  padding: 10px 16px 14px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  animation: slideDown .2s ease;
}
.mobile-search-bar.open { display: block; }
.mobile-search-bar form { position: relative; display: flex; align-items: center; }
.mobile-search-bar input {
  width: 100%; padding: 10px 44px 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  font-size: .9rem; outline: none;
  transition: border-color var(--transition);
}
.mobile-search-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.mobile-search-bar button[type=submit] {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 4px; display: flex; align-items: center;
  transition: color var(--transition);
}
.mobile-search-bar button[type=submit]:hover { color: var(--primary); }

/* Mobile search toggle icon (hidden on desktop) */
.mobile-search-toggle {
  display: none;
  padding: 8px; border: none; background: none; cursor: pointer;
  color: var(--text); border-radius: var(--radius);
  align-items: center; justify-content: center;
  transition: background var(--transition);
}
.mobile-search-toggle:hover { background: var(--bg-alt); color: var(--primary); }

/* ── Cart card: desktop = display:contents wrapper, mobile = flex row ── */
.cart-card-actions-row { display: contents; }

/* ── Customer portal tables ──────────────────────────────── */
.portal-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }

/* ── ≤ 1024px ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Checkout layout stacks */
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-right  { position: static; }
}

/* ── ≤ 900px  (cart mobile) ───────────────────────────────── */
@media (max-width: 900px) {
  /* Cart: re-layout each card as 2-row with image pinned left */
  .cart-header-row { display: none; }

  .cart-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    align-items: start;
    padding: 14px 16px;
  }
  .cart-card-img-wrap {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 70px; height: 70px;
    align-self: center;
  }
  .cart-card-name {
    grid-column: 2;
    grid-row: 1;
    padding: 2px 0 4px 12px;
  }
  /* The actions-row becomes a flex strip in row 2 */
  .cart-card-actions-row {
    display: flex !important;
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    gap: 10px;
    padding: 4px 0 2px 12px;
    flex-wrap: wrap;
  }
  .cart-card-price { text-align: left; }
  .cart-card-price .cp-original { display: inline; margin-right: 4px; }
  .cart-card-total { font-size: .88rem; margin-left: auto; }
  .cart-remove     { margin: 0; width: 30px; height: 30px; }
  .cart-card-qty .qty-selector { transform: scale(.88); transform-origin: left center; }

  /* Summary stays full-width, not sticky */
  .cart-summary    { position: static; }
  .cart-layout     { grid-template-columns: 1fr; gap: 20px; }
}

/* ── ≤ 768px ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Show mobile search icon, hide desktop search bar */
  .header-search         { display: none; }
  .mobile-search-toggle  { display: flex; }

  /* Cart popup: slide up from bottom on mobile */
  .cart-popup {
    position: fixed; top: auto !important; bottom: 0; left: 0; right: 0;
    width: 100%; max-height: 85vh; overflow-y: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 40px rgba(0,0,0,.18);
  }
  .cart-popup::before, .cart-popup::after { display: none; }

  /* Checkout */
  .co-card { padding: 20px 16px; }
  .co-summary-items, .co-summary-rows { padding: 0 16px; }
  .co-summary-header { padding: 16px; }
  .co-place-btn { width: calc(100% - 32px); margin-left: 16px; margin-right: 16px; }
  .co-back-cart { padding: 10px 16px 18px; }
  .co-trust-row { padding: 12px 16px; gap: 10px; flex-wrap: wrap; justify-content: center; }
  .checkout-title { font-size: 1.3rem; }
  .checkout-header { padding: 20px 0 18px; margin-bottom: 24px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
  .co-payment-logos { flex-wrap: wrap; }

  /* Product detail */
  .product-detail-layout { gap: 24px; }
  .gallery-thumbs { gap: 8px; }
  .gallery-thumb  { width: 60px; height: 60px; }
  .product-actions .btn { min-width: 120px; }
  .product-price-block .current { font-size: 1.6rem; }

  /* Product tabs – scroll horizontally */
  .tab-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; border-bottom-color: var(--border); }
  .tab-btn { white-space: nowrap; flex-shrink: 0; padding: 12px 18px; font-size: .85rem; }

  /* Shop page toolbar */
  .shop-toolbar { gap: 10px; }
  .result-count  { width: 100%; }

  /* Promo row */
  .promo-row { flex-wrap: wrap; }
  .promo-row .form-control { max-width: 100%; min-width: 140px; flex: 1; }

  /* Feature strip */
  .feature-strip { padding: 20px 0; }
  .feature-item  { gap: 10px; }
  .feature-item > span { font-size: 1.7rem; }

  /* Toast: full-width at bottom */
  #toast-container {
    bottom: 0; right: 0; left: 0;
    padding: 0 12px 12px;
    gap: 8px;
  }
  .toast { min-width: unset; max-width: 100%; border-radius: var(--radius); }

  /* Section headings */
  .section-title { margin-bottom: 20px; }
  section.py { padding: 48px 0; }

  /* Grid utilities at 768 */
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }

  /* Footer newsletter */
  .newsletter-section { padding: 40px 0; }

  /* Page hero */
  .page-hero { padding: 36px 0; }
  .page-hero h1 { font-size: 1.6rem; }
}

/* ── ≤ 640px ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Container side padding */
  .container, .container-sm { padding: 0 14px; }

  /* Header: tighten logo text */
  .header-logo .logo-text { font-size: 1.15rem; }
  .header-actions { gap: 4px; }
  .action-btn { padding: 6px; }

  /* Hero */
  .hero-slide { min-height: 340px; }
  .hero-inner { padding: 44px 0 32px; }
  .hero-title { font-size: clamp(1.4rem, 5vw, 1.9rem); }
  .hero-text  { font-size: .9rem; margin-bottom: 24px; }
  .btn-hero, .btn-hero-outline { padding: 11px 22px; font-size: .88rem; }

  /* Feature grid inline */
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 16px; }

  /* Products grid: 2 cols, tighter gap */
  .products-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .product-card-body { padding: 12px; }
  .product-card-footer { padding: 0 12px 12px; }
  .product-card-name { font-size: .85rem; }
  .price-current { font-size: .95rem; }
  .add-to-cart-btn { padding: 9px; font-size: .8rem; }

  /* Cart heading */
  .cart-heading  { font-size: 1.25rem; }
  .cart-page { padding: 24px 0 60px; }
  .promo-section { padding: 14px; }

  /* Checkout */
  .checkout-steps { gap: 0; }
  .step-label { display: none; }
  .step-line  { margin: 0 4px; }

  /* Order summary on checkout */
  .co-summary-item { gap: 10px; }
  .co-item-thumb { width: 44px; height: 44px; }

  /* Breadcrumb */
  .breadcrumb { font-size: .78rem; }

  /* Section header */
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Form row-3 collapse */
  .form-row-3 { grid-template-columns: 1fr; }

  /* Footer */
  .footer-bottom-inner { flex-direction: column; text-align: center; gap: 12px; }
  .footer-trust-badges { flex-wrap: wrap; justify-content: center; gap: 6px; }
  .trust-badge { font-size: .6rem; padding: 6px 10px; }

  /* Pagination */
  .pagination ul { gap: 4px; }
  .pagination li a { width: 34px; height: 34px; font-size: .82rem; }

  /* Grid utilities */
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ── ≤ 480px ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Header: logo just icon on tiny screens */
  .header-logo .logo-text { font-size: 1.05rem; letter-spacing: -.3px; }

  /* Hero */
  .hero-slide   { min-height: 320px; }
  .hero-inner   { padding: 36px 0 28px; }
  .hero-title   { font-size: clamp(1.25rem, 6vw, 1.7rem); }
  .hero-sub     { font-size: .75rem; letter-spacing: .07em; }
  .hero-text    { font-size: .87rem; margin-bottom: 20px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .btn-hero, .btn-hero-outline { width: 100%; text-align: center; justify-content: center; padding: 13px 20px; }

  /* Feature grid */
  .feature-grid { grid-template-columns: 1fr; }

  /* Cart: even smaller card */
  .cart-card { padding: 12px; }
  .cart-card-img-wrap { width: 60px; height: 60px; }
  .cart-card-qty .qty-selector { transform: scale(.82); }

  /* Cart summary */
  .cart-summary { padding: 18px; }

  /* Checkout */
  .co-card { padding: 16px 14px; }
  .checkout-title { font-size: 1.15rem; gap: 8px; }
  .checkout-title svg { width: 22px; height: 22px; }

  /* Product detail */
  .product-title { font-size: 1.2rem; }
  .product-price-block .current { font-size: 1.4rem; }
  .product-actions { flex-direction: column; gap: 10px; }
  .product-actions .btn { min-width: unset; width: 100%; }

  /* Modal */
  .modal-box { margin: 12px; max-width: calc(100% - 24px); }
  .modal-header { padding: 16px; }
  .modal-body   { padding: 16px; }
  .modal-footer { padding: 12px 16px; }

  /* Auth modal */
  .auth-modal-box { padding: 22px 16px 18px; }

  /* Buttons full-width on tiny screens for key CTAs */
  .cs-checkout-btn { font-size: .92rem; padding: 14px 20px; }
}

/* ═══════════════════════════════════════════════════════════
   CUSTOMER PORTAL  (uses main.css, not admin.css)
   ═══════════════════════════════════════════════════════════ */

/* ── Margin utilities ─────────────────────────────────────── */
.mt-5 { margin-top: 32px; }
.mt-6 { margin-top: 40px; }

/* ── Dashboard layout ─────────────────────────────────────── */
.dashboard-layout { background: var(--bg-alt); }
.dashboard-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding-top: 32px;
  padding-bottom: 64px;
  align-items: start;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.dashboard-sidebar {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-h, 70px) + 16px);
}
.dashboard-user {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, var(--secondary)));
  color: #fff;
}
.dashboard-user strong { display: block; font-size: .92rem; font-weight: 700; color: #fff; line-height: 1.3; }
.dashboard-user span   { font-size: .76rem; opacity: .85; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.user-avatar-lg {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; color: #fff;
  flex-shrink: 0;
}
.dashboard-nav { padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.dashboard-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  font-size: .88rem; font-weight: 500; color: var(--text);
  text-decoration: none; transition: all var(--transition);
}
.dashboard-nav-link:hover  { background: var(--bg-alt); color: var(--primary); }
.dashboard-nav-link.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.dashboard-nav-link.logout { color: var(--danger); margin-top: 6px; border-top: 1px solid var(--border); padding-top: 14px; }
.dashboard-nav-link.logout:hover { background: #fee2e2; }

/* ── Main content area ────────────────────────────────────── */
.dashboard-main { min-width: 0; }

/* ── Dash headings ────────────────────────────────────────── */
.dash-heading {
  font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; color: var(--text);
}

/* ── Stat grid ────────────────────────────────────────────── */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.dash-stat-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
}
.dash-stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0; color: #fff;
}
.dash-stat-card > div:last-child strong {
  display: block; font-size: 1.15rem; font-weight: 800; color: var(--text); line-height: 1.2;
}
.dash-stat-card > div:last-child span {
  font-size: .75rem; color: var(--text-muted); font-weight: 500;
}

/* ── Dash card ────────────────────────────────────────────── */
.dash-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow); padding: 22px 24px;
  margin-bottom: 20px;
}
.dash-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.dash-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.dash-card-header h3 { margin: 0; }

/* ── Data table ───────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th {
  padding: 10px 14px; background: var(--bg-alt);
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-muted);
  text-align: left; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tfoot td { font-size: .88rem; padding: 8px 14px; color: var(--text-muted); }
.data-table tfoot .total-row td { font-size: .92rem; border-top: 2px solid var(--border); }
.data-table tr:hover td { background: var(--bg-alt); }

/* Scrollable table wrapper */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; margin: -4px; padding: 4px; }

/* ── Order detail ─────────────────────────────────────────── */
.order-detail-header {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.order-detail-header .dash-heading { margin-bottom: 0; flex: 1; min-width: 0; }
.order-detail-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start;
}
address { font-style: normal; font-size: .9rem; line-height: 1.8; color: var(--text-muted); }

/* ── Tracking timeline ────────────────────────────────────── */
.tracking-timeline {
  display: flex; flex-direction: column; gap: 0;
  position: relative; padding-left: 28px;
}
.tracking-timeline::before {
  content: ''; position: absolute; left: 9px; top: 12px; bottom: 12px;
  width: 2px; background: var(--border);
}
.tracking-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; position: relative;
}
.step-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--border); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--border);
  flex-shrink: 0; margin-left: -28px;
  transition: all var(--transition);
  z-index: 1;
}
.tracking-step.done   .step-dot { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.tracking-step.active .step-dot { background: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.step-body { flex: 1; }
.step-body .step-label { font-weight: 600; font-size: .9rem; display: block; color: var(--text-muted); }
.tracking-step.done .step-label, .tracking-step.active .step-label { color: var(--text); }
.step-date { font-size: .76rem; color: var(--text-muted); margin-top: 2px; display: block; }

/* ── Customer portal responsive ──────────────────────────── */
@media (max-width: 900px) {
  .dashboard-container { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .dashboard-sidebar { position: static; }
  /* Horizontal nav on tablet */
  .dashboard-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; padding: 10px 12px; }
  .dashboard-nav-link.logout { margin-top: 0; border-top: none; padding-top: 10px; border-left: 1px solid var(--border); padding-left: 14px; margin-left: 6px; }
  .dash-stats-grid { grid-template-columns: 1fr 1fr; }
  .order-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .dashboard-container { padding-top: 16px; padding-bottom: 40px; }
  .dashboard-user { padding: 16px 14px; }
  .dashboard-nav { padding: 8px; gap: 2px; }
  .dashboard-nav-link { padding: 9px 10px; font-size: .82rem; gap: 7px; }
  .dashboard-nav-link.logout { border-left: none; padding-left: 10px; border-top: 1px solid var(--border); padding-top: 10px; margin-left: 0; }
  .dash-heading { font-size: 1.2rem; }
  .dash-stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dash-stat-card { padding: 14px; gap: 10px; }
  .dash-stat-icon { width: 36px; height: 36px; font-size: 1.1rem; }
  .dash-stat-card > div:last-child strong { font-size: 1rem; }
  .dash-card { padding: 16px; }
  .data-table { font-size: .82rem; }
  .data-table th, .data-table td { padding: 9px 10px; }
  .order-detail-header { gap: 10px; }
}

/* ============================================================
   CMS STATIC PAGES  (page.php)
   ============================================================ */
.cms-page {
  padding: 40px 0 80px;
  min-height: 60vh;
}
.cms-page .breadcrumb {
  margin-bottom: 24px;
  font-size: .88rem;
  color: var(--text-muted);
}
.cms-page .breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.cms-page .breadcrumb a:hover { color: var(--primary); }

.cms-content h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 32px;
  color: var(--text-dark);
  line-height: 1.2;
}
.cms-body { max-width: 840px; }

/* Generic section wrapper inside cms pages */
.cms-section { color: var(--text-dark); line-height: 1.75; }

.cms-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text-dark);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.cms-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--text-dark);
}
.cms-section p { margin-bottom: 14px; }
.cms-section ul, .cms-section ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.cms-section ul li, .cms-section ol li { margin-bottom: 6px; }
.cms-section a { color: var(--primary); text-decoration: underline; }
.cms-section a:hover { color: var(--primary-dark, #5549d0); }
.cms-section em { color: var(--text-muted); font-style: italic; }

/* About Us – stats row */
.cms-stats-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 36px 0;
}
.cms-stat {
  flex: 1 1 140px;
  background: var(--bg-light, #f8f8fb);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.cms-stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}
.cms-stat span { font-size: .9rem; color: var(--text-muted); }

/* Contact Us – info grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 28px 0 40px;
}
.contact-info-block {
  background: var(--bg-light, #f8f8fb);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.contact-info-block h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}
.contact-info-block p { margin: 0 0 4px; font-size: .92rem; color: var(--text-muted); }
.contact-info-block a { color: var(--primary); text-decoration: none; }
.contact-info-block a:hover { text-decoration: underline; }

/* Contact form */
.contact-form { max-width: 700px; }
.contact-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 130px;
  background: var(--bg-light, #fafafa);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text-dark);
  transition: border-color .2s;
}
.contact-form textarea:focus { outline: none; border-color: var(--primary); }

/* ── Dedicated Contact Page ──────────────────────────────── */
.contact-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 64px 0 52px;
  text-align: center;
}
.contact-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}
.contact-hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.85);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Info cards */
.contact-info-section { padding: 48px 0 0; }
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.contact-info-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px 24px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.contact-info-card:hover {
  box-shadow: var(--card-shadow);
  transform: translateY(-3px);
}
.contact-info-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.contact-info-card h3 {
  font-size: 1rem; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
}
.contact-info-card p {
  font-size: .9rem; color: var(--text-muted);
  margin: 0 0 8px; line-height: 1.55;
}
.contact-info-card a { color: var(--primary); }
.contact-info-card a:hover { text-decoration: underline; }
.contact-info-note {
  display: inline-block;
  font-size: .78rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* Form section */
.contact-form-section { padding: 48px 0 80px; }
.contact-form-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}
.contact-form-left h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.contact-form-desc {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 28px;
}
.contact-form-styled .cfm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.req { color: var(--danger); }
.contact-submit-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 32px; font-size: 1rem; font-weight: 600;
  margin-top: 8px;
}

/* Alerts */
.contact-alert {
  padding: 13px 18px;
  border-radius: var(--radius);
  font-size: .92rem;
  font-weight: 500;
  margin-bottom: 22px;
}
.contact-alert--success { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.contact-alert--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

/* Side cards */
.contact-side-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  margin-bottom: 20px;
}
.contact-side-card h3 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 18px;
}
.contact-quick-links { list-style: none; padding: 0; margin: 0; }
.contact-quick-links li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.contact-quick-links li:last-child { border-bottom: none; }
.contact-quick-links svg { flex-shrink: 0; color: var(--primary); }
.contact-quick-links a { color: var(--text); transition: color var(--transition); }
.contact-quick-links a:hover { color: var(--primary); }

.contact-response-card { text-align: center; background: var(--bg-alt); border-style: dashed; }
.contact-response-icon { font-size: 2rem; margin-bottom: 10px; }
.contact-response-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.contact-response-card p { font-size: .87rem; color: var(--text-muted); margin: 0; line-height: 1.6; }

/* Responsive */
@media (max-width: 1024px) {
  .contact-info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .contact-hero { padding: 44px 0 36px; }
  .contact-hero-title { font-size: 2rem; }
  .contact-info-section { padding: 32px 0 0; }
  .contact-form-wrap { grid-template-columns: 1fr; gap: 28px; }
  .contact-form-right { order: -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .contact-response-card { margin: 0; }
  .contact-side-card { margin-bottom: 0; }
}
@media (max-width: 600px) {
  .contact-info-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .contact-info-card { padding: 20px 14px 18px; }
  .contact-form-styled .cfm-row { grid-template-columns: 1fr; }
  .contact-form-right { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .contact-info-grid { grid-template-columns: 1fr; }
}

/* FAQ */
.faq-list { max-width: 780px; }
.faq-item {
  background: var(--bg-light, #f8f8fb);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 14px;
}
.faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text-dark);
}
.faq-item p { margin: 0; font-size: .93rem; color: #555; }
.faq-item a { color: var(--primary); }

/* Shipping – table */
.cms-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 28px;
  font-size: .93rem;
}
.cms-table th {
  background: var(--primary);
  color: #fff;
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
}
.cms-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
}
.cms-table tr:last-child td { border-bottom: none; }
.cms-table tr:nth-child(even) td { background: var(--bg-light, #f8f8fb); }

/* Responsive CMS */
@media (max-width: 768px) {
  .cms-content h1 { font-size: 1.7rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 14px; }
  .cms-stats-row { gap: 12px; }
  .cms-stat { flex: 1 1 calc(50% - 12px); padding: 18px 14px; }
  .cms-stat strong { font-size: 1.6rem; }
  .cms-table { font-size: .85rem; }
  .cms-table th, .cms-table td { padding: 9px 12px; }
}
@media (max-width: 480px) {
  .cms-page { padding: 24px 0 60px; }
  .cms-stat { flex: 1 1 100%; }
  .contact-form .form-row-2 { grid-template-columns: 1fr; }
}
