/* ============================================================
   MotherSQ — Premium UI v2
   Refined warm Indian aesthetic with editorial polish
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Brand — deep saffron/terracotta on warm cream */
  --color-primary:        #c44518;   /* signature terracotta */
  --color-primary-dark:   #9a3412;   /* hover / active */
  --color-primary-darker: #7a2911;
  --color-primary-light:  #fde8d9;   /* tint background */
  --color-primary-pale:   #fef5ee;   /* very subtle wash */

  --color-accent:         #166534;   /* deep forest (price/success) */
  --color-accent-light:   #dcfce7;
  --color-gold:           #b88930;   /* premium accent (badges, stars) */

  /* Neutrals — warm grayscale */
  --color-bg:             #faf6f0;   /* page bg (warm ivory) */
  --color-bg-elevated:    #ffffff;
  --color-bg-subtle:      #f4ede4;
  --color-surface:        #ffffff;
  --color-surface-soft:   #fbf7f1;
  --color-border:         #ede4d6;
  --color-border-strong:  #d9cdb9;
  --color-divider:        #f0e8da;

  /* Text */
  --color-text:           #1f1a16;
  --color-text-main:      #1f1a16;
  --color-text-soft:      #4a423b;
  --color-text-muted:     #847868;
  --color-text-faint:     #a89c8c;
  --color-text-on-dark:   #fbf7f1;

  /* Feedback */
  --color-success:        #16a34a;
  --color-success-bg:     #ecfdf5;
  --color-success-text:   #166534;
  --color-error:          #dc2626;
  --color-error-bg:       #fef2f2;
  --color-error-text:     #991b1b;
  --color-info-bg:        #eff6ff;
  --color-info-text:      #1e40af;

  /* Spacing (4px scale) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows (soft, layered) */
  --shadow-xs: 0 1px 2px rgba(31, 26, 22, 0.04);
  --shadow-sm: 0 1px 3px rgba(31, 26, 22, 0.06), 0 1px 2px rgba(31, 26, 22, 0.04);
  --shadow-md: 0 4px 12px rgba(31, 26, 22, 0.06), 0 2px 4px rgba(31, 26, 22, 0.04);
  --shadow-lg: 0 12px 28px rgba(31, 26, 22, 0.10), 0 4px 10px rgba(31, 26, 22, 0.05);
  --shadow-xl: 0 24px 48px rgba(31, 26, 22, 0.14), 0 8px 16px rgba(31, 26, 22, 0.06);
  --shadow-brand: 0 8px 24px rgba(196, 69, 24, 0.22);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Poppins', 'Inter', sans-serif;
  --font-heading: var(--font-head);

  /* Layout */
  --container-width: 1180px;
  --header-height: 72px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms var(--ease-out);
  --transition-slow: 320ms var(--ease-out);
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-primary-dark); }

/* ---------- 3. TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
  color: var(--color-text-main);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.015em; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

p { margin: 0 0 var(--space-3); color: var(--color-text-soft); }
small { color: var(--color-text-muted); font-size: 13px; }

/* Underline accent for major section h2 (only inside section-head) */
.section-head h2 { position: relative; padding-bottom: var(--space-3); margin-bottom: 0; }
.section-head h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 40px; height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
  border-radius: 2px;
}

/* ---------- 4. LAYOUT ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section-wrap {
  padding: var(--space-9) 0;
}
.section-surface {
  background: var(--color-surface);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
  flex-wrap: wrap;
}

.row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- 5. HEADER / NAVBAR ---------- */
header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-5);
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--color-primary) !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand::before {
  content: '';
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-gold) 100%);
  box-shadow: var(--shadow-brand);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--color-text-soft) !important;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover {
  color: var(--color-primary) !important;
  background: var(--color-primary-pale);
}
.nav-links a[href*="login"] {
  background: var(--color-primary);
  color: #fff !important;
  padding: 9px 18px;
  margin-left: var(--space-2);
  box-shadow: var(--shadow-sm);
}
.nav-links a[href*="login"]:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-brand);
}

#cartCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

