/* ============================================
   DECOR CENTRE — Electronics · Furniture · Home Decor
   Design tokens
   ============================================ */
:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --surface-2: #f2ece2;
  --ink: #221d18;
  --ink-dim: #6d6459;
  --terracotta: #c1603f;
  --terracotta-dark: #a24d31;
  --sage: #6f7d5f;
  --line: #e8e0d3;
  --line-strong: #d8cdba;
  --success: #4d7c4a;
  --danger: #b3432f;

  --display: "Fraunces", Georgia, serif;
  --body: "Work Sans", "Segoe UI", sans-serif;

  --container: 1200px;
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--body); cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-dim); }
p:last-child { margin-bottom: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
  display: block;
  margin-bottom: 14px;
}

:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: all 0.2s ease;
}
.btn:hover { border-color: var(--terracotta); color: var(--terracotta); }
.btn-solid { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.btn-solid:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 12px; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================
   TOP BAR + HEADER
   ============================================ */
.top-bar {
  background: var(--ink);
  color: #f2ece2;
  font-size: 12.5px;
  padding: 8px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.top-bar a { color: #f2ece2; opacity: 0.85; }
.top-bar a:hover { opacity: 1; color: #e8b394; }
.social-row { display: flex; gap: 14px; align-items: center; }
.social-row svg { width: 16px; height: 16px; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 22px; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--terracotta); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
}
.nav-links { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; font-size: 14px; font-weight: 500; }
.nav-links a { color: var(--ink-dim); transition: color 0.2s; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); border-color: var(--terracotta); }

.nav-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn { position: relative; display: flex; align-items: center; }
.icon-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute; top: -8px; right: -10px;
  background: var(--terracotta); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.nav-toggle { display: none; background: none; border: none; width: 26px; height: 20px; position: relative; }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); border-radius: 2px;
}
.nav-toggle::before { top: 0; } .nav-toggle span { top: 9px; } .nav-toggle::after { bottom: 0; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(300px, 80vw); background: var(--surface);
    flex-direction: column; justify-content: center; gap: 26px; padding: 40px;
    transform: translateX(100%); transition: transform 0.3s ease; z-index: 200;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  }
  .nav-links.open { transform: translateX(0); }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--surface-2), var(--bg));
  padding: 90px 0 80px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.5vw, 64px); max-width: 14ch; }
.hero p.lead { font-size: 18px; margin-top: 20px; max-width: 44ch; }
.hero-cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-media { order: -1; } }

.category-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; position: relative; z-index: 2; }
.category-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.category-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(34,29,24,0.08); }
.category-card img { aspect-ratio: 4/3; object-fit: cover; }
.category-card .cc-body { padding: 18px 20px; }
.category-card h3 { font-size: 19px; }
@media (max-width: 760px) { .category-strip { grid-template-columns: 1fr; margin-top: 40px; } }

/* ============================================
   AD SLOT
   ============================================ */
