/* ============================================
   Joybox Hamper - Main Stylesheet
   Made to Surprise
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --cream: #FBF7F0;
  --gold: #A86B16;
  --light-gold: #B47A24;
  --brown: #2C160D;
  --blush: #ECB5B7;
  --beige: #EAD8C2;
  --white: #FFFFFF;
  --dark: #32180D;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(44,22,13,0.08);
  --shadow-md: 0 4px 16px rgba(44,22,13,0.1);
  --shadow-lg: 0 8px 32px rgba(44,22,13,0.12);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
ul { list-style: none; }

/* ---------- Utilities ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-brown { color: var(--brown); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 0.95rem; transition: all var(--transition); min-height: 44px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold); color: var(--white);
}
.btn-primary:hover { background: #8F5A12; }
.btn-secondary {
  background: var(--brown); color: var(--white);
}
.btn-secondary:hover { background: #3D2013; }
.btn-outline {
  border: 2px solid var(--gold); color: var(--gold); background: transparent;
}
.btn-outline:hover { background: var(--gold); color: var(--white); }
.btn-blush {
  background: var(--blush); color: var(--brown);
}
.btn-blush:hover { background: #f0b0b3; }
.btn-whatsapp {
  background: #25D366; color: var(--white);
}
.btn-whatsapp:hover { background: #1da851; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Announcement Bar ---------- */
.announcement-bar {
  position: relative;
  width: 100%;
  height: 44px;
  overflow: hidden;
  z-index: 99;
}

.announcement-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.announcement-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 48px;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

.announcement-slide.active {
  opacity: 1;
  z-index: 1;
}

.ann-title {
  font-weight: 600;
}

.ann-sep {
  opacity: 0.5;
  font-weight: 300;
}

.ann-msg {
  opacity: 0.9;
}

.ann-cta {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ann-arrow {
  display: inline-block;
  margin-left: 2px;
}

.announcement-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  color: inherit;
}

.announcement-btn:hover {
  opacity: 1;
}

.announcement-prev {
  left: 8px;
}

.announcement-next {
  right: 8px;
}

@media (max-width: 599px) {
  .announcement-bar {
    height: 40px;
  }

  .announcement-slide {
    font-size: 0.75rem;
    padding: 0 36px;
    gap: 4px;
  }

  .ann-msg {
    display: none;
  }

  .ann-sep {
    display: none;
  }

  .announcement-btn {
    font-size: 1rem;
    padding: 2px 6px;
  }

  .announcement-prev {
    left: 4px;
  }

  .announcement-next {
    right: 4px;
  }
}

/* ---------- Header ---------- */
.header {
  background: var(--white); position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; max-width: 1200px; margin: 0 auto;
}
.header-logo {
  display: flex; align-items: center; gap: 8px;
}
.header-logo svg { height: 34px; width: auto; display: block; }
.header-actions {
  display: flex; align-items: center; gap: 4px;
}
.header-btn {
  width: 44px; height: 44px; display: flex; align-items: center;
  justify-content: center; border-radius: 50%; position: relative;
  transition: background var(--transition); font-size: 1.2rem;
}
.header-btn:hover { background: var(--beige); }
.cart-badge {
  position: absolute; top: 4px; right: 4px; background: var(--gold);
  color: var(--white); font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cart-badge:empty { display: none; }

/* ---------- Mobile Menu ---------- */
.menu-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 200; opacity: 0; visibility: hidden; transition: all var(--transition);
}
.menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
  background: var(--white); z-index: 201; transform: translateX(-100%);
  transition: transform var(--transition); overflow-y: auto;
}
.mobile-menu.active { transform: translateX(0); }
.menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--beige);
}
.menu-header span { font-weight: 700; color: var(--brown); font-size: 1.1rem; }
.menu-close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.menu-links { padding: 8px 0; }
.menu-link {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  font-size: 0.95rem; color: var(--dark); transition: background var(--transition);
  min-height: 48px;
}
.menu-link:hover { background: var(--cream); }
.menu-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.menu-divider { height: 1px; background: var(--beige); margin: 8px 16px; }

/* ---------- Desktop Navigation Dropdown ---------- */
.header-relative { position: relative; }
.desktop-nav {
  position: absolute; top: 100%; left: 0;
  background: var(--white); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg); min-width: 220px; padding: 8px 0;
  z-index: 150; opacity: 0; visibility: hidden;
  transform: translateY(-4px); transition: all var(--transition);
}
.desktop-nav.active { opacity: 1; visibility: visible; transform: translateY(0); }
.desktop-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; font-size: 0.9rem; color: var(--dark);
  transition: background var(--transition); min-height: 44px;
}
.desktop-nav-link:hover { background: var(--cream); color: var(--brown); font-weight: 500; }
.desktop-nav-divider { height: 1px; background: var(--beige); margin: 4px 16px; }
@media (max-width: 899px) { .desktop-nav { display: none; } }

/* ---------- Search Overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; background: var(--white); z-index: 300;
  transform: translateY(-100%); transition: transform 0.3s ease;
}
.search-overlay.active { transform: translateY(0); }
.search-overlay-inner { padding: 16px; max-width: 600px; margin: 0 auto; }
.search-bar {
  display: flex; align-items: center; gap: 8px;
}
.search-input {
  flex: 1; padding: 12px 16px; border: 2px solid var(--beige);
  border-radius: var(--radius-sm); font-size: 1rem; outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--gold); }
.search-close-btn { width: 44px; height: 44px; font-size: 1.3rem; }

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  background: #FBF7F0;
  min-height: 720px;
  display: flex;
  align-items: center;
  padding: 120px 32px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(168, 107, 22, 0.06) 0%, rgba(168, 107, 22, 0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #887A70;
  display: block;
  margin: 0 auto 24px;
  animation: heroFadeUp 0.7s ease both;
}

.hero-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1.1;
  color: #2C160D;
  max-width: 1050px;
  margin: 0 auto 20px;
  animation: heroFadeUp 0.7s ease 0.15s both;
}

.hero-heading em {
  color: #A86B16;
  font-style: italic;
  font-weight: 500;
}

.hero-desc {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.1rem;
  color: #887A70;
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: heroFadeUp 0.7s ease 0.3s both;
}

.hero-btns {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  animation: heroFadeUp 0.7s ease 0.45s both;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: #32180D;
  color: #FBF7F0;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration: none;
  min-height: 52px;
  letter-spacing: 0.3px;
}

.btn-hero-primary:hover {
  background: #4a2816;
}

.btn-hero-primary .btn-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.btn-hero-primary:hover .btn-arrow {
  transform: translateX(5px);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  background: transparent;
  color: #A86B16;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid #B47A24;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration: none;
  min-height: 52px;
  letter-spacing: 0.3px;
}

.btn-hero-secondary:hover {
  background: rgba(168, 107, 22, 0.08);
}

@media (max-width: 900px) {
  .hero {
    padding: 100px 24px 80px;
    min-height: auto;
  }

  .hero-heading {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
    max-width: 100%;
  }

  .hero-desc {
    font-size: 1rem;
    max-width: 100%;
  }

  .hero-btns {
    flex-direction: column;
    gap: 14px;
    width: 100%;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 599px) {
  .hero {
    padding: 80px 20px 60px;
  }

  .hero-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 3px;
    margin-bottom: 16px;
  }

  .hero-heading {
    font-size: clamp(1.8rem, 10vw, 2.4rem);
    line-height: 1.15;
  }

  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 32px;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    padding: 14px 28px;
    font-size: 0.9rem;
    min-height: 48px;
  }
}

/* ---------- Decorative Elements (Shop page etc.) ---------- */
.hero-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.decor-item {
  position: absolute; color: var(--brown); opacity: 0.44;
  animation: decorFloat 7s ease-in-out infinite;
}
.decor-item[data-anim="float"] { animation-name: decorFloat; }
.decor-item[data-anim="drift"] { animation-name: decorDrift; }
.decor-item[data-anim="sway"] { animation-name: decorSway; }
.decor-item[data-anim="rise"] { animation-name: decorRise; }
.decor-item:nth-child(2) { color: var(--gold); opacity: 0.38; animation-duration: 9s; }
.decor-item:nth-child(3) { color: var(--brown); opacity: 0.40; animation-duration: 8s; }
.decor-item:nth-child(4) { color: var(--gold); opacity: 0.35; animation-duration: 10s; }
.decor-item:nth-child(5) { color: var(--blush); opacity: 0.44; animation-duration: 7s; }
.decor-item:nth-child(6) { color: var(--brown); opacity: 0.35; animation-duration: 11s; }
.decor-item:nth-child(7) { color: var(--gold); opacity: 0.38; animation-duration: 9s; }
.decor-item:nth-child(8) { color: var(--brown); opacity: 0.32; animation-duration: 8s; }
.decor-item:nth-child(9) { color: var(--gold); opacity: 0.38; animation-duration: 11s; }
.decor-item:nth-child(10) { color: var(--brown); opacity: 0.42; animation-duration: 9s; }
.decor-item:nth-child(11) { color: var(--blush); opacity: 0.36; animation-duration: 12s; }
.decor-item:nth-child(12) { color: var(--gold); opacity: 0.34; animation-duration: 10s; }
.decor-item:nth-child(13) { color: var(--brown); opacity: 0.40; animation-duration: 8s; }
.decor-item:nth-child(14) { color: var(--gold); opacity: 0.36; animation-duration: 11s; }
.decor-item:nth-child(15) { color: var(--blush); opacity: 0.38; animation-duration: 10s; }
.decor-item:nth-child(16) { color: var(--brown); opacity: 0.34; animation-duration: 9s; }
.heading-sparkle { opacity: 0.55 !important; }
.heading-sparkle:nth-child(17) { color: var(--gold); animation-duration: 6s; }
.heading-sparkle:nth-child(18) { color: var(--blush); animation-duration: 8s; }
.heading-sparkle:nth-child(19) { color: var(--gold); animation-duration: 5s; }
.heading-sparkle:nth-child(20) { color: var(--brown); animation-duration: 7s; }
.heading-sparkle:nth-child(21) { color: var(--gold); animation-duration: 9s; }
.heading-sparkle:nth-child(22) { color: var(--blush); animation-duration: 6s; }
.heading-sparkle:nth-child(23) { color: var(--gold); animation-duration: 8s; }
.heading-sparkle:nth-child(24) { color: var(--brown); animation-duration: 5s; }
.heading-sparkle:nth-child(25) { color: var(--blush); animation-duration: 7s; }
.heading-sparkle:nth-child(26) { color: var(--gold); animation-duration: 9s; }
.heading-sparkle:nth-child(27) { color: var(--brown); animation-duration: 6s; }
.heading-sparkle:nth-child(28) { color: var(--blush); animation-duration: 8s; }
.decor-item svg { width: 100%; height: auto; display: block; }