@media (max-width: 720px) {
  .navbar { height: auto; flex-direction: column; padding: var(--space-3) 0; gap: var(--space-3); }
  .nav-links { gap: 4px; justify-content: center; }
  .nav-links a { padding: 6px 10px; font-size: 13px; }
  .nav-links a[href*="login"] { padding: 6px 14px; margin-left: 0; }
}

/* ---------- 6. BUTTONS ---------- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
button:hover, .btn:hover {
  background: var(--color-primary-dark);
  color: #fff;
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}
button:active, .btn:active { transform: translateY(0); }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text-main);
  border-color: var(--color-border-strong);
  box-shadow: none;
}
.btn-secondary:hover {
  background: var(--color-primary-pale);
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-main);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--color-bg-subtle); color: var(--color-primary); box-shadow: none; }

.btn-block { width: 100%; }

.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius-md); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- 7. FORMS ---------- */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-soft);
  margin-bottom: 6px;
  letter-spacing: 0.005em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-main);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
input:hover, select:hover, textarea:hover { border-color: var(--color-text-faint); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(196, 69, 24, 0.12);
  background: #fff;
}

textarea { resize: vertical; min-height: 80px; }

select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23847868' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  appearance: none;
  -webkit-appearance: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- 8. PANELS / CARDS ---------- */
.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-5);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition);
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-strong);
}
.card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--color-bg-subtle);
  transition: transform var(--transition-slow);
}
.card:hover img { transform: scale(1.04); }

.card-body {
  padding: var(--space-4) var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.card-body h3 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text-main);
}
.card-body .price {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-head);
  margin-top: var(--space-1);
}
.card-body .row {
  margin-top: auto;
  padding-top: var(--space-3);
  gap: var(--space-2);
}
.card-body .row .btn-secondary { flex: 0 0 auto; padding: 9px 14px; font-size: 13px; }
.card-body .row button { flex: 1; padding: 10px 14px; font-size: 13px; }

/* Chip / tag */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  background: var(--color-primary-light);
  border-radius: var(--radius-pill);
}

/* ---------- 9. HERO SECTION ---------- */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #fef5ee 0%, #fde8d9 55%, #fbd4b8 100%);
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: -10% 0 0 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(196, 69, 24, 0.12), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(184, 137, 48, 0.14), transparent 55%);
  will-change: transform;
  z-index: -1;
}
.hero-decor { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero-decor-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
}
.hero-decor-circle.c1 { width: 320px; height: 320px; top: -80px; right: -60px;  background: #f5a87d; }
.hero-decor-circle.c2 { width: 240px; height: 240px; bottom: -60px; left: -40px; background: #e8c378; }
.hero-decor-circle.c3 { width: 180px; height: 180px; top: 40%; right: 30%; background: #f8c4a6; opacity: 0.35; }

.hero-content {
  position: relative;
  padding: var(--space-9) 0;
  max-width: 760px;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(196, 69, 24, 0.15);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
  backdrop-filter: blur(8px);
}
.hero-title {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-4);
  color: var(--color-text-main);
}
.hero-subtitle {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: var(--color-text-soft);
  margin: 0 0 var(--space-6);
  max-width: 560px;
}
.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-7);
}
.hero-btn-primary { padding: 14px 28px; font-size: 15px; border-radius: var(--radius-md); box-shadow: var(--shadow-brand); }
.hero-btn-secondary {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-text-main);
  border: 1px solid var(--color-border-strong);
  backdrop-filter: blur(8px);
}
.hero-btn-secondary:hover { background: #fff; color: var(--color-primary-dark); border-color: var(--color-primary); }

.hero-stats {
  display: flex;
  gap: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(196, 69, 24, 0.15);
  flex-wrap: wrap;
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat strong {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
}
.hero-stat span { font-size: 12px; color: var(--color-text-muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; }

@media (max-width: 640px) {
  .hero-section { min-height: 480px; }
  .hero-stats { gap: var(--space-4); }
  .hero-stat strong { font-size: 20px; }
}

/* ---------- 10. CATEGORIES GRID ---------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
@media (max-width: 900px) { .categories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .categories-grid { grid-template-columns: 1fr; } }

.cat-card {
  display: block;
  padding: var(--space-6) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  text-decoration: none;
  color: var(--color-text-main) !important;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition);
}
.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}
.cat-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}
.cat-card:hover .cat-icon { transform: scale(1.08) rotate(-3deg); }
.cat-card h3 { font-size: 17px; margin: 0 0 6px; color: var(--color-text-main); }
.cat-card p { font-size: 13px; color: var(--color-text-muted); margin: 0; line-height: 1.5; }

/* ---------- 11. TRUST STRIP ---------- */
.trust-strip {
  background: var(--color-bg-subtle);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-6) 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
@media (max-width: 900px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .trust-grid { grid-template-columns: 1fr; } }

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.trust-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}
.trust-item strong { display: block; font-family: var(--font-head); font-size: 14px; color: var(--color-text-main); margin-bottom: 2px; }
.trust-item span { display: block; font-size: 12px; color: var(--color-text-muted); }

/* ---------- 12. TESTIMONIALS ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 900px) { .testimonials-grid { grid-template-columns: 1fr; } }

.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 8px;
  right: 24px;
  font-family: var(--font-head);
  font-size: 80px;
  line-height: 1;
  color: var(--color-primary-light);
  z-index: 0;
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.testimonial-stars { color: var(--color-gold); font-size: 16px; margin-bottom: var(--space-3); letter-spacing: 2px; position: relative; }
.testimonial-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-soft);
  margin: 0 0 var(--space-4);
  font-style: italic;
  position: relative;
}
.testimonial-author { display: flex; align-items: center; gap: var(--space-3); position: relative; }
.testimonial-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-gold));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
}
.testimonial-author strong { display: block; font-size: 14px; color: var(--color-text-main); }
.testimonial-author span { display: block; font-size: 12px; color: var(--color-text-muted); }

/* ---------- 13. TABLES ---------- */
.table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--color-bg-subtle);
  border-bottom: 1px solid var(--color-border);
}