.ad-slot {
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
}
.ad-slot .ad-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 8px; display: block; }
.ad-slot-banner { margin: 50px 0; }
.ad-slot-sidebar { min-height: 250px; display: flex; flex-direction: column; justify-content: center; }

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 90px 0; }
.section-tight { padding: 60px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.on-surface2 { background: var(--surface-2); }

/* ============================================
   PRODUCT GRID / CARD
   ============================================ */
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-chip {
  padding: 9px 18px; border-radius: 20px; border: 1px solid var(--line-strong);
  font-size: 13px; font-weight: 500; background: var(--surface); color: var(--ink-dim);
  transition: all 0.2s ease;
}
.filter-chip.active, .filter-chip:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
@media (max-width: 1000px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

.product-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow 0.25s ease, transform 0.25s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: 0 16px 34px rgba(34,29,24,0.1); transform: translateY(-3px); }
.product-thumb { aspect-ratio: 1/1; overflow: hidden; background: var(--surface-2); position: relative; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-thumb img { transform: scale(1.05); }
.product-cat-tag {
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.92);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 20px; color: var(--ink-dim);
}
.product-info { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-info h3 { font-size: 16px; font-weight: 500; font-family: var(--body); }
.product-price { font-family: var(--display); font-size: 20px; color: var(--terracotta); margin-top: auto; }
.product-price .old { font-size: 13px; color: var(--ink-dim); text-decoration: line-through; font-family: var(--body); margin-left: 8px; }

/* ============================================
   PRODUCT DETAIL
   ============================================ */
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.pd-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1/1; }
.pd-media img { width: 100%; height: 100%; object-fit: cover; }
.pd-info .eyebrow { margin-bottom: 10px; }
.pd-info h1 { font-size: 32px; margin-bottom: 14px; }
.pd-price { font-family: var(--display); font-size: 30px; color: var(--terracotta); margin: 16px 0 24px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 20px 0; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.qty-control button { background: var(--surface-2); border: none; width: 36px; height: 36px; font-size: 16px; }
.qty-control input { width: 46px; text-align: center; border: none; font-size: 15px; }
@media (max-width: 800px) { .pd-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ============================================
   CART / CHECKOUT
   ============================================ */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 20px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-item-info { display: flex; gap: 16px; align-items: center; }
.cart-item-info img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.cart-item-info h4 { font-size: 15px; font-weight: 500; }
.cart-remove { color: var(--danger); font-size: 12px; font-weight: 600; margin-top: 6px; display: inline-block; }

.order-summary {
  background: var(--surface-2); border-radius: var(--radius); padding: 28px;
  position: sticky; top: 100px;
}
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 10px 0; color: var(--ink-dim); }
.summary-row.total { font-size: 19px; color: var(--ink); font-weight: 600; border-top: 1px solid var(--line-strong); margin-top: 8px; padding-top: 16px; font-family: var(--display); }
.empty-state { text-align: center; padding: 80px 0; }
.empty-state h2 { margin-bottom: 14px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--ink-dim); margin-bottom: 8px; }
input, textarea, select {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--ink); font-family: var(--body); font-size: 15px; padding: 12px 14px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--terracotta); }
textarea { resize: vertical; min-height: 90px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.payment-note {
  background: var(--surface-2); border-left: 3px solid var(--terracotta);
  padding: 16px 18px; border-radius: var(--radius-sm); font-size: 13.5px; margin-top: 20px;
}

/* ============================================
   ADMIN
   ============================================ */
.admin-shell { min-height: 100vh; display: flex; }
.admin-sidebar { width: 230px; background: var(--ink); color: #f2ece2; padding: 30px 20px; flex-shrink: 0; }
.admin-sidebar .brand { color: #fff; margin-bottom: 40px; font-size: 19px; }
.admin-nav { display: flex; flex-direction: column; gap: 6px; list-style: none; padding: 0; margin: 0; }
.admin-nav a { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; color: #d9d0c3; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { background: rgba(255,255,255,0.1); color: #fff; }
.admin-main { flex: 1; padding: 44px; max-width: 1100px; }
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--surface-2); }
.admin-login-card { background: var(--surface); padding: 46px; border-radius: var(--radius); width: 100%; max-width: 380px; border: 1px solid var(--line); }
.admin-login-card h1 { font-size: 24px; margin-bottom: 8px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.admin-table th { text-align: left; background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); padding: 14px 16px; }
.admin-table td { padding: 14px 16px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.admin-table img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; }
.status-pill { font-size: 11.5px; font-weight: 600; padding: 5px 12px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.04em; }
.status-new { background: #fdeee7; color: var(--terracotta-dark); }
.status-processing { background: #eef1e9; color: var(--sage); }
.status-delivered { background: #e6f0e5; color: var(--success); }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.admin-flex-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 14px; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.stat-card .num { font-family: var(--display); font-size: 34px; color: var(--terracotta); }
.stat-card .lbl { font-size: 12.5px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }
@media (max-width: 800px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 18px 20px; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-main { padding: 24px; }
  .stat-cards { grid-template-columns: 1fr; }
}

/* ============================================
   TOAST / ALERTS
   ============================================ */
.toast {
  position: fixed; bottom: 26px; right: 26px; z-index: 999;
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: var(--radius-sm);
  font-size: 14px; box-shadow: 0 10px 26px rgba(0,0,0,0.18);
  transform: translateY(20px); opacity: 0; transition: all 0.3s ease; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px; }
.alert-error { background: #fbe9e5; color: var(--danger); }
.alert-success { background: #e6f0e5; color: var(--success); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: var(--ink); color: #d9d0c3; padding: 64px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
.footer-grid h4 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #a89d8c; margin-bottom: 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.footer-links a:hover { color: #e8b394; }
.footer-social { display: flex; gap: 14px; margin-top: 18px; }
.footer-social a { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { border-color: #e8b394; color: #e8b394; }
.footer-social svg { width: 16px; height: 16px; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 12.5px; color: #a89d8c; flex-wrap: wrap; gap: 10px; }

/* whatsapp floating button */
.whatsapp-float {
  position: fixed; bottom: 24px; left: 24px; z-index: 300;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(37,211,102,0.4);
}
.whatsapp-float svg { width: 28px; height: 28px; fill: #fff; }

.loading-state { text-align: center; padding: 60px 0; color: var(--ink-dim); }

/* ============================================
   LUXURY UPGRADE — gradients, glow, glass panels
   ============================================ */
.luxe-heading {
  background: linear-gradient(100deg, var(--ink) 0%, var(--terracotta) 55%, var(--terracotta-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: -20% -10% auto -10%;
  height: 480px;
  background: radial-gradient(ellipse at 30% 0%, rgba(193,96,63,0.14), transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(111,125,95,0.12), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid { position: relative; z-index: 1; }

.category-card {
  position: relative;
  backdrop-filter: blur(6px);
  background: linear-gradient(160deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  border: 1px solid rgba(193,96,63,0.18);
}
.category-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--terracotta), transparent 40%, var(--sage) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.category-card:hover::after { opacity: 1; }

.btn-solid {
  background: linear-gradient(135deg, var(--terracotta), var(--terracotta-dark));
  box-shadow: 0 6px 18px rgba(193,96,63,0.28);
}
.btn-solid:hover {
  background: linear-gradient(135deg, var(--terracotta-dark), var(--terracotta));
  box-shadow: 0 10px 26px rgba(193,96,63,0.4);
  transform: translateY(-1px);
}

.product-card {
  position: relative;
}
.product-card::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(193,96,63,0.35), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.product-card:hover::before { opacity: 1; }

.section-head h2 { position: relative; }

/* ============================================
   BESTSELLERS — auto-sliding carousel
   ============================================ */
.carousel-section {
  background: linear-gradient(180deg, var(--surface-2), var(--bg));
  padding: 90px 0;
  overflow: hidden;
}
.carousel-viewport {
  overflow: hidden;
  margin-top: 10px;
}
.carousel-track {
  display: flex;
  gap: 22px;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.carousel-track .product-card {
  flex: 0 0 260px;
}
@media (max-width: 700px) {
  .carousel-track .product-card { flex-basis: 200px; }
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-strong);
  border: none; padding: 0; cursor: pointer;
  transition: all 0.25s ease;
}
.carousel-dot.active { background: var(--terracotta); width: 22px; border-radius: 5px; }

/* ============================================
   PRODUCT IMAGE ZOOM LIGHTBOX
   ============================================ */
.img-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.img-lightbox.show { opacity: 1; }
.img-lightbox img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.img-lightbox.show img { transform: scale(1); }
.img-lightbox-close {
  position: absolute; top: 20px; right: 28px;
  background: none; border: none; color: #fff;
  font-size: 40px; line-height: 1; cursor: pointer;
  opacity: 0.8;
}
.img-lightbox-close:hover { opacity: 1; }
.pd-media { position: relative; }
.pd-media::after {
  content: "🔍 Click to zoom";
  position: absolute; bottom: 14px; right: 14px;
  background: rgba(0,0,0,0.65); color: #fff;
  font-size: 12px; padding: 6px 12px; border-radius: 20px;
  pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
}
.pd-media:hover::after { opacity: 1; }

/* ============================================
   RESPONSIVE — mobile, tablet & laptop support
   ============================================ */
html, body { max-width: 100vw; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > .site-footer { margin-top: auto; }
.admin-shell, .admin-login-wrap { flex: 1; }
img, video, iframe, svg { max-width: 100%; }
iframe { border: 0; }
input, textarea, select, button { max-width: 100%; }
input[type="number"] { -moz-appearance: textfield; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap > table { min-width: 560px; }

.page-title { font-size: clamp(28px, 5vw, 38px); margin-bottom: 30px; }
.pd-info h1 { font-size: clamp(24px, 4vw, 32px); overflow-wrap: anywhere; }
.pd-price { font-size: clamp(22px, 4vw, 30px); }
.product-info h3, .category-card h3, .cart-item-info h4 { overflow-wrap: anywhere; }
.brand img { height: 42px; width: auto; object-fit: contain; border-radius: 6px; }
.brand span { white-space: nowrap; }

/* Mobile nav: overlay + animated toggle */
.nav-overlay {
  position: fixed; inset: 0; background: rgba(34,29,24,0.45); z-index: 150;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.nav-overlay.show { opacity: 1; pointer-events: auto; }
.nav-toggle { z-index: 250; }
.site-header.menu-open { z-index: 300; }
.nav-toggle.open { position: fixed; top: 22px; right: 22px; }
.nav-toggle.open::before { top: 9px; transform: rotate(45deg); }
.nav-toggle.open::after { bottom: 9px; transform: rotate(-45deg); }
.nav-toggle.open span { opacity: 0; }
body.nav-open { overflow: hidden; }
body.nav-open .whatsapp-float { opacity: 0; pointer-events: none; }

/* Laptops (≤1200px) */
@media (max-width: 1200px) {
  .container { padding: 0 24px; }
  .nav-links { gap: 22px; }
  .hero-grid { gap: 40px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
}

/* Tablets (≤1000px) */
@media (max-width: 1000px) {
  .section, .hero, .carousel-section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 30px 24px; }
  .pd-grid { gap: 40px; }
  .carousel-track .product-card { flex: 0 0 240px; }
}

/* Hero stacks to one column (≤860px) */
@media (max-width: 860px) {
  .hero-grid { gap: 32px; }
  .hero-media { aspect-ratio: 16/9; max-height: 420px; }
  .hero-media img { width: 100%; height: 100%; object-fit: cover; }
  .category-strip { margin-top: 44px; }
}

/* Small tablets & large phones (≤900px) */
@media (max-width: 900px) {
  .nav-links { padding: 80px 32px 40px; justify-content: flex-start; gap: 6px; font-size: 17px; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links a:hover, .nav-links a[aria-current="page"] { border-color: var(--terracotta); }
  .nav-row { padding: 14px 0; }
  .brand { font-size: 20px; }
  .top-bar .container { justify-content: center; text-align: center; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
  .admin-sidebar .brand { margin-bottom: 0; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .admin-nav a { padding: 8px 12px; font-size: 13px; }
  .admin-main { max-width: none; }
  .admin-form-grid { grid-template-columns: 1fr !important; }
}

/* Phones (≤700px) */
@media (max-width: 700px) {
  html { font-size: 15px; }
  .container { padding: 0 18px; }
  .section, .hero, .carousel-section { padding: 48px 0; }
  .section-tight { padding: 40px 0; }
  .section-head { margin-bottom: 28px; gap: 16px; }
  .section-head > .btn { width: 100%; }
  .hero h1 { font-size: clamp(30px, 8.5vw, 42px); max-width: none; }
  .hero p.lead { font-size: 16px; margin-top: 16px; }
  .hero-cta { margin-top: 24px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-media { aspect-ratio: 16/10; }
  .category-strip { margin-top: 32px; gap: 14px; }
  .category-card img { aspect-ratio: 16/9; }
  .product-grid { gap: 14px; }
  .product-info { padding: 12px 12px 14px; gap: 6px; }
  .product-info h3 { font-size: 14px; }
  .product-price { font-size: 17px; }
  .product-cat-tag { top: 8px; left: 8px; font-size: 9.5px; padding: 4px 8px; }
  .btn { padding: 12px 18px; font-size: 12.5px; }
  .btn-sm { padding: 9px 12px; font-size: 11.5px; }
  .filter-row { gap: 8px; margin-bottom: 24px; }
  .filter-chip { padding: 8px 14px; font-size: 12.5px; }
  .carousel-track { gap: 14px; }
  .carousel-track .product-card { flex: 0 0 calc(50% - 7px); }
  .carousel-dots { margin-top: 22px; }
  .ad-slot-banner { margin: 32px 0; }
  .ad-slot { padding: 18px 14px; }
  .pd-media::after { display: none; }
  .pd-media { aspect-ratio: 1/1; }
  .qty-row { flex-wrap: wrap; }
  .order-summary { position: static; padding: 20px; }
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .cart-table td { padding: 0; border: none; }
  .cart-table td:first-child { grid-column: 1 / -1; }
  .cart-item-info img { width: 60px; height: 60px; }
  .empty-state { padding: 50px 0; }
  .site-footer { padding: 44px 0 20px; margin-top: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; align-items: center; }
  .toast { left: 18px; right: 18px; bottom: 90px; text-align: center; }
  .whatsapp-float { width: 50px; height: 50px; bottom: 18px; left: 18px; }
  .whatsapp-float svg { width: 25px; height: 25px; }
  .img-lightbox { padding: 16px; }
  .img-lightbox img { max-width: 96vw; max-height: 85vh; }
  .img-lightbox-close { top: 8px; right: 14px; }
  .admin-card { padding: 18px 16px; }
  .admin-login-card { padding: 30px 22px; }
  .admin-login-wrap { padding: 20px; }
  .stat-cards { grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
  .stat-card { padding: 18px; }
  .stat-card .num { font-size: 28px; }
  .admin-table th, .admin-table td { padding: 10px 12px; font-size: 13px; }
  .admin-flex-head h1 { font-size: 22px !important; }
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .top-bar { font-size: 11.5px; padding: 6px 0; }
  .top-bar .container { gap: 6px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand img { height: 34px; }
  .nav-links { width: min(300px, 85vw); }
  .hero h1 { font-size: clamp(28px, 9vw, 36px); }
  .hero-cta .btn { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-info { padding: 10px; }
  .product-info .btn-sm { padding: 8px 10px; font-size: 11px; letter-spacing: 0.02em; }
  .carousel-track .product-card { flex: 0 0 calc(100% - 40px); }
  .section-head h2 { font-size: clamp(24px, 7vw, 30px); }
  .eyebrow { font-size: 11px; margin-bottom: 10px; }
  .page-title { font-size: clamp(26px, 8vw, 32px); }
  .qty-control button { width: 40px; height: 40px; }
  .qty-control input { width: 44px; }
}

/* Touch devices: bigger tap targets, no hover-only affordances */
@media (hover: none) and (pointer: coarse) {
  .btn, .filter-chip, .nav-links a, .admin-nav a { min-height: 44px; }
  .carousel-dot { width: 12px; height: 12px; }
  .carousel-dot.active { width: 26px; }
  .product-card:hover, .category-card:hover, .btn-solid:hover { transform: none; }
  .pd-media::after { display: none; }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .nav-links { padding-top: 60px; justify-content: flex-start; overflow-y: auto; }
  .hero { padding: 40px 0; }
}

/* Large desktop */
@media (min-width: 1600px) {
  .container { max-width: 1320px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* Admin pages on phones: keep everything inside the screen */
.admin-main, .admin-card, .pd-grid > *, .form-grid > * { min-width: 0; }
.admin-shell { max-width: 100%; overflow-x: clip; }
.admin-table { table-layout: auto; }
.admin-table td, .admin-table th { white-space: nowrap; }
.admin-table td:nth-child(2) { white-space: normal; min-width: 120px; }
.table-wrap { scrollbar-width: thin; }
@media (max-width: 700px) {
  .admin-main { padding: 20px 14px; }
  .admin-sidebar { padding: 12px 14px; }
  .admin-sidebar .brand { font-size: 17px; }
  .admin-nav a { padding: 8px 10px; font-size: 12.5px; }
  .admin-table td .btn { margin: 2px 0; }
  .admin-table img { width: 40px; height: 40px; }
}
@media (max-width: 700px) {
  .table-wrap::before { content: "Swipe left / right to see all columns →"; display: block; font-size: 11.5px; color: var(--ink-dim); margin-bottom: 8px; }
  .table-wrap { border-radius: var(--radius); }
}

/* "View more" / "Load more" row under product grids */
.grid-more { grid-column: 1 / -1; text-align: center; padding-top: 10px; }
.grid-more-count { font-size: 13px; margin-bottom: 12px; }
.grid-more .btn { min-width: 220px; }
@media (max-width: 480px) { .grid-more .btn { width: 100%; } }