@keyframes decorFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(1.5deg); }
  66% { transform: translateY(-4px) rotate(-1deg); }
}
@keyframes decorDrift {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(10px) rotate(2deg); }
}
@keyframes decorSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(6deg); }
}
@keyframes decorRise {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.04); }
}

.hero-char {
  position: absolute;
  bottom: -20px;
  width: 32%;
  max-width: 440px;
  min-width: 250px;
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.52;
  mix-blend-mode: multiply;
  filter: contrast(0.95) brightness(1.02);
  transition: all 0.5s ease;
}

.hero-char-left {
  left: 2%;
  transform-origin: bottom center;
  animation: charPlayfulDance 10s ease-in-out infinite;
}

.hero-char-right {
  right: 2%;
  transform-origin: bottom center;
  animation: charPlayfulBounce 12s ease-in-out infinite;
}

@keyframes charPlayfulDance {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  25% { transform: translateY(-14px) rotate(-3deg) scale(1.02); }
  50% { transform: translateY(-4px) rotate(2deg) scale(0.99); }
  75% { transform: translateY(-16px) rotate(-1deg) scale(1.03); }
}

@keyframes charPlayfulBounce {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  33% { transform: translateY(-6px) rotate(4deg) scale(0.98); }
  66% { transform: translateY(-18px) rotate(-3deg) scale(1.04); }
}

@media (max-width: 900px) {
  .hero-char {
    width: 28%;
    min-width: 180px;
    opacity: 0.40;
    bottom: -12px;
  }
  .hero-char-left { left: 1%; }
  .hero-char-right { right: 1%; }
}

@media (max-width: 680px) {
  .hero-char {
    width: 22%;
    min-width: 130px;
    opacity: 0.28;
    bottom: -8px;
  }
  .hero-char-left { left: -10px; }
  .hero-char-right { right: -10px; }
}

@media (max-width: 599px) {
  .decor-item { transform: scale(0.65); }
  .decor-item:nth-child(n+7) { display: none; }
}

/* ---------- Section Titles ---------- */
.section-title {
  text-align: center; margin-bottom: 32px;
}
.section-title h2 {
  font-size: 1.5rem; color: var(--brown); margin-bottom: 4px;
}
.section-title p {
  color: var(--dark); opacity: 0.7; font-size: 0.95rem;
}
.section-title .line {
  width: 48px; height: 3px; background: var(--gold);
  margin: 12px auto 0; border-radius: 2px;
}

/* ---------- Category Carousel Section ---------- */
.categories-section { padding: 40px 0; }
.category-carousel { position: relative; }
.category-carousel-heading {
  text-align: center; padding: 0 16px 12px;
}
.category-carousel-heading h2 {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.4rem; font-weight: 700; color: var(--brown);
  margin: 0 0 4px; letter-spacing: -0.3px;
}
.category-carousel-heading p {
  font-size: 0.85rem; color: var(--dark); opacity: 0.65; margin: 0 0 8px;
}
.category-carousel-heading .line {
  width: 40px; height: 2px; background: var(--gold);
  margin: 0 auto 10px; border-radius: 1px;
}
.category-carousel-heading .swipe-hint {
  font-size: 0.72rem; color: var(--gold); font-weight: 500;
  letter-spacing: 0.5px; opacity: 0.8; margin: 0;
  animation: swipePulse 2s ease-in-out infinite;
}
@keyframes swipePulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}
.category-carousel-wrap {
  position: relative; display: flex; align-items: center;
}
.category-track {
  display: flex; gap: 22px; overflow-x: auto; padding: 8px 24px 16px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; cursor: grab;
  scroll-padding-left: 24px;
}
.category-track::-webkit-scrollbar { display: none; }
.category-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.category-track.dragging * { pointer-events: none; }
.category-card {
  flex-shrink: 0; scroll-snap-align: start; text-align: center;
  cursor: pointer; transition: transform 0.3s ease; text-decoration: none;
  user-select: none; -webkit-user-select: none;
}
.category-card:hover { transform: translateY(-4px); }
.category-card:active { transform: translateY(-1px) scale(0.98); }
.category-card.circle .category-img-wrap {
  width: 110px; height: 110px; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--light-gold); margin: 0 auto 10px;
  position: relative; box-shadow: 0 4px 16px rgba(44, 22, 13, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.category-card.circle:hover .category-img-wrap {
  transform: scale(1.06); box-shadow: 0 6px 24px rgba(44, 22, 13, 0.2);
  border-color: var(--gold);
}
.category-card .category-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.category-card:hover .category-img { transform: scale(1.1); }
.category-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(180deg, rgba(251, 247, 240, 0.08) 0%, rgba(168, 107, 22, 0.12) 100%);
  pointer-events: none; z-index: 1;
}
.category-card .category-name {
  font-size: 0.78rem; font-weight: 600; color: var(--brown);
  letter-spacing: 0.3px; margin-top: 2px; white-space: nowrap;
}

/* ---------- Carousel Arrows ---------- */
.carousel-arrow {
  display: none; position: absolute; top: 50%; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--light-gold);
  color: var(--brown); font-size: 1.3rem; font-weight: 700;
  cursor: pointer; transform: translateY(-20%);
  box-shadow: 0 2px 10px rgba(44, 22, 13, 0.12);
  transition: opacity 0.3s ease, background 0.2s ease, transform 0.2s ease;
  line-height: 1; padding: 0; text-align: center;
}
.carousel-arrow:hover:not(.faded):not(:disabled) {
  background: var(--cream); border-color: var(--gold);
  transform: translateY(-20%) scale(1.08);
}
.carousel-arrow.faded,
.carousel-arrow:disabled {
  opacity: 0.25; cursor: default; pointer-events: none;
}
.carousel-arrow-left { left: 6px; }
.carousel-arrow-right { right: 6px; }

@media (min-width: 900px) {
  .carousel-arrow { display: flex; align-items: center; justify-content: center; }
  .category-carousel-heading h2 { font-size: 1.6rem; }
  .category-card.circle .category-img-wrap { width: 130px; height: 130px; }
  .category-track { gap: 32px; padding: 12px 48px 20px; scroll-padding-left: 48px; }
  .category-card .category-name { font-size: 0.85rem; }
}