th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  font-size: 14px;
  color: var(--color-text-main);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--color-surface-soft); }

#cartTableBody input[type="number"] {
  width: 70px;
  padding: 7px 10px;
  text-align: center;
}

.empty-state {
  text-align: center !important;
  padding: var(--space-8) var(--space-4) !important;
  color: var(--color-text-muted);
  font-size: 14px;
}
.empty-state a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
}

/* ---------- 14. MESSAGES ---------- */
.message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--space-4);
  border-left: 3px solid transparent;
}
.message:empty { display: none; }
.message.success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border-left-color: var(--color-success);
}
.message.error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border-left-color: var(--color-error);
}
.message.info {
  background: var(--color-info-bg);
  color: var(--color-info-text);
  border-left-color: #3b82f6;
}

/* ---------- 15. FOOTER (DARK, RICH) ---------- */
footer { background: #fff; }

footer.footer-main {
  background: linear-gradient(180deg, #1f1a16 0%, #15110e 100%);
  color: var(--color-text-on-dark);
  padding: var(--space-8) 0 0;
  margin-top: var(--space-9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-6);
  padding-bottom: var(--space-7);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-5); } }

.footer-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}
.footer-brand::before {
  content: '';
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-gold) 100%);
  box-shadow: 0 4px 12px rgba(196, 69, 24, 0.4);
}
.footer-tagline {
  color: rgba(251, 247, 241, 0.65);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: var(--space-4);
  max-width: 320px;
}
.footer-coupons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.footer-coupons small {
  width: 100%;
  font-size: 12px;
  color: rgba(251, 247, 241, 0.5);
  margin-top: 6px;
}
.footer-chip {
  background: rgba(196, 69, 24, 0.18);
  color: #fbd4b8 !important;
  border: 1px dashed rgba(196, 69, 24, 0.5);
  font-weight: 700;
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 var(--space-4);
}
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links li { color: rgba(251, 247, 241, 0.7); font-size: 14px; }
.footer-links a {
  color: rgba(251, 247, 241, 0.7) !important;
  text-decoration: none;
  transition: color var(--transition), padding var(--transition);
  font-size: 14px;
}
.footer-links a:hover { color: #fff !important; padding-left: 4px; }

.footer-payment-note {
  margin-top: var(--space-3);
  font-size: 12px;
  color: rgba(251, 247, 241, 0.45);
}

.footer-bottom {
  border-top: 1px solid rgba(251, 247, 241, 0.08);
  padding: var(--space-4) 0;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 13px;
  color: rgba(251, 247, 241, 0.55);
}

/* ---------- 16. PAGE BANNER (inner pages) ---------- */
.page-banner {
  background: linear-gradient(135deg, #fef5ee 0%, #fde8d9 100%);
  padding: var(--space-7) 0 var(--space-7);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(196, 69, 24, 0.10), transparent 70%);
  border-radius: 50%;
}
.page-banner-slim { padding: var(--space-5) 0; }
.page-banner-crumb {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  letter-spacing: 0.02em;
  position: relative;
}
.page-banner-crumb a { color: var(--color-text-muted); text-decoration: none; }
.page-banner-crumb a:hover { color: var(--color-primary); }

.page-banner-title {
  font-family: var(--font-head);
  color: var(--color-text-main) !important;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 var(--space-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
}
.page-banner-title::after { display: none !important; }
.page-banner-sub {
  color: var(--color-text-soft);
  font-size: 15px;
  margin: 0;
  position: relative;
}

.page-main { padding: var(--space-7) 0 var(--space-8); min-height: 420px; }

/* Default vertical breathing room for any <main> that doesn't have .page-main */
main:not(.page-main) {
  padding-top: var(--space-5);
}
body[data-page="home"] main:not(.page-main) {
  padding-top: 0; /* hero already provides top spacing */
}

/* ---------- 17. FILTER BAR ---------- */
.filter-bar .form-grid {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: var(--space-3);
}
@media (max-width: 640px) { .filter-bar .form-grid { grid-template-columns: 1fr; } }

/* ---------- 18. CART / CHECKOUT / AUTH ---------- */
.cart-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}
.cart-summary-total {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-size: 15px;
  color: var(--color-text-soft);
}
.cart-summary-total strong {
  color: var(--color-primary);
  font-size: 24px;
  font-family: var(--font-head);
  font-weight: 700;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }

.section-subhead {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--color-text-main);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.trust-note {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--color-text-soft);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  max-width: 880px;
  margin: 0 auto;
}
@media (max-width: 700px) { .auth-grid { grid-template-columns: 1fr; } }
.auth-panel-icon {
  font-size: 32px;
  margin-bottom: var(--space-2);
  text-align: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-pale);
  border: 1px solid var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}

