/* ============================================================
   WowMyGift – Premium UI Stylesheet
   Colors: Primary #FF6B6B | Secondary #FFB347 | BG #FFFDF9
   Fonts: Poppins, Inter
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary: #FF6B6B;
  --primary-dark: #e85555;
  --primary-light: #fff0f0;
  --secondary: #FFB347;
  --secondary-light: #fff8ee;
  --bg: #FFFDF9;
  --bg-card: #ffffff;
  --text: #222222;
  --text-muted: #888;
  --text-light: #bbb;
  --border: #f0ede8;
  --border-focus: #FF6B6B;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 6px 24px rgba(0,0,0,.09);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.13);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --transition: .22s cubic-bezier(.4,0,.2,1);
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --header-h: 68px;
  --bottom-nav-h: 64px;
  --max-w: 1280px;
}

/* Dark mode */
body.dark {
  --bg: #141414;
  --bg-card: #1e1e1e;
  --text: #f0f0f0;
  --text-muted: #888;
  --border: #2e2e2e;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
  --shadow-md: 0 6px 24px rgba(0,0,0,.4);
  --primary-light: #2a1010;
  --secondary-light: #1f1800;
}

/* ── Reset ──────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Utility ─────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }
.section-pad { padding: 48px 0; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Typography ─────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); font-weight: 700; color: var(--text); line-height: 1.25; }
.section-title { font-size: clamp(1.3rem,2.5vw,1.8rem); margin-bottom: 8px; }
.section-subtitle { font-size: .9rem; color: var(--text-muted); margin-bottom: 32px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-full);
  font-family: var(--font-head); font-weight: 600; font-size: .9rem;
  transition: all var(--transition); cursor: pointer; border: none;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,107,.4); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #e8a030; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,179,71,.4); }
.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); }
.btn-ghost:hover { background: var(--border); }
.btn-sm { padding: 8px 16px; font-size: .8rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: var(--radius-full); font-size: .72rem; font-weight: 600; font-family: var(--font-head);
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: var(--secondary-light); color: #c07d00; }
.badge-success { background: #e8f5e9; color: #2e7d32; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text); font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,107,.12); }
.form-control.error { border-color: #e53935; }
.form-error { color: #e53935; font-size: .78rem; margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 900;
  height: var(--header-h); background: rgba(255,253,249,.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}
body.dark .site-header { background: rgba(20,20,20,.92); }
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  height: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-icon {
  width: 36px; height: 36px; background: linear-gradient(135deg,var(--primary),var(--secondary));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.logo-text { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; }
.logo-text span { color: var(--primary); }

/* Header Search */
.header-search { flex: 1; max-width: 480px; position: relative; display: none; }
@media(min-width:768px){ .header-search { display: block; } }
.header-search input {
  width: 100%; padding: 10px 16px 10px 44px;
  border: 1.5px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg); color: var(--text); font-size: .875rem; outline: none;
  transition: border-color var(--transition);
}
.header-search input:focus { border-color: var(--primary); }
.header-search .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-card); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); overflow: hidden; display: none; z-index: 200;
}
.search-results.show { display: block; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; transition: background var(--transition); cursor: pointer; }
.search-item:hover { background: var(--primary-light); }
.search-item-img { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; background: var(--border); flex-shrink: 0; }
.search-item-name { font-size: .875rem; font-weight: 500; }
.search-item-price { font-size: .8rem; color: var(--primary); font-weight: 600; }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 4px; }
.header-btn {
  position: relative; width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition); color: var(--text);
}
.header-btn:hover { background: var(--primary-light); color: var(--primary); }
.header-btn .count-badge {
  position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px;
  background: var(--primary); color: #fff; border-radius: var(--radius-full);
  font-size: .65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* Mobile Menu Toggle */
.menu-toggle { display: flex; }
@media(min-width:1024px){ .menu-toggle { display: none; } }

/* Desktop Nav */
.desktop-nav { display: none; }
@media(min-width:1024px){ .desktop-nav { display: flex; align-items: center; gap: 8px; } }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 500; font-size: .875rem;
  transition: all var(--transition); color: var(--text);
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-light); }