@media (max-width: 899px) {
  .swipe-hint { display: block !important; }
  .category-track { padding-left: 24px; scroll-padding-left: 24px; }
}
@media (min-width: 900px) {
  .swipe-hint { display: none !important; }
}

/* ---------- Product Grid (Homepage fallback) ---------- */
.products-section { padding: 40px 0; }

/* ---------- Shop by Occasion ---------- */
.occasion-section { padding: 40px 0; background: var(--beige); }
.occasion-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding: 0 16px;
}
.occasion-card {
  background: var(--white); border-radius: var(--radius); padding: 20px 16px;
  text-align: center; box-shadow: var(--shadow); transition: all var(--transition);
  min-height: 80px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.occasion-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.occasion-card .emoji { font-size: 1.5rem; margin-bottom: 6px; }
.occasion-card .name { font-size: 0.9rem; font-weight: 600; color: var(--brown); }

/* ---------- Custom Order Banner ---------- */
.custom-banner {
  padding: 40px 16px; text-align: center;
  background: var(--brown); color: var(--light-gold);
}
.custom-banner h2 { font-size: 1.5rem; margin-bottom: 8px; color: var(--white); }
.custom-banner p { margin-bottom: 20px; opacity: 0.9; font-size: 0.95rem; }

/* ---------- Recent Creations ---------- */
.creations-section { padding: 40px 0; }
.creations-scroll {
  display: flex; gap: 16px; overflow-x: auto; padding: 8px 16px 16px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.creations-scroll::-webkit-scrollbar { display: none; }
.creation-card {
  flex-shrink: 0; width: 220px; scroll-snap-align: start;
  border-radius: var(--radius); overflow: hidden; background: var(--white);
  box-shadow: var(--shadow);
}
.creation-card img { width: 220px; height: 220px; object-fit: cover; }
.creation-card .creation-info { padding: 12px; }
.creation-card .creation-title { font-size: 0.9rem; font-weight: 600; color: var(--brown); }

/* ---------- Reviews ---------- */
.reviews-section { padding: 40px 0; background: var(--beige); }
.reviews-scroll {
  display: flex; gap: 16px; overflow-x: auto; padding: 8px 16px 16px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.reviews-scroll::-webkit-scrollbar { display: none; }
.review-card {
  flex-shrink: 0; width: 280px; scroll-snap-align: start;
  background: var(--white); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.review-card .stars { color: var(--gold); margin-bottom: 8px; font-size: 0.9rem; }
.review-card .review-text {
  font-size: 0.9rem; color: var(--dark); margin-bottom: 12px;
  line-height: 1.5; font-style: italic;
}
.review-card .reviewer { font-size: 0.8rem; font-weight: 600; color: var(--brown); }

/* ---------- Why Joybox ---------- */
.why-section { padding: 40px 0; }
.why-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; padding: 0 16px;
}
.why-card {
  text-align: center; padding: 24px 16px; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.why-card .why-icon { font-size: 2rem; margin-bottom: 8px; }
.why-card h3 { font-size: 0.95rem; color: var(--brown); margin-bottom: 4px; }
.why-card p { font-size: 0.8rem; opacity: 0.7; }

/* ---------- Footer ---------- */
.footer {
  background: var(--brown); color: var(--light-gold); padding: 40px 16px 20px;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; max-width: 1200px; margin: 0 auto;
}
.footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 12px; }
.footer p, .footer a { font-size: 0.85rem; opacity: 0.85; line-height: 1.8; }
.footer a:hover { opacity: 1; color: var(--gold); }
.footer-bottom {
  text-align: center; margin-top: 32px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.8rem; opacity: 0.6;
}

/* ---------- Page Header ---------- */
.page-header {
  background: var(--beige); padding: 32px 16px; text-align: center;
}
.page-header h1 { font-size: 1.5rem; color: var(--brown); }
.page-header p { font-size: 0.9rem; color: var(--dark); opacity: 0.7; margin-top: 4px; }

/* ---------- Shop Header ---------- */
.shop-header {
  position: relative; padding: 44px 20px 48px; text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, var(--cream) 0%, #f6efe5 50%, var(--beige) 100%);
}
.shop-header .hero-decor { z-index: 0; }
.shop-header .hero-char { bottom: -16px; opacity: 0.4; z-index: 1; }
.shop-header .hero-char-left { left: 1%; }
.shop-header .hero-char-right { right: 1%; }
.shop-header-content {
  position: relative; z-index: 2; max-width: 640px; margin: 0 auto;
}
.shop-header-content h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(42px, 7vw, 76px); color: var(--brown);
  font-weight: 600; letter-spacing: -0.04em; line-height: 0.95;
  margin-bottom: 10px;
}
.shop-header-content p {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.1rem); color: #887A70;
  font-weight: 400; letter-spacing: 0.2px;
}

/* ---------- Shop Toolbar ---------- */
.shop-toolbar {
  background: var(--white); border-bottom: 1px solid var(--beige);
  position: sticky; top: 0; z-index: 20;
}
.shop-toolbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 12px 20px;
}
.toolbar-row {
  display: flex; align-items: center; gap: 12px;
}
.toolbar-top { margin-bottom: 10px; }
.toolbar-search {
  position: relative; flex: 1; max-width: 480px;
}
.toolbar-search .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #bbb; pointer-events: none;
}
.toolbar-search input {
  width: 100%; padding: 10px 14px 10px 40px;
  border: 1.5px solid var(--beige); border-radius: 24px; outline: none;
  font-size: 0.88rem; background: var(--cream); color: var(--dark);
  transition: all var(--transition);
}
.toolbar-search input:focus {
  border-color: var(--gold); background: var(--white);
  box-shadow: 0 0 0 3px rgba(168, 107, 22, 0.1);
}
.toolbar-search input::placeholder { color: #bbb; }
.toolbar-bottom {
  justify-content: space-between; flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; }
.product-count {
  font-size: 0.82rem; color: #999; font-weight: 500;
}
.toolbar-right {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.sort-wrapper {
  position: relative; display: inline-flex; align-items: center;
}
.sort-wrapper select {
  appearance: none; -webkit-appearance: none; padding: 9px 36px 9px 14px;
  border: 1.5px solid var(--beige); border-radius: 24px; font-size: 0.82rem;
  background: var(--white); color: var(--dark); outline: none; cursor: pointer;
  font-weight: 500; min-width: 140px; transition: border-color var(--transition);
}
.sort-wrapper select:focus { border-color: var(--gold); }
.sort-wrapper .sort-chevron {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: #999; pointer-events: none;
}
.toolbar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border: 1.5px solid var(--beige); border-radius: 24px;
  font-size: 0.82rem; font-weight: 600; background: var(--white);
  color: var(--brown); cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.toolbar-btn:hover { border-color: var(--gold); background: var(--cream); }
.toolbar-btn.filter-btn svg { flex-shrink: 0; }
.clear-all-btn { color: var(--gold); border-color: var(--gold); }
.clear-all-btn:hover { background: rgba(168, 107, 22, 0.08); }

/* ---------- Active Filter Chips ---------- */
.active-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--beige);
}
.filter-chip-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 16px; font-size: 0.75rem;
  font-weight: 500; background: var(--cream); color: var(--brown);
  border: 1px solid var(--beige);
}
.filter-chip-sm .chip-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; border: none;
  background: transparent; color: #999; cursor: pointer;
  font-size: 0.8rem; line-height: 1; padding: 0;
  transition: all var(--transition);
}
.filter-chip-sm .chip-remove:hover { background: var(--beige); color: var(--brown); }

/* ---------- Filter Drawer ---------- */
.filter-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 100; opacity: 0; visibility: hidden;
  transition: all 0.3s ease;
}
.filter-overlay.active { opacity: 1; visibility: visible; }

.filter-drawer {
  position: fixed; top: 0; right: 0; width: 380px; max-width: 90vw;
  height: 100vh; background: var(--white); z-index: 110;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
}
.filter-drawer.open { transform: translateX(0); }

.filter-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--beige); flex-shrink: 0;
}
.filter-drawer-header h3 {
  font-size: 1.1rem; font-weight: 700; color: var(--brown); margin: 0;
}
.filter-drawer-close {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--cream); color: var(--brown); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.filter-drawer-close:hover { background: var(--beige); }

