/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: #FFF8EC; color: #3E2723; min-height: 100vh; }
img, video { max-width: 100%; height: auto; }

/* ── Typography ──────────────────────────────────────────────────────────── */
.font-heading { font-family: 'Playfair Display', serif; }

/* ── Colours ─────────────────────────────────────────────────────────────── */
:root {
  --brand: #D97736;
  --brand-dark: #C96626;
  --brand-orange: #E8620A;
  --brand-gold: #F5A800;
  --brown-dark: #3E2723;
  --brown-mid: #5D4037;
  --brown-light: #8A7768;
  --cream: #FFF8EC;
  --cream-mid: #F5EEE6;
  --cream-dark: #EDE4D8;
  --border: #E0D8C8;
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media(min-width:640px){ .container { padding: 0 1.5rem; } }
@media(min-width:1024px){ .container { padding: 0 2rem; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .625rem 1.5rem; border-radius: 9999px; font-weight: 700; font-size: .875rem;
  cursor: pointer; border: none; transition: all .2s; text-decoration: none;
}
.btn-primary { background: linear-gradient(to right, #E8620A, #F5A800); color: #fff; }
.btn-primary:hover { background: linear-gradient(to right, #C8380A, #E8620A); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,98,10,.35); }
.btn-dark { background: #3E2723; color: #FFF8EC; }
.btn-dark:hover { background: #5D4037; }
.btn-outline { background: #fff; border: 2px solid var(--border); color: var(--brown-mid); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: #B2443E; color: #fff; }
.btn-danger:hover { background: #A03935; }

.badge { display: inline-block; padding: .2rem .75rem; border-radius: 9999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.badge-brand { background: rgba(232,98,10,.1); color: #E8620A; border: 1px solid rgba(232,98,10,.2); }
.badge-gold { background: rgba(245,168,0,.15); color: #B8860B; border: 1px solid rgba(245,168,0,.3); }

.card { background: #fff; border-radius: 1.25rem; border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.card-hover:hover { box-shadow: 0 8px 32px rgba(0,0,0,.1); transform: translateY(-2px); transition: all .3s; }

.section-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3em; color: var(--brand-orange); }
.section-title { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--brown-dark); }
.section-divider { width: 4rem; height: 2px; background: linear-gradient(to right, #E8620A, #F5A800); border-radius: 9999px; margin: .75rem 0; }

/* ── Header ──────────────────────────────────────────────────────────────── */
#site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid #F0E8DC;
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4.5rem; }
@media(min-width:768px){ .header-inner { height: 5rem; } }

.header-logo { display: flex; align-items: center; flex-shrink: 0; padding-left: 0.5rem; }
.header-logo img { height: 3.25rem; width: auto; object-fit: contain; display: block; flex-shrink: 0; border-radius: 0.5rem; }
@media(min-width:768px){ .header-logo img { height: 3.75rem; } }

.header-nav { display: none; }
@media(min-width:768px){ .header-nav { display: flex; align-items: center; gap: 1.5rem; } }
.header-nav a { font-size: .875rem; font-weight: 500; color: var(--brown-mid); text-decoration: none; transition: color .15s; position: relative; }
.header-nav a:hover, .header-nav a.active { color: var(--brand); }
.header-nav a.active::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 100%; height: 2px; background: var(--brand); border-radius: 9999px; }

.header-icons { display: flex; align-items: center; gap: .25rem; }
.icon-btn { position: relative; padding: .625rem; border-radius: 1rem; background: transparent; border: none; cursor: pointer; color: var(--brown-mid); transition: background .15s; }
.icon-btn:hover { background: #FFF3E0; }
.icon-btn svg { width: 1.125rem; height: 1.125rem; }
.icon-badge {
  position: absolute; top: -.125rem; right: -.125rem;
  background: var(--brand); color: #fff; font-size: .55rem; font-weight: 700;
  width: 1.0625rem; height: 1.0625rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Mobile menu ─────────────────────────────────────────────────────────── */
#mobile-menu {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.5); display: none;
}
#mobile-menu.open { display: block; }
#mobile-menu-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: 280px;
  background: #fff; padding: 1.5rem; overflow-y: auto;
  transform: translateX(-100%); transition: transform .3s;
}
#mobile-menu.open #mobile-menu-panel { transform: translateX(0); }
#mobile-menu-panel a { display: block; padding: .75rem 0; font-weight: 600; color: var(--brown-dark); text-decoration: none; border-bottom: 1px solid var(--cream-dark); }
#mobile-menu-panel a:hover { color: var(--brand); }

/* ── Cart drawer ─────────────────────────────────────────────────────────── */
#cart-drawer {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.5); display: none;
}
#cart-drawer.open { display: block; }
#cart-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 100%; max-width: 420px;
  background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s;
}
#cart-drawer.open #cart-drawer-panel { transform: translateX(0); }
.cart-drawer-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-drawer-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); }

/* ── Search overlay ──────────────────────────────────────────────────────── */
#search-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center; padding-top: 5rem;
}
#search-overlay.open { display: flex; }
#search-box { background: #fff; border-radius: 1.5rem; padding: 1.5rem; width: 100%; max-width: 600px; margin: 0 1rem; }
#search-input { width: 100%; border: 2px solid var(--border); border-radius: .75rem; padding: .75rem 1rem; font-size: 1rem; outline: none; }
#search-input:focus { border-color: var(--brand); }
#search-results { margin-top: 1rem; max-height: 400px; overflow-y: auto; }
.search-result-item { display: flex; gap: .75rem; padding: .75rem; border-radius: .75rem; cursor: pointer; text-decoration: none; color: inherit; }
.search-result-item:hover { background: var(--cream); }
.search-result-item img { width: 3rem; height: 3rem; object-fit: cover; border-radius: .5rem; }

/* ── Promo banner ────────────────────────────────────────────────────────── */
#promo-banner { background: linear-gradient(to right, #3E1200, #5D2A00, #3E1200); padding: .75rem 0; overflow: hidden; border-top: 1px solid rgba(245,168,0,.2); border-bottom: 1px solid rgba(245,168,0,.2); }
.marquee-track { display: flex; white-space: nowrap; animation: marquee 40s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: .75rem; padding: 0 1.5rem; font-size: .875rem; font-weight: 500; color: rgba(245,168,0,.9); flex-shrink: 0; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Hero carousel ───────────────────────────────────────────────────────── */
#hero { position: relative; background: #1A0800; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; }
.hero-slide.active { opacity: 1; position: relative; }
.hero-slide img { width: 100%; height: 60vh; min-height: 420px; object-fit: cover; object-position: center; }
@media(min-width:640px){ .hero-slide img { height: 70vh; min-height: 520px; } }
@media(min-width:1024px){ .hero-slide img { height: 80vh; min-height: 620px; } }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 50%, transparent 100%); }
.hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.25rem 1.5rem 4rem; }
@media(min-width:640px){ .hero-content { padding: 2rem 3rem 5rem; } }
.hero-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.2);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.hero-nav-btn:hover { background: rgba(255,255,255,.3); }
.hero-nav-btn.prev { left: .75rem; }
.hero-nav-btn.next { right: .75rem; }
.hero-dots { position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%); display: flex; gap: .5rem; z-index: 10; }
.hero-dot { width: .5rem; height: .5rem; border-radius: 9999px; background: rgba(255,255,255,.4); border: none; cursor: pointer; transition: all .3s; }
.hero-dot.active { width: 1.75rem; background: var(--brand-gold); }

/* ── Product grid ────────────────────────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media(min-width:640px){ .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width:1024px){ .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media(min-width:1280px){ .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { display: flex; flex-direction: column; background: #fff; border-radius: 1.25rem; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.04); transition: all .3s; }
.product-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.1); transform: translateY(-2px); }
.product-card-img { position: relative; aspect-ratio: 1; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-body { flex: 1; display: flex; flex-direction: column; padding: 1rem; text-align: center; }
.product-card-title { font-family: 'Playfair Display', serif; font-size: 1.125rem; font-weight: 700; color: #4A1A00; margin-bottom: .5rem; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-title:hover { color: var(--brand-orange); }
.product-card-price { font-size: 1.25rem; font-weight: 700; color: #4A1A00; margin-bottom: 1rem; }
.product-card-old-price { font-size: .875rem; color: #9CA3AF; text-decoration: line-through; margin-left: .5rem; }
.wishlist-btn {
  position: absolute; top: .75rem; right: .75rem; z-index: 10;
  width: 2.25rem; height: 2.25rem; border-radius: 9999px;
  background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.5);
  color: #7A3B00; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.wishlist-btn:hover, .wishlist-btn.active { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; transform: scale(1.1); }
.wishlist-btn svg { width: 1rem; height: 1rem; }

/* ── Stars ───────────────────────────────────────────────────────────────── */
.stars { display: inline-flex; gap: .125rem; }
.stars svg { width: .875rem; height: .875rem; }
.star-filled { fill: #F5A800; }
.star-empty { fill: #E5E7EB; }

/* ── Reviews section ─────────────────────────────────────────────────────── */
#reviews-section { background: linear-gradient(135deg, #1A0800 0%, #2D0F00 45%, #1A0800 100%); padding: 5rem 0; position: relative; }
.review-card { background: rgba(245,168,0,.06); border: 1px solid rgba(245,168,0,.18); border-radius: 1rem; padding: 3rem 2rem; text-align: center; position: relative; overflow: hidden; }
.review-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(to right, transparent, #F5A800, transparent); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer { background: linear-gradient(to bottom, #3A1200, #1A0800); }
footer a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .875rem; transition: color .15s; }
footer a:hover { color: #F5A800; }
.footer-heading { font-weight: 700; color: #fff; font-size: .875rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1.25rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media(min-width:768px){ .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; } }
.social-btn { width: 2.25rem; height: 2.25rem; border-radius: 9999px; border: 1px solid rgba(245,168,0,.4); color: #F5A800; display: inline-flex; align-items: center; justify-content: center; transition: all .2s; }
.social-btn:hover { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
.social-btn svg { width: 1rem; height: 1rem; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-input {
  width: 100%; padding: .75rem 1rem; border: 2px solid var(--border);
  border-radius: .75rem; font-size: .875rem; outline: none; background: #fff;
  transition: border-color .15s; color: var(--brown-dark);
}
.form-input:focus { border-color: var(--brand); }
.form-label { display: block; font-size: .875rem; font-weight: 600; color: var(--brown-dark); margin-bottom: .375rem; }
.form-group { margin-bottom: 1.25rem; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
#toast-container { position: fixed; top: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast { background: #fff; border-radius: 1rem; padding: .875rem 1.25rem; box-shadow: 0 8px 32px rgba(0,0,0,.15); font-size: .875rem; font-weight: 600; display: flex; align-items: center; gap: .625rem; pointer-events: auto; animation: toastIn .3s ease; min-width: 240px; max-width: 400px; }
.toast.success { border-left: 4px solid #22C55E; color: #166534; }
.toast.error { border-left: 4px solid #EF4444; color: #991B1B; }
.toast.info { border-left: 4px solid var(--brand); color: var(--brown-dark); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-1rem); } to { opacity: 1; transform: translateY(0); } }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 200; display: none; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(4px); }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: 1.5rem; box-shadow: 0 24px 64px rgba(0,0,0,.2); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }

/* ── Page hero ───────────────────────────────────────────────────────────── */
.page-hero { background: linear-gradient(135deg, #2D0F00, #4A1A00, #3E2723); color: #fff; padding: 3.5rem 0; text-align: center; position: relative; overflow: hidden; }
.page-hero h1 { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; margin-bottom: .75rem; }
@media(min-width:768px){ .page-hero h1 { font-size: 3.5rem; } }
.page-hero p { color: rgba(255,255,255,.75); font-size: 1rem; max-width: 36rem; margin: 0 auto; }

/* ── Checkout steps ──────────────────────────────────────────────────────── */
.step-indicator { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.step { display: flex; align-items: center; gap: .5rem; }
.step-num { width: 2.5rem; height: 2.5rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: #D0C4B4; transition: background .3s; }
.step-num.active { background: var(--brand); }
.step-label { font-weight: 500; color: #999; }
.step-label.active { color: var(--brown-dark); }
.step-line { width: 3rem; height: .25rem; background: #D0C4B4; border-radius: 9999px; }
.step-line.active { background: var(--brand); }

/* ── Order tracking ──────────────────────────────────────────────────────── */
.tracking-steps { display: flex; align-items: center; gap: 0; }
.tracking-step { display: flex; flex-direction: column; align-items: center; flex: 1; }
.tracking-step-dot { width: 2rem; height: 2rem; border-radius: 9999px; border: 2px solid #D0C4B4; background: #fff; display: flex; align-items: center; justify-content: center; }
.tracking-step-dot.completed { background: var(--brand); border-color: var(--brand); }
.tracking-step-dot.active { border-color: var(--brand); }
.tracking-step-line { flex: 1; height: 2px; background: #D0C4B4; }
.tracking-step-line.completed { background: var(--brand); }

/* ── Admin ───────────────────────────────────────────────────────────────── */
.admin-sidebar { width: 240px; background: var(--brown-dark); min-height: 100vh; padding: 1.5rem 0; flex-shrink: 0; }
.admin-sidebar a { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.5rem; color: rgba(255,255,255,.7); text-decoration: none; font-size: .875rem; font-weight: 500; transition: all .15s; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-content { flex: 1; padding: 2rem; overflow-y: auto; }
.stat-card { background: #fff; border-radius: 1rem; padding: 1.5rem; border: 1px solid var(--border); }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--brown-dark); }
.stat-card .stat-label { font-size: .875rem; color: var(--brown-light); margin-top: .25rem; }

/* ── Responsive helpers ──────────────────────────────────────────────────── */
.hidden { display: none !important; }
@media(min-width:768px){ .md\:hidden { display: none !important; } .md\:block { display: block !important; } .md\:flex { display: flex !important; } }
@media(max-width:767px){ .sm\:hidden { display: none !important; } }

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn .6s ease; }
.animate-slide-up { animation: slideUp .5s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 2.5rem; height: 2.5rem; border: 3px solid rgba(245,168,0,.3); border-top-color: var(--brand-orange); border-radius: 9999px; animation: spin .8s linear infinite; }
.animate-spin { animation: spin .8s linear infinite; display: inline-block; }

/* ── Falling particles ───────────────────────────────────────────────────── */
#falling-particles { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.particle { position: absolute; top: -60px; animation: particleFall linear infinite; opacity: 0; }
@keyframes particleFall {
  0%   { transform: translateY(-60px) translateX(0) rotate(0deg); opacity: 0; }
  5%   { opacity: .6; }
  95%  { opacity: .4; }
  100% { transform: translateY(110vh) translateX(var(--sway)) rotate(360deg); opacity: 0; }
}

/* ── Policy modal ────────────────────────────────────────────────────────── */
.policy-modal { max-width: 640px; }
.policy-section h3 { font-weight: 600; font-size: .875rem; color: #111; margin-bottom: .375rem; }
.policy-section p { font-size: .875rem; color: #555; line-height: 1.6; }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D0C4B4; border-radius: 9999px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   Mobile  : max-width 575.98px
   Tablet  : 768px – 991.98px
   Desktop : 992px – 1199.98px
   XL      : min-width 1200px
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── MOBILE  (≤ 575.98px) ─────────────────────────────────────────────────── */
@media (max-width: 575.98px) {

  /* Typography scale-down */
  .section-title  { font-size: 1.5rem; }
  .page-hero h1   { font-size: 1.75rem; line-height: 1.2; }
  .page-hero p    { font-size: .875rem; }

  /* Container full-width with tighter padding */
  .container { padding: 0 1rem; }

  /* Header — tighter on small screens */
  .header-inner { height: 4rem; gap: .25rem; }
  .header-logo { padding-left: .25rem; }
  .header-logo img { height: 2.75rem; }
  .icon-btn { padding: .625rem; min-width: 2.75rem; min-height: 2.75rem; }
  .icon-btn svg { width: 1.125rem; height: 1.125rem; }
  .header-icons { gap: 0; }

  /* Mobile menu panel */
  #mobile-menu-panel { width: 85vw; max-width: 320px; padding: 1.25rem; }
  #mobile-menu-panel a { padding: .875rem 0; min-height: 44px; display: flex; align-items: center; }

  /* Cart drawer full-width on mobile */
  #cart-drawer-panel { max-width: 100%; }
  .cart-drawer-header { padding: 1rem; }
  .cart-drawer-body   { padding: .875rem 1rem; }
  .cart-drawer-footer { padding: 1rem; }

  /* Search overlay — full width */
  #search-overlay { padding-top: 3.5rem; align-items: flex-start; }
  #search-box { margin: 0 .75rem; padding: 1rem; border-radius: 1rem; }
  #search-results { max-height: 55vh; }

  /* Hero — shorter on mobile */
  .hero-slide img { height: 60vh; min-height: 320px; }
  .hero-content { padding: 1rem 1rem 3.5rem; }
  .hero-content h2 { font-size: 1.5rem !important; }
  .hero-content p  { font-size: .875rem !important; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-nav-btn { width: 2.5rem; height: 2.5rem; }
  .hero-nav-btn svg { width: 1rem; height: 1rem; }

  /* Promo banner — smaller text */
  .marquee-track span { font-size: .8rem; padding: 0 .875rem; }

  /* Product grid — single column */
  .product-grid { grid-template-columns: 1fr; gap: 1rem; }
  .product-card-title { font-size: 1rem; }
  .product-card-price { font-size: 1.1rem; }
  .product-card-body  { padding: .875rem; }
  .wishlist-btn { width: 2.5rem; height: 2.5rem; }

  /* Reviews section */
  #reviews-section { padding: 3rem 0; }
  .review-card { padding: 1.75rem 1rem; }
  .review-card p { font-size: 1rem !important; }

  /* Footer — single column, centered */
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .footer-heading { margin-bottom: .75rem; }
  footer .flex.gap-3 { justify-content: center; }
  .social-btn { width: 2.5rem; height: 2.5rem; }

  /* Forms — full width inputs, 16px prevents iOS zoom */
  .form-input { font-size: 16px; padding: .875rem 1rem; }
  select.form-input { font-size: 16px; }
  textarea.form-input { font-size: 16px; }
  .btn { padding: .75rem 1.25rem; font-size: .875rem; min-height: 44px; }

  /* Modals — bottom sheet on mobile */
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 1.5rem 1.5rem 0 0; max-height: 92vh; max-width: 100%; }
  .modal-header { padding: 1rem 1.25rem; }
  .modal-body { padding: 1rem 1.25rem; }
  .modal-footer { padding: .875rem 1.25rem; }

  /* Checkout steps — compact */
  .step-indicator { gap: .375rem; margin-bottom: 1.5rem; }
  .step-num { width: 2.25rem; height: 2.25rem; font-size: .8rem; }
  .step-label { font-size: .7rem; }
  .step-line { width: 1.25rem; }

  /* Admin — hide sidebar, full content */
  .admin-sidebar { display: none !important; }
  .admin-content { padding: 1rem; }
  .stat-card .stat-value { font-size: 1.5rem; }

  /* Toast — full width */
  #toast-container { width: calc(100% - 2rem); left: 1rem; transform: none; }
  .toast { min-width: unset; width: 100%; font-size: .8125rem; }

  /* Page hero padding */
  .page-hero { padding: 2.5rem 0; }

  /* Tables — horizontal scroll */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── TABLET  (768px – 991.98px) ───────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 991.98px) {

  /* Typography */
  .section-title { font-size: 1.75rem; }
  .page-hero h1  { font-size: 2.5rem; }

  /* Header */
  .header-inner { height: 4rem; }
  .header-logo img { height: 2.5rem; }
  /* Show desktop nav on tablet too */
  .header-nav { display: flex; gap: 1rem; }
  .header-nav a { font-size: .8rem; }

  /* Hero */
  .hero-slide img { height: 65vh; min-height: 400px; }
  .hero-content { padding: 1.5rem 2rem 4rem; }
  .hero-content h2 { font-size: 2rem !important; }

  /* Product grid — 2 columns on tablet */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

  /* Footer — 3 columns on tablet */
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 1.5rem; }
  /* Show all columns but merge last two into a 2-col sub-grid */
  .footer-grid > div:nth-child(4),
  .footer-grid > div:nth-child(5) { display: block; }

  /* Admin sidebar — narrower */
  .admin-sidebar { width: 200px; }
  .admin-sidebar a { padding: .625rem 1rem; font-size: .8rem; }
  .admin-content { padding: 1.5rem; }

  /* Stat cards — 2 per row */
  .stat-card .stat-value { font-size: 1.75rem; }

  /* Modals — centered, not full screen */
  .modal-backdrop { padding: 1rem; align-items: center; }
  .modal { border-radius: 1.5rem; max-width: 520px; }

  /* Checkout steps */
  .step-line { width: 2rem; }

  /* Page hero */
  .page-hero { padding: 3rem 0; }
  .page-hero h1 { font-size: 2.75rem; }

  /* Reviews */
  .review-card { padding: 2.5rem 1.5rem; }
  .review-card p { font-size: 1.125rem !important; }
}

/* ── DESKTOP  (992px – 1199.98px) ────────────────────────────────────────── */
@media (min-width: 992px) and (max-width: 1199.98px) {

  /* Typography */
  .section-title { font-size: 1.875rem; }
  .page-hero h1  { font-size: 3rem; }

  /* Header */
  .header-inner { height: 4.25rem; }
  .header-nav { gap: 1.25rem; }
  .header-nav a { font-size: .85rem; }

  /* Hero */
  .hero-slide img { height: 75vh; min-height: 500px; }
  .hero-content h2 { font-size: 2.5rem !important; }

  /* Product grid — 3 columns */
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

  /* Footer — full 5 columns */
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }

  /* Admin */
  .admin-sidebar { width: 220px; }
  .admin-content { padding: 1.75rem; }

  /* Container */
  .container { max-width: 960px; }

  /* Page hero */
  .page-hero { padding: 3.5rem 0; }

  /* Reviews */
  .review-card { padding: 2.75rem 2rem; }
}

/* ── EXTRA LARGE  (≥ 1200px) ─────────────────────────────────────────────── */
@media (min-width: 1200px) {

  /* Typography */
  .section-title { font-size: 2.25rem; }
  .page-hero h1  { font-size: 4rem; }
  .page-hero p   { font-size: 1.125rem; }

  /* Header */
  .header-inner { height: 4.5rem; }
  .header-nav { gap: 2rem; }
  .header-nav a { font-size: .9375rem; }

  /* Hero */
  .hero-slide img { height: 82vh; min-height: 620px; }
  .hero-content { padding: 2.5rem 4rem 5.5rem; }
  .hero-content h2 { font-size: 3.5rem !important; }
  .hero-content p  { font-size: 1rem !important; }
  .hero-nav-btn { width: 3rem; height: 3rem; }

  /* Product grid — 4 columns */
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .product-card-title { font-size: 1.125rem; }

  /* Container */
  .container { max-width: 1280px; }

  /* Footer */
  .footer-grid { grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr; gap: 2.5rem; }

  /* Admin */
  .admin-sidebar { width: 260px; }
  .admin-content { padding: 2.5rem; }
  .stat-card { padding: 2rem; }
  .stat-card .stat-value { font-size: 2.25rem; }

  /* Page hero */
  .page-hero { padding: 5rem 0; }

  /* Reviews */
  .review-card { padding: 4rem 3rem; }
  .review-card p { font-size: 1.5rem !important; }

  /* Modals — wider on XL */
  .modal { max-width: 560px; }
  .policy-modal { max-width: 720px; }
}

/* ── TOUCH DEVICES — improve tap targets ─────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  .wishlist-btn { width: 2.75rem; height: 2.75rem; }
  .hero-nav-btn { width: 3rem; height: 3rem; }
  .social-btn { width: 2.75rem; height: 2.75rem; }
  .form-input { font-size: 16px; } /* prevents iOS zoom on focus */
  select.form-input { font-size: 16px; }
  textarea.form-input { font-size: 16px; }
  .header-nav a { padding: .5rem 0; }
  #mobile-menu-panel a { padding: 1rem 0; min-height: 44px; }
  .faq-item button { min-height: 44px; }
  .hero-dot { width: .75rem; height: .75rem; min-width: 24px; min-height: 24px; }
}

/* ── PRINT ────────────────────────────────────────────────────────────────── */
@media print {
  #site-header, #promo-banner, #falling-particles,
  #mobile-menu, #cart-drawer, #search-overlay,
  footer, .btn, .wishlist-btn, .hero-nav-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .container { max-width: 100%; padding: 0; }
}

/* ── LANDSCAPE MOBILE  (short + wide) ────────────────────────────────────── */
@media (max-width: 767px) and (orientation: landscape) {
  .hero-slide img { height: 40vh; min-height: 200px; }
  .hero-content { padding: .75rem 1.5rem 2.5rem; }
  .page-hero { padding: 1.5rem 0; }
  .page-hero h1 { font-size: 1.5rem; }
  #reviews-section { padding: 2rem 0; }
}

/* ── SMALL MOBILE  (≤ 375px — iPhone SE, Galaxy A series) ───────────────── */
@media (max-width: 375px) {
  .header-logo img { height: 2.25rem; width: auto; }
  .header-inner { height: 3.75rem; }
  .hero-slide img { height: 50vh; min-height: 280px; }
  .hero-content h2 { font-size: 1.25rem !important; }
  .hero-content p { font-size: .8125rem !important; }
  .product-card-body { padding: .75rem; }
  .product-card-title { font-size: .9375rem; }
  .step-indicator { gap: .25rem; }
  .step-label { display: none; } /* hide labels on very small screens */
  .step-line { width: 1rem; }
  .review-card { padding: 1.25rem .75rem; }
  .review-card p { font-size: .9375rem !important; }
  .modal-body { padding: .875rem 1rem; }
  .container { padding: 0 .75rem; }
  .btn { padding: .625rem 1rem; }
  .page-hero h1 { font-size: 1.5rem; }
  .section-title { font-size: 1.375rem; }
}