/* Mobile Drawer */
.mobile-drawer {
  position: fixed; top: 0; left: 0; width: 280px; height: 100vh;
  background: var(--bg-card); z-index: 1000; transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.drawer-overlay.show { opacity: 1; pointer-events: all; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 16px; border-bottom: 1px solid var(--border); }
.drawer-nav { padding: 16px; flex: 1; }
.drawer-nav-link {
  display: flex; align-items: center; gap: 12px; padding: 13px 12px;
  border-radius: var(--radius-sm); font-weight: 500; font-size: .9rem;
  transition: all var(--transition); color: var(--text); margin-bottom: 4px;
}
.drawer-nav-link:hover, .drawer-nav-link.active { background: var(--primary-light); color: var(--primary); }
.drawer-footer { padding: 16px; border-top: 1px solid var(--border); }

/* ── Bottom Navigation (Mobile) ──────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-h);
  background: var(--bg-card); border-top: 1px solid var(--border);
  display: flex; align-items: center; z-index: 800;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
@media(min-width:1024px){ .bottom-nav { display: none; } }
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; position: relative; transition: color var(--transition);
  color: var(--text-muted); font-size: .65rem; font-weight: 500;
}
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item .count-badge {
  position: absolute; top: 4px; right: 25%; min-width: 16px; height: 16px;
  background: var(--primary); color: #fff; border-radius: var(--radius-full);
  font-size: .6rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* Page content padding for bottom nav */
.page-content { padding-bottom: calc(var(--bottom-nav-h) + 16px); }
@media(min-width:1024px){ .page-content { padding-bottom: 0; } }

/* ── Toast ───────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: calc(var(--bottom-nav-h) + 12px); right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
@media(min-width:1024px){ .toast-container { bottom: 24px; } }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: var(--bg-card); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); min-width: 280px; max-width: 360px;
  animation: slideInRight .3s ease forwards;
  font-size: .875rem; font-weight: 500;
}
.toast.removing { animation: slideOutRight .3s ease forwards; }
.toast-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.toast.success .toast-icon { background: #e8f5e9; color: #2e7d32; }
.toast.error .toast-icon { background: #ffebee; color: #c62828; }
.toast.info .toast-icon { background: var(--primary-light); color: var(--primary); }
.toast.warning .toast-icon { background: var(--secondary-light); color: #c07d00; }
.toast-close { margin-left: auto; color: var(--text-muted); padding: 4px; border-radius: 4px; }
.toast-close:hover { background: var(--border); }

@keyframes slideInRight { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(110%); opacity: 0; } }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1500;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  transform: scale(.95) translateY(20px); transition: transform .25s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header { padding: 24px 24px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1.1rem; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all var(--transition); }
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 0 24px 24px; display: flex; gap: 12px; }

/* ── Loader ──────────────────────────────────────────────── */
.page-loader {
  position: fixed; inset: 0; background: var(--bg); z-index: 9999;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px;
  transition: opacity .4s, visibility .4s;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 48px; height: 48px; border: 4px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-logo { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; }
.loader-logo span { color: var(--primary); }

/* ── Hero Section ────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #fff8f8 0%, #fffdf9 50%, #fffbf0 100%);
  min-height: 560px; display: flex; align-items: center;
}
body.dark .hero { background: linear-gradient(135deg,#1e0f0f 0%,#141414 50%,#1a1500 100%); }
.hero::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle,rgba(255,107,107,.15),transparent 70%);
}
.hero::after {
  content: ''; position: absolute; bottom: -40px; left: -40px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle,rgba(255,179,71,.12),transparent 70%);
}
.hero-content { position: relative; z-index: 1; max-width: 600px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.hero-title { font-size: clamp(2rem,5vw,3.5rem); line-height: 1.15; margin-bottom: 20px; }
.hero-title span { color: var(--primary); }
.hero-desc { font-size: 1rem; color: var(--text-muted); margin-bottom: 32px; max-width: 440px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.hero-stat-num { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; color: var(--primary); }
.hero-stat-label { font-size: .78rem; color: var(--text-muted); }

/* Hero Slider */
.hero-slider { position: relative; overflow: hidden; }
.hero-slider .slide { display: none; }
.hero-slider .slide.active { display: flex; animation: fadeIn .5s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.slider-dots { display: flex; gap: 8px; margin-top: 24px; }
.slider-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--border); transition: all var(--transition); cursor: pointer; }
.slider-dot.active { width: 24px; background: var(--primary); }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; }
.slider-nav-prev { left: 12px; }
.slider-nav-next { right: 12px; }
.slider-btn {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center;
  color: var(--text); transition: all var(--transition);
}
.slider-btn:hover { background: var(--primary); color: #fff; }

/* ── Category Grid ───────────────────────────────────────── */
.category-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media(min-width:768px){ .category-grid { grid-template-columns: repeat(4,1fr); gap: 16px; } }
@media(min-width:1024px){ .category-grid { grid-template-columns: repeat(6,1fr); } }
.category-card {
  background: var(--bg-card); border-radius: var(--radius-md); padding: 20px 12px;
  text-align: center; transition: all var(--transition); border: 1px solid var(--border);
  cursor: pointer;
}
.category-card:hover { border-color: var(--primary); box-shadow: 0 6px 20px rgba(255,107,107,.12); transform: translateY(-3px); }
.category-icon { font-size: 2rem; margin-bottom: 10px; line-height: 1; }
.category-name { font-size: .8rem; font-weight: 600; color: var(--text); }
.category-count { font-size: .72rem; color: var(--text-muted); margin-top: 3px; }

/* ── Product Grid ────────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
@media(min-width:768px){ .product-grid { grid-template-columns: repeat(3,1fr); gap: 16px; } }
@media(min-width:1024px){ .product-grid { grid-template-columns: repeat(4,1fr); } }

.product-card {
  background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border); transition: all var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-img-wrap { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--border); }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-badge-wrap { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 4px; }
.product-wishlist {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center; transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.product-wishlist:hover, .product-wishlist.active { background: #ffebee; color: var(--primary); }
.product-wishlist.active svg { fill: var(--primary); }
.product-info { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-name { font-size: .875rem; font-weight: 600; margin-bottom: 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.stars { color: #ffc107; font-size: .8rem; letter-spacing: -1px; }
.rating-count { font-size: .75rem; color: var(--text-muted); }
.product-price-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.product-price { font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--text); }
.product-price-old { font-size: .8rem; color: var(--text-muted); text-decoration: line-through; }
.product-price-off { font-size: .75rem; color: #2e7d32; font-weight: 600; }
.product-add-btn {
  margin-top: auto; width: 100%; padding: 10px;
  background: var(--primary-light); color: var(--primary); border-radius: var(--radius-sm);
  font-weight: 600; font-size: .8rem; transition: all var(--transition);
}
.product-add-btn:hover { background: var(--primary); color: #fff; }

/* ── Filters / Sort Bar ──────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 16px; background: var(--bg-card); border-radius: var(--radius-md);
  border: 1px solid var(--border); margin-bottom: 20px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  padding: 6px 14px; border-radius: var(--radius-full);
  border: 1.5px solid var(--border); font-size: .8rem; font-weight: 500;
  transition: all var(--transition); cursor: pointer; color: var(--text);
}
.filter-chip:hover, .filter-chip.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.sort-select {
  padding: 8px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text); font-size: .85rem; outline: none;
  cursor: pointer;
}

/* ── Product Details ─────────────────────────────────────── */
.product-detail-layout {
  display: grid; gap: 32px;
}
@media(min-width:768px){ .product-detail-layout { grid-template-columns: 1fr 1fr; } }
.gallery-main { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 1; background: var(--border); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; }
.gallery-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color var(--transition); flex-shrink: 0; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-name { font-size: clamp(1.2rem,3vw,1.6rem); margin-bottom: 12px; }
.product-detail-price { font-size: 1.5rem; font-weight: 800; color: var(--primary); font-family: var(--font-head); }
.quantity-control { display: inline-flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: background var(--transition); }
.qty-btn:hover { background: var(--primary-light); color: var(--primary); }
.qty-value { width: 48px; text-align: center; font-weight: 600; font-size: .9rem; border: none; border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border); outline: none; background: transparent; color: var(--text); padding: 8px 0; }
.detail-action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.detail-action-row .btn { flex: 1; min-width: 140px; }