.filter-drawer-body {
  flex: 1; overflow-y: auto; padding: 20px 24px;
}
.filter-group { margin-bottom: 24px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group-title {
  font-size: 0.72rem; font-weight: 700; color: #999;
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px;
}
.filter-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.filter-chips .filter-chip {
  flex-shrink: 0; padding: 8px 18px; border-radius: 20px;
  border: 1.5px solid var(--beige); font-size: 0.8rem; font-weight: 500;
  background: var(--white); color: var(--dark); transition: all var(--transition);
  cursor: pointer; min-height: 36px; display: flex; align-items: center;
}
.filter-chips .filter-chip:hover { border-color: var(--light-gold); }
.filter-chips .filter-chip.active {
  border-color: var(--gold); background: rgba(168, 107, 22, 0.1); color: var(--brown);
  font-weight: 600;
}

.filter-drawer-footer {
  display: flex; gap: 10px; padding: 16px 24px;
  border-top: 1px solid var(--beige); flex-shrink: 0;
}
.filter-drawer-footer .btn { flex: 1; }

/* ---------- Shop Empty State ---------- */
.shop-empty {
  text-align: center; padding: 64px 20px;
}
.shop-empty-icon { margin-bottom: 16px; opacity: 0.6; }
.shop-empty h3 {
  font-size: 1.1rem; color: var(--brown); margin-bottom: 6px;
}
.shop-empty p {
  font-size: 0.9rem; color: #999; margin-bottom: 20px;
}

/* ---------- Product Grid Improvements ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; padding: 0;
}
.product-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: all var(--transition);
  position: relative; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.product-card .product-img-wrap {
  display: block; position: relative; padding-top: 100%; overflow: hidden;
  background: var(--beige);
}
.product-card.portrait .product-img-wrap { padding-top: 130%; }
.product-card.wide .product-img-wrap { padding-top: 60%; }
.product-card .product-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.5s ease;
}
.product-card:hover .product-img { transform: scale(1.06); }
.product-badge {
  position: absolute; top: 8px; left: 8px; padding: 4px 10px;
  border-radius: 20px; font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; z-index: 1;
}
.badge-bestseller { background: var(--gold); color: var(--white); }
.badge-new { background: #4CAF50; color: var(--white); }
.badge-sale { background: #E53935; color: var(--white); }
.badge-custom { background: var(--blush); color: var(--brown); }
.badge-limited { background: #FF9800; color: var(--white); }
.badge-madetoorder { background: var(--beige); color: var(--brown); }
.badge-ready { background: #4CAF50; color: var(--white); }
.badge-digital { background: #7C4DFF; color: var(--white); }

.product-info {
  padding: 14px; display: flex; flex-direction: column; flex: 1;
}
.product-name {
  font-size: 0.9rem; font-weight: 600; color: var(--brown);
  margin-bottom: 4px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-name:hover { color: var(--gold); }
.product-price {
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
  margin-top: auto;
}
.product-price .sale-price { font-weight: 700; color: var(--gold); font-size: 1rem; }
.product-price .regular-price {
  font-size: 0.8rem; color: #bbb; text-decoration: line-through;
}
.product-card .card-btn {
  width: 100%; padding: 11px; font-size: 0.82rem; font-weight: 600;
  border-radius: var(--radius-sm); transition: all var(--transition);
  min-height: 44px; cursor: pointer; border: none; text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
}
.product-card .card-btn.add-to-cart {
  background: var(--gold); color: var(--white);
}
.product-card .card-btn.add-to-cart:hover { background: #8F5A12; }
.product-card .card-btn.whatsapp-btn {
  background: #25D366; color: var(--white);
}
.product-card .card-btn.whatsapp-btn:hover { background: #1da851; }
.product-card .card-btn.customise-btn {
  background: var(--blush); color: var(--white);
}
.product-card .card-btn.customise-btn:hover { background: #E0A0A2; }
.product-card .card-btn.out-of-stock {
  background: #e0e0e0; color: #999; cursor: not-allowed;
}

/* ---------- Skeleton Loaders ---------- */
.product-card.skeleton { pointer-events: none; }
.skeleton-img { position: relative; overflow: hidden; }
.skeleton-pulse {
  position: absolute; inset: -50%; background: linear-gradient(
    90deg, transparent, rgba(255,255,255,0.4), transparent
  );
  animation: skeletonShimmer 1.5s infinite;
}
.skeleton-line {
  height: 12px; background: var(--beige); border-radius: 4px;
  margin-bottom: 8px; overflow: hidden; position: relative;
}
.skeleton-line::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: skeletonShimmer 1.5s infinite;
}
.skeleton-line-sm { width: 70%; height: 14px; }
.skeleton-line-xs { width: 40%; height: 12px; margin-bottom: 12px; }
.skeleton-line-btn { width: 100%; height: 44px; border-radius: var(--radius-sm); margin-bottom: 0; }
@keyframes skeletonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------- Shop Content Spacing ---------- */
.shop-content {
  padding: 24px 0 64px;
}
.shop-content .container {
  max-width: 1280px;
}

/* ---------- Product Grid (overrides for shop page) ---------- */
.shop-content .product-grid {
  padding: 0;
}

/* ---------- Product Detail Page ---------- */
.product-detail { padding: 16px 16px 100px; }
.product-gallery { margin-bottom: 20px; }
.product-gallery .main-image {
  width: 100%; border-radius: var(--radius); background: var(--beige);
  aspect-ratio: 1; object-fit: cover;
}
.thumbnail-row {
  display: flex; gap: 8px; margin-top: 8px; overflow-x: auto;
}
.thumbnail-row::-webkit-scrollbar { display: none; }
.thumbnail {
  width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover;
  border: 2px solid transparent; cursor: pointer; flex-shrink: 0;
}
.thumbnail.active { border-color: var(--gold); }
.detail-info h1 { font-size: 1.3rem; color: var(--brown); margin-bottom: 8px; }
.detail-price {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.detail-price .sale { font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.detail-price .regular { font-size: 1rem; color: #999; text-decoration: line-through; }
.detail-price .discount {
  font-size: 0.8rem; color: #E53935; font-weight: 600;
  background: #FFEBEE; padding: 2px 8px; border-radius: 10px;
}
.detail-desc { font-size: 0.9rem; color: var(--dark); line-height: 1.6; margin-bottom: 16px; }
.detail-meta { margin-bottom: 16px; }
.detail-meta .meta-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  font-size: 0.9rem; border-bottom: 1px solid var(--beige);
}
.detail-meta .meta-label { font-weight: 600; color: var(--brown); min-width: 120px; }
.qty-selector {
  display: flex; align-items: center; gap: 0; margin-bottom: 16px;
  border: 1.5px solid var(--beige); border-radius: var(--radius-sm);
  display: inline-flex;
}
.qty-btn {
  width: 44px; height: 44px; display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem; color: var(--brown);
  background: var(--cream);
}
.qty-btn:hover { background: var(--beige); }
.qty-value {
  width: 50px; text-align: center; font-weight: 600; border: none;
  outline: none; font-size: 1rem; background: var(--white);
}
.custom-fields { margin-bottom: 16px; }
.custom-field { margin-bottom: 12px; }
.custom-field label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--brown); margin-bottom: 4px;
}
.custom-field input, .custom-field select, .custom-field textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--beige);
  border-radius: var(--radius-sm); outline: none; font-size: 0.9rem;
  transition: border-color var(--transition);
}
.custom-field input:focus, .custom-field select:focus, .custom-field textarea:focus {
  border-color: var(--gold);
}
.custom-field textarea { min-height: 80px; resize: vertical; }

/* Sticky add to cart bar on mobile */
.sticky-add-bar {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--white);
  padding: 12px 16px; box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 50; display: flex; gap: 8px;
}
.sticky-add-bar .btn { flex: 1; }

/* ---------- Cart Page ---------- */
.cart-page { padding: 16px 16px 32px; }
.cart-item {
  display: flex; gap: 12px; padding: 16px 0;
  border-bottom: 1px solid var(--beige);
}
.cart-item-img {
  width: 80px; height: 80px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--beige); flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.9rem; font-weight: 600; color: var(--brown); margin-bottom: 2px; }
.cart-item-custom { font-size: 0.75rem; color: #888; margin-bottom: 4px; }
.cart-item-price { font-weight: 600; color: var(--gold); font-size: 0.95rem; }
.cart-item-actions {
  display: flex; align-items: center; gap: 12px; margin-top: 8px;
}
.cart-remove { font-size: 0.8rem; color: #E53935; font-weight: 500; }
.cart-summary {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); margin-top: 24px;
}
.cart-summary h3 { font-size: 1.1rem; color: var(--brown); margin-bottom: 16px; }
.summary-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  font-size: 0.9rem;
}
.summary-row.total {
  border-top: 2px solid var(--beige); margin-top: 8px; padding-top: 12px;
  font-weight: 700; font-size: 1.1rem; color: var(--brown);
}