.profile-form { max-width: 720px; margin: 0 auto; }

/* ---------- 19. ORDER SUCCESS ---------- */
.success-page { display: flex; justify-content: center; align-items: flex-start; }
.success-card { max-width: 560px; width: 100%; text-align: center; padding: var(--space-7) var(--space-6); }
.success-check-wrap { display: flex; justify-content: center; margin-bottom: var(--space-4); }
.success-check {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px var(--color-success);
}
.success-title { font-size: 26px; color: var(--color-text-main); margin: 0 0 var(--space-2); }
.success-msg { color: var(--color-text-soft); margin-bottom: var(--space-6); font-size: 15px; }
.success-order-box {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-5);
  text-align: left;
}
.success-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  font-size: 14px;
  color: var(--color-text-soft);
}
.success-row:last-child { border-bottom: none; }
.success-row strong { color: var(--color-text-main); font-weight: 600; }
.success-total-row {
  background: var(--color-primary-pale);
  font-weight: 600;
  font-size: 16px;
}
.success-total-row strong { color: var(--color-primary); font-size: 18px; }

/* ---------- 20. PRODUCT DETAIL SKELETON ---------- */
.product-detail-skeleton {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
@media (max-width: 700px) { .product-detail-skeleton { grid-template-columns: 1fr; } }
.skeleton-img {
  background: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-info { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-2); }
.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: var(--color-bg-subtle);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w30 { width: 30%; }
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---------- 21. SCROLL REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 22. ADMIN BADGE ---------- */
.admin-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: var(--space-2);
  vertical-align: middle;
}
.thumb-sm {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

/* ---------- 23. ACCESSIBILITY ---------- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}
button:focus-visible, .btn:focus-visible {
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .nav-links a, button, .btn, input, select { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 24. UTILITY ---------- */
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }
.hidden { display: none !important; }