/* Delivery badge */
.delivery-info { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--primary-light); border-radius: var(--radius-sm); margin-top: 16px; }
.delivery-date { font-weight: 700; color: var(--primary); }

/* Gift Message */
.gift-message-wrap { background: var(--secondary-light); border-radius: var(--radius-md); padding: 16px; margin-top: 16px; }
.gift-message-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 600; }

/* Reviews */
.review-card { padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-card); margin-bottom: 12px; }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.reviewer-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--secondary)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.reviewer-name { font-weight: 600; font-size: .875rem; }
.review-date { font-size: .75rem; color: var(--text-muted); }
.review-text { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }

/* ── Cart ────────────────────────────────────────────────── */
.cart-layout { display: grid; gap: 20px; }
@media(min-width:1024px){ .cart-layout { grid-template-columns: 1fr 360px; } }
.cart-item {
  display: flex; gap: 14px; padding: 16px; background: var(--bg-card);
  border-radius: var(--radius-md); border: 1px solid var(--border); align-items: flex-start;
}
.cart-item-img { width: 80px; height: 80px; border-radius: var(--radius-sm); object-fit: cover; background: var(--border); flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.cart-item-variant { font-size: .78rem; color: var(--text-muted); }
.cart-item-price { font-weight: 700; color: var(--primary); font-family: var(--font-head); }
.cart-item-remove { color: var(--text-muted); font-size: .78rem; transition: color var(--transition); margin-top: 4px; display: inline-block; }
.cart-item-remove:hover { color: #e53935; }
.cart-summary { background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border); padding: 20px; height: fit-content; position: sticky; top: calc(var(--header-h) + 16px); }
.cart-summary h3 { margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.summary-row:last-child { border-bottom: none; }
.summary-row.total { font-weight: 700; font-size: 1rem; }
.summary-row.total .value { color: var(--primary); }
.coupon-row { display: flex; gap: 8px; margin: 16px 0; }
.coupon-row input { flex: 1; }

/* ── Checkout Steps ──────────────────────────────────────── */
.checkout-steps {
  display: flex; align-items: center; gap: 0; margin-bottom: 32px; overflow: hidden;
}
.checkout-step { flex: 1; text-align: center; position: relative; }
.checkout-step::after {
  content: ''; position: absolute; top: 18px; left: 50%; width: 100%; height: 2px;
  background: var(--border); z-index: 0;
}
.checkout-step:last-child::after { display: none; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: .85rem; margin: 0 auto 6px;
  position: relative; z-index: 1; transition: all var(--transition);
  background: var(--border); color: var(--text-muted);
}
.checkout-step.active .step-circle { background: var(--primary); color: #fff; }
.checkout-step.done .step-circle { background: #2e7d32; color: #fff; }
.step-label { font-size: .72rem; font-weight: 600; color: var(--text-muted); }
.checkout-step.active .step-label { color: var(--primary); }

/* ── Payment ─────────────────────────────────────────────── */
.payment-method-card {
  border: 2px solid var(--border); border-radius: var(--radius-md); padding: 16px;
  cursor: pointer; transition: all var(--transition); display: flex; align-items: center; gap: 14px; margin-bottom: 12px;
}
.payment-method-card:hover { border-color: var(--primary); }
.payment-method-card.selected { border-color: var(--primary); background: var(--primary-light); }
.payment-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--transition); }
.payment-method-card.selected .payment-radio { border-color: var(--primary); }
.payment-radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); display: none; }
.payment-method-card.selected .payment-radio::after { display: block; }
.payment-method-icon { font-size: 1.6rem; }
.payment-method-name { font-weight: 600; font-size: .9rem; }
.payment-method-desc { font-size: .78rem; color: var(--text-muted); }
.payment-details { margin-top: 16px; padding: 16px; border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--border); display: none; }
.payment-details.show { display: block; }