/* ---------- Coupon Section ---------- */
.coupon-section {
  padding: 12px 0; border-bottom: 1px solid var(--beige); margin-bottom: 4px;
}
.coupon-toggle {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
}
.coupon-toggle-label {
  font-size: 0.85rem; color: var(--gold); font-weight: 600;
}
.coupon-toggle-icon {
  font-size: 0.7rem; color: var(--gold); transition: transform 0.2s ease;
}
.coupon-input-wrap {
  display: flex; gap: 8px; margin-top: 10px;
}
.coupon-input {
  flex: 1; padding: 8px 12px; border: 1.5px solid var(--beige);
  border-radius: var(--radius-sm); font-size: 0.85rem; outline: none;
  text-transform: uppercase; letter-spacing: 0.5px;
  font-family: monospace; background: var(--white);
  transition: border-color var(--transition);
}
.coupon-input:focus { border-color: var(--gold); }
.coupon-apply-btn {
  padding: 8px 16px; background: var(--gold); color: var(--white);
  border: none; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 0.8rem; cursor: pointer; transition: background var(--transition);
  white-space: nowrap; min-width: 70px;
}
.coupon-apply-btn:hover { background: #8F5A12; }
.coupon-apply-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.coupon-message {
  font-size: 0.78rem; margin-top: 6px; padding: 4px 0;
}
.coupon-message.success { color: #4CAF50; }
.coupon-message.error { color: #E53935; }
.summary-row.coupon-row {
  font-size: 0.85rem; color: var(--brown);
}
.coupon-applied-label {
  font-weight: 600; color: #4CAF50; font-size: 0.85rem;
}
.coupon-saved-text {
  font-size: 0.75rem; color: #888;
}
.coupon-discount-amount {
  color: #4CAF50; font-weight: 600;
}
.coupon-remove-wrap {
  text-align: right; padding: 2px 0 8px; border-bottom: 1px solid var(--beige); margin-bottom: 4px;
}
.coupon-remove-btn {
  font-size: 0.75rem; color: #E53935; cursor: pointer; background: none; border: none;
  text-decoration: underline; text-underline-offset: 2px;
}
.coupon-remove-btn:hover { color: #C62828; }

/* ---------- Checkout ---------- */
.checkout-page { padding: 16px 16px 32px; }
.checkout-form { display: flex; flex-direction: column; gap: 16px; }
.form-section {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.form-section h3 { font-size: 1rem; color: var(--brown); margin-bottom: 16px; }
.form-row { margin-bottom: 12px; }
.form-row label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--brown); margin-bottom: 4px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--beige);
  border-radius: var(--radius-sm); outline: none; font-size: 0.9rem;
  background: var(--white); transition: border-color var(--transition);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--gold);
}
.form-row .error-msg {
  font-size: 0.75rem; color: #E53935; margin-top: 2px; display: none;
}
.form-row.invalid input, .form-row.invalid select {
  border-color: #E53935;
}
.form-row.invalid .error-msg { display: block; }
.form-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.payment-option {
  border: 2px solid var(--beige); border-radius: var(--radius-sm);
  padding: 12px 16px; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.payment-option.selected { border-color: var(--gold); background: var(--cream); }
.payment-option input[type="radio"] { accent-color: var(--gold); }

/* ---------- Auth Pages ---------- */
.auth-page {
  min-height: 80vh; display: flex; align-items: center;
  justify-content: center; padding: 24px 16px;
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--white);
  border-radius: var(--radius-lg); padding: 32px 24px;
  box-shadow: var(--shadow-md);
}
.auth-card h1 { font-size: 1.4rem; color: var(--brown); margin-bottom: 4px; }
.auth-card .auth-sub { font-size: 0.9rem; color: #888; margin-bottom: 24px; }
.auth-card .form-row { margin-bottom: 16px; }
.google-btn {
  width: 100%; padding: 12px; border: 1.5px solid var(--beige);
  border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all var(--transition); margin-bottom: 16px; min-height: 44px;
  background: var(--white);
}
.google-btn:hover { background: var(--cream); }
.auth-divider {
  text-align: center; position: relative; margin-bottom: 16px;
}
.auth-divider span {
  background: var(--white); padding: 0 12px; font-size: 0.8rem; color: #aaa;
  position: relative; z-index: 1;
}
.auth-divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--beige);
}
.auth-footer {
  text-align: center; margin-top: 20px; font-size: 0.85rem; color: #888;
}
.auth-footer a { color: var(--gold); font-weight: 600; }