/* ── Order Success ───────────────────────────────────────── */
.success-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; padding: 40px 16px; }
.success-animation { width: 100px; height: 100px; margin: 0 auto 24px; }
.success-circle { stroke: #2e7d32; stroke-width: 3; fill: none; stroke-dasharray: 283; stroke-dashoffset: 283; animation: drawCircle .6s ease .3s forwards; }
.success-check { stroke: #2e7d32; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: drawCheck .4s ease 1s forwards; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.success-title { font-size: 1.8rem; margin-bottom: 12px; }
.success-title span { color: #2e7d32; }
.success-desc { color: var(--text-muted); margin-bottom: 32px; max-width: 400px; }
.order-id-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-full); background: var(--secondary-light); color: #c07d00; font-weight: 700; font-family: var(--font-head); margin-bottom: 32px; }

/* ── Profile ─────────────────────────────────────────────── */
.profile-hero { background: linear-gradient(135deg,var(--primary),var(--secondary)); border-radius: var(--radius-lg); padding: 32px; color: #fff; display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; border: 3px solid rgba(255,255,255,.5); flex-shrink: 0; }
.profile-name { font-size: 1.2rem; font-weight: 700; }
.profile-email { font-size: .85rem; opacity: .85; }
.profile-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.profile-tab { padding: 12px 20px; font-weight: 600; font-size: .875rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; cursor: pointer; transition: all var(--transition); }
.profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.profile-tab-content { display: none; }
.profile-tab-content.active { display: block; }
.order-item { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: 12px; }
.order-img { width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; background: var(--border); flex-shrink: 0; }
.order-status { padding: 4px 10px; border-radius: var(--radius-full); font-size: .72rem; font-weight: 600; }
.order-status.delivered { background: #e8f5e9; color: #2e7d32; }
.order-status.pending { background: var(--secondary-light); color: #c07d00; }
.order-status.cancelled { background: #ffebee; color: #c62828; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: #1a1a2e; color: #a0a0b8; padding: 48px 0 24px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px; }
@media(min-width:768px){ .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .logo-text { color: #fff; }
.footer-brand .logo-text span { color: var(--primary); }
.footer-desc { font-size: .85rem; margin-top: 12px; line-height: 1.7; }
.footer-title { color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .95rem; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: .85rem; transition: color var(--transition); }
.footer-link:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; font-size: .8rem; }
.social-links { display: flex; gap: 10px; }
.social-link { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; transition: all var(--transition); font-size: .85rem; }
.social-link:hover { background: var(--primary); color: #fff; }
.newsletter-row { display: flex; gap: 8px; margin-top: 14px; }
.newsletter-row input { flex: 1; padding: 10px 14px; border-radius: var(--radius-sm); border: none; background: rgba(255,255,255,.08); color: #fff; font-size: .85rem; outline: none; }
.newsletter-row input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-row .btn { padding: 10px 16px; border-radius: var(--radius-sm); }

/* ── Search Overlay (Mobile) ─────────────────────────────── */
.search-overlay {
  position: fixed; inset: 0; z-index: 950; background: var(--bg);
  display: flex; flex-direction: column; transform: translateY(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.search-overlay.open { transform: translateY(0); }
.search-overlay-header { padding: 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.search-overlay-input {
  flex: 1; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg-card); color: var(--text); font-size: 1rem; outline: none;
}
.search-overlay-input:focus { border-color: var(--primary); }
.search-overlay-body { flex: 1; padding: 16px; overflow-y: auto; }
.search-tag-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.search-tag { padding: 6px 14px; border-radius: var(--radius-full); background: var(--primary-light); color: var(--primary); font-size: .8rem; font-weight: 500; cursor: pointer; }

/* ── Misc ────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.sticky-bottom-bar {
  position: sticky; bottom: var(--bottom-nav-h); z-index: 700;
  padding: 12px 16px; background: var(--bg-card); border-top: 1px solid var(--border);
}
@media(min-width:1024px){ .sticky-bottom-bar { display: none; } }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.empty-desc { color: var(--text-muted); font-size: .875rem; margin-bottom: 24px; }
.skeleton { background: linear-gradient(90deg,var(--border) 25%,var(--bg) 50%,var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { from { background-position: 200% center; } to { background-position: -200% center; } }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Dark mode toggle ────────────────────────────────────── */
.dark-toggle {
  width: 40px; height: 22px; border-radius: var(--radius-full); background: var(--border); position: relative;
  transition: background var(--transition); cursor: pointer; border: none; flex-shrink: 0;
}
.dark-toggle.on { background: var(--primary); }
.dark-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform var(--transition);
}
.dark-toggle.on::after { transform: translateX(18px); }

/* ── Page-specific spacers ───────────────────────────────── */
.page-header { padding: 24px 0 8px; }
.page-header h1 { font-size: clamp(1.3rem,3vw,1.8rem); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-muted); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-light); }

/* ── Responsive tweaks ───────────────────────────────────── */
@media(max-width:480px){
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .profile-hero { flex-direction: column; text-align: center; }
}