/* ---------- Account Page ---------- */
.account-page { padding: 16px 16px 32px; }
.account-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.account-avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--beige);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--brown); font-weight: 700;
}
.account-name { font-size: 1.1rem; font-weight: 700; color: var(--brown); }
.account-email { font-size: 0.85rem; color: #888; }
.order-card {
  background: var(--white); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.order-card-header {
  display: flex; justify-content: space-between; margin-bottom: 8px;
}
.order-id { font-weight: 700; color: var(--brown); font-size: 0.9rem; }
.order-status-badge {
  font-size: 0.75rem; font-weight: 600; padding: 4px 10px;
  border-radius: 20px;
}
.status-placed { background: #E3F2FD; color: #1565C0; }
.status-confirmed { background: #E8F5E9; color: #2E7D32; }
.status-preparing { background: #FFF3E0; color: #E65100; }
.status-ready { background: #F3E5F5; color: #7B1FA2; }
.status-out { background: #E0F7FA; color: #00838F; }
.status-delivered { background: #E8F5E9; color: #1B5E20; }
.status-cancelled { background: #FFEBEE; color: #C62828; }

/* ---------- Track Order ---------- */
.track-page { padding: 16px 16px 32px; }
.track-search {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); margin-bottom: 24px;
}
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 10px; top: 0; bottom: 0;
  width: 2px; background: var(--beige);
}
.timeline-item {
  position: relative; padding-bottom: 24px;
}
.timeline-item::before {
  content: ''; position: absolute; left: -24px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--beige); border: 2px solid var(--beige);
}
.timeline-item.active::before {
  background: var(--gold); border-color: var(--gold);
}
.timeline-item.completed::before {
  background: #4CAF50; border-color: #4CAF50;
}
.timeline-item .tl-label { font-size: 0.9rem; font-weight: 600; color: var(--brown); }
.timeline-item .tl-date { font-size: 0.75rem; color: #888; }

/* ---------- Custom Order Form ---------- */
.custom-form-page { padding: 16px 16px 32px; }
.custom-form {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); max-width: 600px; margin: 0 auto;
}

/* ---------- Admin Dashboard ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; background: var(--brown); color: var(--light-gold);
  padding: 0; flex-shrink: 0; overflow-y: auto;
}
.admin-sidebar .sidebar-header {
  padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar .sidebar-header h2 { font-size: 1.1rem; color: var(--white); }
.admin-sidebar .sidebar-header p { font-size: 0.75rem; opacity: 0.6; }
.sidebar-nav { padding: 8px 0; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  font-size: 0.9rem; color: var(--light-gold); opacity: 0.8;
  transition: all var(--transition); min-height: 44px; cursor: pointer;
}
.sidebar-link:hover, .sidebar-link.active {
  opacity: 1; background: rgba(255,255,255,0.1); color: var(--white);
}
.admin-main { flex: 1; padding: 24px; background: var(--cream); overflow-y: auto; }
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.admin-header h1 { font-size: 1.4rem; color: var(--brown); }
.admin-stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.stat-card .stat-value {
  font-size: 1.8rem; font-weight: 700; color: var(--brown);
}
.stat-card .stat-label { font-size: 0.8rem; color: #888; margin-top: 2px; }
.admin-table {
  width: 100%; background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.admin-table table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  padding: 12px 16px; text-align: left; font-size: 0.85rem;
  border-bottom: 1px solid var(--beige);
}
.admin-table th {
  background: var(--beige); font-weight: 600; color: var(--brown);
}
.admin-table tr:hover td { background: var(--cream); }

/* ---------- Coupon Form ---------- */
.coupon-modal .admin-modal { max-width: 1000px; }
.coupon-modal .admin-modal-body { padding: 0; }
.coupon-form {
  display: flex; flex-direction: column; gap: 24px; padding: 28px;
  overflow-x: hidden;
}
.coupon-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.coupon-field {
  display: flex; flex-direction: column; gap: 6px;
}
.coupon-field label {
  font-size: 14px; font-weight: 600; color: var(--brown);
}
.coupon-field .required { color: #C99435; }
.coupon-field input,
.coupon-field select {
  width: 100%; height: 50px; padding: 0 14px;
  border: 1.5px solid #E0D0BC; border-radius: 10px;
  font-size: 15px; color: var(--brown); background: var(--white);
  outline: none; transition: border-color 0.2s ease; box-sizing: border-box;
  -webkit-appearance: none; appearance: none;
}
.coupon-field input:focus,
.coupon-field select:focus { border-color: #B77A1D; }
.coupon-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23887766'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px;
}
.coupon-field input[type="datetime-local"] {
  min-height: 50px; line-height: 1;
}
#cup_code {
  text-transform: uppercase; font-family: monospace; letter-spacing: 1px;
}
.coupon-error {
  font-size: 12px; color: #E53935; margin-top: 2px;
}

/* ---------- Toggle Settings Cards ---------- */
.coupon-settings-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px;
}
.coupon-toggle-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; background: #FBF7F0;
  border: 1px solid #E0D0BC; border-radius: 10px; cursor: pointer;
  transition: border-color 0.2s ease; min-height: 72px;
}
.coupon-toggle-card:hover { border-color: #B77A1D; }
.coupon-toggle-info {
  display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0;
}
.coupon-toggle-label {
  font-size: 14px; font-weight: 600; color: var(--brown); white-space: nowrap;
}
.coupon-toggle-helper {
  font-size: 12px; color: #887A70; line-height: 1.3;
}
.coupon-toggle-wrap {
  position: relative; flex-shrink: 0; width: 48px; height: 28px;
}
.coupon-toggle-input {
  position: absolute; opacity: 0; width: 100%; height: 100%; z-index: 1; cursor: pointer;
}
.coupon-toggle-slider {
  position: absolute; inset: 0; background: #D5C8B8; border-radius: 14px;
  transition: background 0.18s ease; cursor: pointer;
}
.coupon-toggle-slider::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; background: var(--white); border-radius: 50%;
  transition: transform 0.18s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.coupon-toggle-input:checked + .coupon-toggle-slider { background: #B77A1D; }
.coupon-toggle-input:checked + .coupon-toggle-slider::after { transform: translateX(20px); }
.coupon-toggle-input:focus-visible + .coupon-toggle-slider {
  outline: 2px solid #B77A1D; outline-offset: 2px;
}

/* ---------- Category Chips ---------- */
.coupon-cat-grid {
  display: flex; flex-wrap: wrap; gap: 8px; max-height: 140px;
  overflow-y: auto; padding: 4px 0;
}
.coupon-cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; background: #FBF7F0; border: 1.5px solid #E0D0BC;
  border-radius: 20px; font-size: 13px; color: var(--brown);
  cursor: pointer; transition: all 0.15s ease; user-select: none;
}
.coupon-cat-chip:hover { border-color: #B77A1D; }
.coupon-cat-chip.selected { border-color: #B77A1D; background: #F5EDE0; }
.coupon-cat-chip input { display: none; }

/* ---------- Product Selection Grid ---------- */
.coupon-prod-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px;
}
.coupon-prod-search {
  flex: 1; min-width: 160px; height: 40px; padding: 0 12px;
  border: 1.5px solid #E0D0BC; border-radius: 8px; font-size: 14px;
  outline: none; transition: border-color 0.2s ease; background: var(--white);
}
.coupon-prod-search:focus { border-color: #B77A1D; }
.coupon-prod-actions {
  display: flex; gap: 8px;
}
.coupon-prod-action-btn {
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  background: #FBF7F0; border: 1.5px solid #E0D0BC; border-radius: 8px;
  color: var(--brown); cursor: pointer; transition: all 0.15s ease;
}
.coupon-prod-action-btn:hover { border-color: #B77A1D; background: #F5EDE0; }
.coupon-prod-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  max-height: 320px; overflow-y: auto; padding: 4px 2px 4px 0;
}
.coupon-prod-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 12px; background: #FBF7F0; border: 1.5px solid #E0D0BC;
  border-radius: 10px; cursor: pointer; transition: all 0.15s ease;
  min-height: 100px; user-select: none;
}
.coupon-prod-card:hover { border-color: #B77A1D; }
.coupon-prod-card.selected { border-color: #B77A1D; background: #F5EDE0; }
.coupon-prod-card input[type="checkbox"] {
  position: absolute; top: 8px; right: 8px; width: 18px; height: 18px;
  accent-color: #B77A1D; cursor: pointer; margin: 0;
}
.coupon-prod-thumb {
  width: 100%; height: 56px; object-fit: cover; border-radius: 6px;
  background: #EAD8C2;
}
.coupon-prod-name {
  font-size: 13px; font-weight: 600; color: var(--brown);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.3;
}
.coupon-prod-price {
  font-size: 12px; color: #887A70;
}
.coupon-empty-notice {
  font-size: 13px; color: #999; padding: 12px 0;
}

/* ---------- Coupon Footer ---------- */
.coupon-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 12px; width: 100%; padding: 4px 0;
}
.coupon-btn {
  height: 48px; padding: 0 24px; border-radius: 9px; font-size: 15px;
  font-weight: 600; cursor: pointer; transition: all 0.15s ease;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border: 1.5px solid transparent; white-space: nowrap;
}
.coupon-btn-cancel {
  background: #FBF7F0; color: var(--brown); border-color: #E0D0BC;
  min-width: 120px;
}
.coupon-btn-cancel:hover { background: #EAD8C2; }
.coupon-btn-primary {
  background: #32180D; color: #FFF9F1; border-color: #32180D;
  min-width: 160px;
}
.coupon-btn-primary:hover { background: #472316; }
.coupon-btn-primary:active { transform: scale(0.98); }
.coupon-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.coupon-btn-icon { font-size: 18px; font-weight: 700; line-height: 1; }

/* ---------- Coupon Form Responsive ---------- */
@media (max-width: 899px) {
  .coupon-settings-grid { grid-template-columns: 1fr 1fr; }
  .coupon-prod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .coupon-form { padding: 20px; gap: 20px; }
  .coupon-form-grid { grid-template-columns: 1fr; gap: 16px; }
  .coupon-settings-grid { grid-template-columns: 1fr; }
  .coupon-prod-grid { grid-template-columns: 1fr; max-height: 260px; }
  .coupon-prod-toolbar { flex-direction: column; align-items: stretch; }
  .coupon-prod-actions { justify-content: stretch; }
  .coupon-prod-action-btn { flex: 1; text-align: center; }
  .coupon-footer { flex-direction: column-reverse; }
  .coupon-btn { width: 100%; }
  .coupon-btn-cancel { min-width: unset; }
  .coupon-btn-primary { min-width: unset; }
}
@media (max-width: 480px) {
  .coupon-form { padding: 16px; gap: 16px; }
  .coupon-toggle-card { min-height: 64px; padding: 12px; }
}

.admin-form {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); max-width: 700px;
}
.admin-form .form-row { margin-bottom: 16px; }
.admin-form input, .admin-form select, .admin-form textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--beige);
  border-radius: var(--radius-sm); outline: none; font-size: 0.9rem;
  transition: border-color var(--transition);
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  border-color: var(--gold);
}
.admin-form textarea { min-height: 100px; resize: vertical; }
.image-upload-area {
  border: 2px dashed var(--beige); border-radius: var(--radius);
  padding: 16px; text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.image-upload-area:hover { border-color: var(--gold); background: var(--cream); }
.image-preview-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.image-preview-grid img {
  width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm);
  border: 2px solid var(--beige);
}
.admin-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; visibility: hidden; transition: all var(--transition);
}
.admin-modal-overlay.active { opacity: 1; visibility: visible; }
.admin-modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 950px; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.admin-modal-header {
  padding: 20px 28px; border-bottom: 1px solid var(--beige);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.admin-modal-header h2 { font-size: 1.2rem; color: var(--brown); margin: 0; }
.admin-modal-close {
  width: 32px; height: 32px; border: none; background: var(--cream);
  border-radius: 50%; cursor: pointer; font-size: 1.1rem; color: var(--brown);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.admin-modal-close:hover { background: var(--beige); }
.admin-modal-body {
  padding: 24px 28px; overflow-y: auto; flex: 1; min-height: 0;
}
.admin-modal-footer {
  padding: 16px 28px; border-top: 1px solid var(--beige);
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  flex-shrink: 0;
}

/* ---------- Product Form Grid ---------- */
.product-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.pfg-full { grid-column: 1 / -1; }
.pfg-half { grid-column: span 1; }

@media (max-width: 767px) {
  .product-form-grid { grid-template-columns: 1fr; }
  .pfg-half { grid-column: span 1; }
  .admin-modal { max-width: 95vw; }
  .admin-modal-body { padding: 16px; }
  .admin-modal-header { padding: 16px; }
  .admin-modal-footer { padding: 12px 16px; flex-direction: column; }
  .admin-modal-footer .btn { width: 100%; }
}

/* ---------- Product Form Inputs ---------- */
.product-form-grid .form-row { margin-bottom: 0; }
.product-form-grid .form-row label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: var(--brown); margin-bottom: 5px;
}
.product-form-grid .form-row input,
.product-form-grid .form-row select,
.product-form-grid .form-row textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--beige);
  border-radius: var(--radius-sm); outline: none; font-size: 0.88rem;
  background: var(--white); transition: border-color var(--transition);
  box-sizing: border-box;
}
.product-form-grid .form-row input:focus,
.product-form-grid .form-row select:focus,
.product-form-grid .form-row textarea:focus {
  border-color: var(--gold);
}
.product-form-grid .form-row textarea { min-height: 80px; resize: vertical; }
.product-form-grid input[type="number"] { -moz-appearance: textfield; }
.product-form-grid input[type="number"]::-webkit-inner-spin-button,
.product-form-grid input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none; margin: 0;
}

/* ---------- Compact Image Upload ---------- */
.product-upload-area {
  border: 2px dashed var(--beige); border-radius: var(--radius);
  padding: 14px; text-align: center; cursor: pointer;
  transition: all var(--transition); min-height: 100px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.product-upload-area:hover { border-color: var(--gold); background: var(--cream); }
.product-upload-area .upload-icon { font-size: 1.6rem; margin-bottom: 4px; opacity: 0.5; }
.product-upload-area .upload-text { font-size: 0.85rem; font-weight: 600; color: var(--brown); }
.product-upload-area .upload-hint { font-size: 0.72rem; color: #999; margin-top: 2px; }
.product-upload-area.uploading { pointer-events: none; opacity: 0.6; }
.product-image-previews {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px;
}
.product-image-previews .preview-item {
  position: relative; width: 88px; height: 88px; border-radius: var(--radius-sm);
  overflow: hidden; border: 2px solid var(--beige);
}
.product-image-previews .preview-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.product-image-previews .preview-item.main-image { border-color: var(--gold); }
.product-image-previews .preview-item .main-label {
  position: absolute; top: 0; left: 0; right: 0;
  background: var(--gold); color: var(--white); font-size: 0.55rem;
  font-weight: 700; text-align: center; padding: 1px 0; text-transform: uppercase;
}
.product-image-previews .preview-item .remove-img {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: var(--white);
  border: none; cursor: pointer; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.product-image-previews .preview-item .remove-img:hover { background: #E53935; }
.product-upload-loading {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: #888; margin-top: 8px;
}
.product-upload-loading .mini-spinner {
  width: 14px; height: 14px; border: 2px solid var(--beige);
  border-top-color: var(--gold); border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ---------- Toggle Cards ---------- */
.product-toggles {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.product-toggle-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border: 1.5px solid var(--beige);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition); flex: 1; min-width: 180px;
  user-select: none;
}
.product-toggle-card:hover { border-color: var(--gold); background: var(--cream); }
.product-toggle-card.active { border-color: var(--gold); background: rgba(168, 107, 22, 0.08); }
.product-toggle-card .toggle-switch { flex-shrink: 0; }
.product-toggle-card .toggle-info { display: flex; flex-direction: column; }
.product-toggle-card .toggle-label { font-size: 0.85rem; font-weight: 600; color: var(--brown); }
.product-toggle-card .toggle-hint { font-size: 0.7rem; color: #999; line-height: 1.3; }

@media (max-width: 767px) {
  .product-toggles { flex-direction: column; }
  .product-toggle-card { min-width: unset; }
}

/* ---------- Compact Modal ---------- */
.admin-modal-overlay.compact .admin-modal { max-width: 680px; }

/* ---------- Category Modal Form Grid ---------- */
.cat-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.cat-field {
  display: flex; flex-direction: column; gap: 4px;
}
.cat-field.full-width { grid-column: 1 / -1; }
.cat-field label {
  font-size: 0.8rem; font-weight: 600; color: var(--brown);
}
.cat-field input, .cat-field select {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--beige);
  border-radius: var(--radius-sm); outline: none; font-size: 0.88rem;
  background: var(--white); transition: border-color var(--transition);
  box-sizing: border-box;
}
.cat-field input:focus, .cat-field select:focus { border-color: var(--gold); }
.cat-field input.error { border-color: #E53935; }
.cat-field input[readonly] { background: #fafafa; color: #666; cursor: not-allowed; }
.cat-field .helper-text {
  font-size: 0.72rem; color: #999; line-height: 1.3;
}
.cat-field .error-text {
  font-size: 0.72rem; color: #E53935; display: none; line-height: 1.3;
}
.cat-field .error-text.visible { display: block; }

/* ---------- Shape Selector ---------- */
.shape-selector {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.shape-option {
  flex: 1; min-width: 90px; cursor: pointer; position: relative;
}
.shape-option input {
  position: absolute; opacity: 0; width: 100%; height: 100%;
  cursor: pointer; top: 0; left: 0; z-index: 2;
}
.shape-option .shape-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 10px; border: 2px solid var(--beige);
  border-radius: var(--radius); transition: all var(--transition);
  background: var(--white);
}
.shape-option:hover .shape-card { border-color: var(--light-gold); }
.shape-option input:checked + .shape-card {
  border-color: var(--gold);
  background: rgba(168, 107, 22, 0.06);
}
.shape-option .shape-visual {
  width: 44px; height: 44px; background: var(--beige);
  transition: background var(--transition);
}
.shape-option input:checked + .shape-card .shape-visual { background: var(--gold); }
.shape-visual.circle-shape { border-radius: 50%; }
.shape-visual.rounded-square-shape { border-radius: 10px; }
.shape-visual.rectangle-shape { border-radius: 4px; }
.shape-option .shape-label {
  font-size: 0.75rem; font-weight: 600; color: var(--brown);
}

/* ---------- Number Stepper ---------- */
.number-stepper {
  display: flex; align-items: center; gap: 0;
}
.number-stepper input[type="number"] {
  width: 60px; text-align: center; border-radius: 0; padding: 10px 4px;
  -moz-appearance: textfield; flex-shrink: 0;
}
.number-stepper input[type="number"]::-webkit-inner-spin-button,
.number-stepper input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none; margin: 0;
}
.stepper-btn {
  width: 38px; height: 42px; border: 1.5px solid var(--beige);
  background: var(--white); color: var(--brown); font-size: 1.1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); line-height: 1;
}
.stepper-btn:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.stepper-btn:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.stepper-btn:hover { background: var(--cream); border-color: var(--gold); }

/* ---------- Category Image Upload ---------- */
.cat-upload-area {
  border: 2px dashed var(--beige); border-radius: var(--radius);
  padding: 28px 16px; text-align: center; cursor: pointer;
  transition: all var(--transition); position: relative;
}
.cat-upload-area:hover { border-color: var(--gold); background: var(--cream); }
.cat-upload-area.dragover { border-color: var(--gold); background: var(--cream); }
.cat-upload-area .upload-icon {
  font-size: 2rem; opacity: 0.4; margin-bottom: 8px; display: block;
}
.cat-upload-area .upload-text {
  font-size: 0.9rem; font-weight: 600; color: var(--brown); display: block;
}
.cat-upload-area .upload-hint {
  font-size: 0.72rem; color: #999; margin-top: 4px; display: block;
}
.cat-upload-progress {
  display: none; align-items: center; gap: 10px; margin-top: 12px;
}
.cat-upload-progress.visible { display: flex; }
.cat-upload-progress .progress-bar-track {
  flex: 1; height: 6px; background: var(--beige);
  border-radius: 3px; overflow: hidden;
}
.cat-upload-progress .progress-bar-fill {
  height: 100%; background: var(--gold); border-radius: 3px;
  width: 0%; transition: width 0.3s ease;
}
.cat-upload-progress .progress-text {
  font-size: 0.72rem; color: var(--brown); white-space: nowrap;
}
.cat-upload-preview-wrap {
  display: none; align-items: center; gap: 12px; margin-top: 12px;
}
.cat-upload-preview-wrap.visible { display: flex; }
.cat-upload-preview {
  width: 80px; height: 80px; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--beige); transition: all 0.3s ease;
}
.cat-upload-preview.circle-preview { border-radius: 50%; }
.cat-upload-preview.rounded-square-preview { border-radius: 12px; }
.cat-upload-preview.rectangle-preview { border-radius: 6px; }
.cat-upload-info { flex: 1; min-width: 0; }
.cat-upload-info .file-name {
  font-size: 0.82rem; font-weight: 600; color: var(--brown);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-upload-actions { display: flex; gap: 8px; margin-top: 6px; }
.cat-upload-actions .btn-icon {
  font-size: 0.75rem; padding: 5px 12px; border-radius: var(--radius-sm);
  font-weight: 600; cursor: pointer; transition: all var(--transition);
  border: 1.5px solid transparent;
}
.cat-upload-actions .btn-replace {
  background: var(--cream); color: var(--brown); border-color: var(--beige);
}
.cat-upload-actions .btn-replace:hover { background: var(--beige); border-color: var(--gold); }
.cat-upload-actions .btn-remove {
  background: transparent; color: #E53935;
}
.cat-upload-actions .btn-remove:hover { background: rgba(229,57,53,0.08); }

/* ---------- Category Toggle Row ---------- */
.cat-toggle-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 0;
}
.cat-toggle-row .toggle-info { display: flex; flex-direction: column; }
.cat-toggle-row .toggle-label { font-size: 0.85rem; font-weight: 600; color: var(--brown); }
.cat-toggle-row .toggle-hint { font-size: 0.7rem; color: #999; line-height: 1.3; }

/* ---------- Lead Info Grid ---------- */
.lead-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px;
}
.lead-info-item { font-size: 0.85rem; }
.lead-info-item .lead-label {
  color: #999; font-size: 0.72rem; display: block;
}
.lead-info-item .lead-value {
  font-weight: 600; color: var(--brown);
}

/* ---------- Save Button With Spinner ---------- */
.btn-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(44,22,13,0.3);
  border-top-color: var(--brown); border-radius: 50%;
  animation: spin 0.6s linear infinite; display: inline-block;
  vertical-align: middle; margin-right: 6px;
}
#saveCatBtn:disabled {
  opacity: 0.6; cursor: not-allowed; pointer-events: none;
}

/* ---------- Section Divider ---------- */
.form-section-title {
  font-size: 0.72rem; font-weight: 700; color: #999;
  text-transform: uppercase; letter-spacing: 0.8px;
  padding-bottom: 6px; margin-bottom: 12px;
  border-bottom: 1px solid var(--beige);
  grid-column: 1 / -1;
}

/* ---------- Toggle Switch ---------- */
.toggle-switch {
  width: 48px; height: 26px; background: var(--beige);
  border-radius: 13px; position: relative; cursor: pointer;
  transition: background var(--transition); flex-shrink: 0;
}
.toggle-switch.active { background: var(--gold); }
.toggle-switch::after {
  content: ''; position: absolute; width: 22px; height: 22px;
  background: var(--white); border-radius: 50%; top: 2px; left: 2px;
  transition: transform var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch.active::after { transform: translateX(22px); }

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center; padding: 48px 16px;
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.empty-state h3 { font-size: 1.1rem; color: var(--brown); margin-bottom: 4px; }
.empty-state p { font-size: 0.9rem; color: #888; margin-bottom: 16px; }

/* ---------- Loading ---------- */
.loading-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--beige);
  border-top-color: var(--gold); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 9999;
}
.toast {
  background: var(--brown); color: var(--white); padding: 12px 20px;
  border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500;
  box-shadow: var(--shadow-lg); margin-top: 8px; white-space: nowrap;
  animation: toastIn 0.3s ease;
}
.toast.success { background: #2E7D32; }
.toast.error { background: #C62828; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Order Success ---------- */
.order-success {
  text-align: center; padding: 48px 16px;
}
.order-success .success-icon { font-size: 4rem; margin-bottom: 16px; }
.order-success h1 { font-size: 1.5rem; color: var(--brown); margin-bottom: 8px; }
.order-success .order-id-display {
  font-size: 1.2rem; font-weight: 700; color: var(--gold); margin-bottom: 16px;
}

/* ---------- Shop Responsive ---------- */
@media (max-width: 767px) {
  .shop-header { padding: 40px 16px 44px; }
  .shop-header .hero-char { width: 22%; min-width: 100px; opacity: 0.3; bottom: -10px; }
  .shop-header .hero-char-left { left: -8px; }
  .shop-header .hero-char-right { right: -8px; }
  .shop-header .hero-decor .decor-item { transform: scale(0.6); }
  .shop-header .hero-decor .decor-item:nth-child(n+5) { display: none; }
  .shop-toolbar-inner { padding: 10px 16px; }
  .toolbar-top { margin-bottom: 8px; }
  .toolbar-search { max-width: 100%; }
  .toolbar-bottom { flex-direction: column; align-items: stretch; gap: 8px; }
  .toolbar-left { order: 2; }
  .toolbar-right { order: 1; }
  .product-count { font-size: 0.78rem; }
  .sort-wrapper select { min-width: 120px; font-size: 0.8rem; padding: 8px 32px 8px 12px; }
  .toolbar-btn { padding: 8px 14px; font-size: 0.8rem; }
  .filter-drawer { width: 100vw; max-width: 100vw; }
  .filter-drawer-header { padding: 16px 20px; }
  .filter-drawer-body { padding: 16px 20px; }
  .filter-drawer-footer { padding: 12px 20px; }
  .filter-group { margin-bottom: 20px; }
  .filter-chips .filter-chip { padding: 7px 14px; font-size: 0.78rem; }
  .shop-content { padding: 16px 0 48px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .shop-header { padding: 48px 24px 52px; }
  .shop-header .hero-char { width: 26%; min-width: 150px; opacity: 0.35; }
  .shop-toolbar-inner { padding: 12px 24px; }
  .filter-drawer { width: 360px; }
}

/* ---------- Responsive: Tablet ---------- */
@media (min-width: 600px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .occasion-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  /* hero h1 font-size handled by clamp() */
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Responsive: Desktop ---------- */
@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .container { padding: 0 32px; }
  .creations-scroll { justify-content: center; flex-wrap: wrap; }
  .reviews-scroll { justify-content: center; flex-wrap: wrap; }
  .product-detail { display: flex; gap: 32px; padding-bottom: 32px; }
  .product-gallery { flex: 1; margin-bottom: 0; }
  .detail-info { flex: 1; }
  .sticky-add-bar { position: static; box-shadow: none; padding: 0; margin-top: 16px; }
  .cart-page { display: flex; gap: 24px; align-items: flex-start; }
  .cart-items { flex: 1; }
  .cart-summary { width: 340px; flex-shrink: 0; margin-top: 0; position: sticky; top: 80px; }
  .checkout-page { display: flex; gap: 24px; align-items: flex-start; }
  .checkout-form { flex: 1; }
  .checkout-summary { width: 360px; flex-shrink: 0; position: sticky; top: 80px; }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Print ---------- */
@media print {
  .header, .footer, .sticky-add-bar, .announcement-bar { display: none; }
}

/* Category modal responsive */
@media (max-width: 767px) {
  .cat-form-grid { grid-template-columns: 1fr; gap: 16px; }
  .shape-selector { flex-direction: row; }
  .shape-option { min-width: 80px; }
  .cat-upload-area { padding: 20px 12px; }
  .cat-upload-preview-wrap { flex-wrap: wrap; }
}

/* Admin mobile */
@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed; left: -280px; top: 0; bottom: 0; z-index: 300;
    transition: left 0.3s ease;
  }
  .admin-sidebar.open { left: 0; }
  .admin-sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 299; display: none;
  }
  .admin-sidebar-overlay.active { display: block; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-table { overflow-x: auto; }
  .admin-table table { min-width: 600px; }
}

/* ---------- Misc ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.9rem; color: var(--gold); font-weight: 500;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--brown); }
.wishlist-heart {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px;
  background: var(--white); border-radius: 50%; display: flex;
  align-items: center; justify-content: center; z-index: 1;
  box-shadow: var(--shadow); font-size: 0.9rem;
}
.inline-link { color: var(--gold); font-weight: 600; }
.inline-link:hover { text-decoration: underline; }
