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

/* =====================================================
   CSS VARIABLES
   ===================================================== */
:root {
  --bg: #ffffff;
  --surface: #f7f9fc;
  --surface-2: #eef3fb;
  --line: #e5eaf3;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-glow: rgba(37,99,235,.18);
  --accent: #f97316;
  --accent-strong: #ea580c;
  --accent-glow: rgba(249,115,22,.18);
  --topbar: #0f172a;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 18px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow: 0 4px 20px rgba(15,23,42,.08);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.14);
  --shadow-glow: 0 0 0 4px var(--primary-glow);
  --container: 1440px;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* =====================================================
   RESET
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

/* =====================================================
   KEYFRAME ANIMATIONS
   ===================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes kenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes counterUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes badgePop {
  0%  { transform: scale(0); }
  70% { transform: scale(1.2); }
  100%{ transform: scale(1); }
}

/* =====================================================
   SCROLL REVEAL SYSTEM
   ===================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left { opacity: 0; transform: translateX(-28px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.reveal-left.in-view { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(28px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.reveal-right.in-view { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.9); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.reveal-scale.in-view { opacity: 1; transform: scale(1); }

.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }
.reveal-d6 { transition-delay: 0.48s; }

/* =====================================================
   LAYOUT
   ===================================================== */
.container { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; }
.site-shell { min-height: 100vh; }
.site-main { padding: 0 0 64px; }
.surface-page { background: linear-gradient(180deg, #fff 0, #f8faff 400px, #fff 401px); }
.full-bleed { width: 100%; }
.section { padding: 48px 0; }

/* =====================================================
   UTILITY BAR — MARQUEE TICKER
   ===================================================== */
.utility-bar {
  background: var(--topbar);
  color: #c8d8f8;
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  position: relative;
}
.utility-inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.utility-ticker-wrap {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}
.utility-ticker {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
  gap: 0;
}
.utility-ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}
.utility-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
}
.utility-pill:last-child { border-right: none; }
.utility-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; font-size: 12px; color: #94a3b8; }
.utility-right a { color: #c8d8f8; }
.utility-right a:hover { color: #fff; }

/* =====================================================
   HEADER — STICKY + SCROLL COMPACT
   ===================================================== */
.store-header, .ref-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease-smooth), padding 0.3s var(--ease-smooth);
  will-change: box-shadow;
}
.store-header.scrolled, .ref-header.scrolled {
  box-shadow: 0 4px 24px rgba(15,23,42,.10);
}
.header-main, .ref-header-main {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 0;
  transition: padding 0.3s var(--ease-smooth);
}
.ref-header.scrolled .ref-header-main { padding: 12px 0; }

/* Logo */
.ref-logo {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 160px;
  flex-shrink: 0;
}
.ref-logo h1 {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.ref-logo h1 span { color: var(--primary); }
.ref-logo h1 em { color: var(--accent); font-style: normal; }
.ref-logo small { color: var(--muted); font-size: 11px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none;
}
.brand-copy strong { display: block; font-size: 17px; line-height: 1.1; }
.brand-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }

/* Search */
.search-shell, .ref-search-shell { position: relative; flex: 1; max-width: none; }
.search-form-main, .ref-search-form {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid rgba(37,99,235,.22);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-form-main:focus-within, .ref-search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.search-form-main input, .ref-search-form input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 14px 18px;
  font-size: 14.5px;
  color: var(--text);
}
.search-form-main button, .ref-search-form button {
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  width: 58px;
  height: 50px;
  cursor: pointer;
  font-size: 22px;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.search-form-main button:hover, .ref-search-form button:hover { opacity: 0.9; }

.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px);
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 20;
  animation: slideDown 0.2s var(--ease-out);
}
.search-suggest a {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 14px; border-radius: 10px; font-size: 14px;
  transition: background 0.15s ease;
}
.search-suggest a:hover, .search-suggest a.active { background: var(--surface); }
.search-suggest small { color: var(--muted); font-weight: 600; }

/* Header Actions */
.header-actions, .ref-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.header-action {
  min-width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #5e6679;
  font-size: 12px;
  padding: 8px 6px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-bounce);
  position: relative;
}
.header-action:hover {
  background: var(--surface);
  color: var(--primary);
  transform: translateY(-2px);
}
.header-action-icon { font-size: 22px; line-height: 1; position: relative; }
.cart-badge {
  position: absolute;
  top: -6px; right: -10px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  animation: badgePop 0.4s var(--ease-bounce);
}

/* Mobile nav toggle */
.mobile-nav-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
}
.mobile-nav-toggle:hover { background: var(--surface); }

/* =====================================================
   MEGA NAV
   ===================================================== */
.mega-nav, .ref-nav {
  border-top: 1px solid var(--line);
  background: #fff;
}
.mega-nav-row, .ref-nav-row {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: visible;
  position: relative;
  flex-wrap: nowrap;
  justify-content: flex-start;
}
.mega-nav-row::-webkit-scrollbar { display: none; }
.mega-item { position: static; flex: none; }
.mega-link, .ref-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #2b3246;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.mega-link:hover, .mega-item.open .mega-link,
.ref-nav-link:hover { color: var(--primary); border-color: var(--primary); }
.home-item .ref-nav-link { font-weight: 800; color: var(--text); }
.mega-link img { width: 16px; height: 16px; object-fit: contain; }
.mega-link small { font-size: 10px; color: #94a3b8; }
.ref-nav-link img { display: none; }

.mega-dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  display: none;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-top: none;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 24px 24px;
  padding: 28px;
  z-index: 50;
  animation: slideDown 0.22s var(--ease-out);
}
.mega-item:hover .mega-dropdown, .mega-item.open .mega-dropdown { display: block; }
.mega-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr)) 280px;
  gap: 24px;
}
.mega-col h4 {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.mega-col a {
  display: block;
  padding: 8px 0;
  color: #52607a;
  font-size: 14px;
  transition: color 0.15s ease, padding-left 0.15s ease;
}
.mega-col a:hover { color: var(--primary); padding-left: 4px; }
.mega-promo {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  min-height: 240px;
  background: #dbeafe;
}
.mega-promo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.mega-promo:hover img { transform: scale(1.04); }
.mega-promo-copy {
  position: absolute;
  left: 18px; right: 18px; bottom: 16px;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,.45);
}
.mega-promo-copy strong { display: block; font-size: 20px; margin-bottom: 6px; }

/* =====================================================
   FLASH MESSAGES
   ===================================================== */
.flash { margin: 0 0 20px; padding: 14px 16px; border-radius: 14px; font-weight: 600; }
.flash.success { background: #dcfce7; color: #166534; }
.flash.warning { background: #fff7d6; color: #9a6700; }
.flash.danger  { background: #fee2e2; color: #991b1b; }

/* =====================================================
   HERO — CROSSFADE + KEN BURNS
   ===================================================== */
.ref-hero-section {
  position: relative;
  background: #0f172a;
  overflow: hidden;
  min-height: 500px;
}
.ref-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.85s var(--ease-smooth);
  pointer-events: none;
}
.ref-hero-slide.active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
  position: relative;
  min-height: 500px;
}
.ref-hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0s;
}
.ref-hero-slide.active > img {
  animation: kenBurns 8s ease forwards;
}
.ref-hero-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.78;
}
.ref-hero-overlay.theme-fashion    { background: linear-gradient(105deg, #1d4ed8, #7c3aed); }
.ref-hero-overlay.theme-mobiles    { background: linear-gradient(105deg, #064e3b, #0e7490); }
.ref-hero-overlay.theme-home       { background: linear-gradient(105deg, #b45309, #c2410c); }
.ref-hero-overlay.theme-electronics{ background: linear-gradient(105deg, #5b21b6, #be185d); }
.ref-hero-overlay.theme-custom     { background: linear-gradient(105deg, #1d4ed8, #0f766e); }

.ref-hero-content-wrap {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  z-index: 2;
}
.ref-hero-content {
  max-width: 600px;
  color: #fff;
  padding: 32px 0;
}
.ref-hero-content h2 {
  margin: 0 0 16px;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
  animation: fadeUp 0.7s var(--ease-out) both;
}
.ref-hero-content p {
  margin: 0 0 28px;
  color: rgba(255,255,255,.88);
  font-size: 18px;
  line-height: 1.65;
  animation: fadeUp 0.7s 0.12s var(--ease-out) both;
}
.ref-hero-content .btn {
  animation: fadeUp 0.7s 0.22s var(--ease-out) both;
}

/* Hero nav arrows + dots */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #fff;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s var(--ease-bounce);
}
.hero-arrow:hover { background: rgba(255,255,255,.28); transform: translateY(-50%) scale(1.08); }
.hero-arrow-prev { left: 20px; }
.hero-arrow-next { right: 20px; }

.hero-dots {
  position: absolute;
  left: 50%; bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.hero-dot {
  width: 8px; height: 8px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
}
.hero-dot.active { width: 28px; background: #fff; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 14px;
  border: none;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s ease, opacity 0.2s;
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--primary-glow); opacity: 0.95; }
.btn:active { transform: translateY(0); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}
.btn-accent:hover { box-shadow: 0 8px 24px var(--accent-glow); }

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid rgba(37,99,235,.35);
  box-shadow: none;
}
.btn-outline:hover { background: var(--primary); color: #fff; box-shadow: 0 8px 24px var(--primary-glow); }

.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.btn-wide { min-width: 170px; }

/* Ripple */
.btn .ripple {
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  width: 10px; height: 10px;
  margin-top: -5px; margin-left: -5px;
  animation: ripple 0.5s linear;
  pointer-events: none;
}

/* =====================================================
   SECTION HEADS
   ===================================================== */
.ref-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}
.ref-section-title.center { text-align: center; }
.ref-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ref-section-head h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
.ref-section-head a {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}
.ref-section-head a:hover { gap: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-family: 'Poppins', sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.section-head a { font-size: 13.5px; font-weight: 700; color: var(--primary); }

/* =====================================================
   DEPARTMENT GRID
   ===================================================== */
.ref-department-grid {
  display: grid;
  grid-template-columns: repeat(13, minmax(0,1fr));
  gap: 12px;
}
.ref-department-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.25s ease, transform 0.25s var(--ease-bounce), box-shadow 0.25s ease;
}
.ref-department-item:hover {
  background: #fff;
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.ref-department-icon {
  width: 58px; height: 58px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s var(--ease-bounce);
}
.ref-department-item:hover .ref-department-icon {
  box-shadow: 0 6px 20px var(--primary-glow);
  transform: scale(1.08);
}
.ref-department-icon img { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; }
.ref-department-name { text-align: center; font-size: 11.5px; font-weight: 700; line-height: 1.3; }

/* =====================================================
   PRODUCT CARDS
   ===================================================== */
.ref-product-grid, .ref-listing-grid, .ref-showcase-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 16px;
}
.ref-listing-grid  { grid-template-columns: repeat(4, minmax(0,1fr)); }
.ref-showcase-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.ref-showcase-stack { display: grid; gap: 40px; }

.modern-product-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease-smooth), transform 0.3s var(--ease-bounce), border-color 0.3s ease;
  will-change: transform;
}
.modern-product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  border-color: transparent;
}

.reference-thumb, .product-thumb-modern {
  background: var(--surface);
  aspect-ratio: 1/1;
  display: block;
  overflow: hidden;
  position: relative;
}
.reference-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease-smooth);
}
.modern-product-card:hover .reference-thumb img { transform: scale(1.07); }

.wishlist-icon {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,.92);
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 16px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(15,23,42,.12);
  transition: transform 0.2s var(--ease-bounce), background 0.2s ease;
  z-index: 2;
}
.wishlist-icon:hover { transform: scale(1.18); background: #fff; }

.tag-badge, .tag-muted {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  z-index: 2;
}
.modern-product-card .tag-badge { background: #ef4444; color: #fff; }
.modern-product-card .tag-muted { background: #e2e8f0; color: #475569; }

.reference-product-copy { padding: 14px; }
.product-card-brand { margin: 0 0 4px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.reference-product-copy h3 {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.45;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.reference-rating-row { margin-bottom: 10px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.modern-product-card .btn { border-radius: 10px; padding: 10px 12px; font-size: 13.5px; width: 100%; }

/* Price */
.price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.price-final { font-size: 17px; font-weight: 800; color: var(--text); }
.price-mrp { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.price-discount { font-size: 12px; font-weight: 700; color: var(--success); }

/* =====================================================
   PROMO BANNERS
   ===================================================== */
.ref-promo-section { background: var(--surface); }
.ref-promo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 20px;
}
.ref-promo-card {
  position: relative;
  display: block;
  min-height: 240px;
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s ease;
}
.ref-promo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ref-promo-card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-smooth);
}
.ref-promo-card:hover img { transform: scale(1.04); }
.ref-promo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,23,42,.72), rgba(15,23,42,.18));
}
.ref-promo-copy {
  position: absolute;
  inset: 0;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  z-index: 1;
}
.ref-promo-copy h3 { margin: 0 0 8px; font-family: 'Poppins', sans-serif; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.ref-promo-copy p { margin: 0 0 16px; color: rgba(255,255,255,.88); max-width: 28rem; line-height: 1.5; }
.ref-promo-btn {
  display: inline-flex;
  width: max-content;
  background: #fff;
  color: #0f172a;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  transition: background 0.2s, transform 0.2s var(--ease-bounce);
}
.ref-promo-btn:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

/* =====================================================
   SERVICE / TRUST STRIP
   ===================================================== */
.ref-service-section { background: var(--surface); }
.ref-service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px;
}
.ref-service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.3s ease, transform 0.3s var(--ease-bounce);
}
.ref-service-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.ref-service-card strong { font-size: 16px; font-weight: 700; }
.ref-service-card span { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.service-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.service-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: box-shadow 0.25s ease, transform 0.25s var(--ease-bounce);
}
.service-item:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.service-item-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex: none;
}
.service-item strong { display: block; margin-bottom: 4px; font-weight: 700; }
.service-item small { display: block; color: var(--muted); line-height: 1.55; font-size: 13px; }

/* =====================================================
   HERO (old style kept for compatibility)
   ===================================================== */
.hero-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(300px,.85fr); gap: 20px; align-items: stretch; }
.hero-slider { position: relative; border-radius: 28px; overflow: hidden; background: #eff6ff; min-height: 420px; }
.hero-slide { display: none; height: 100%; position: relative; }
.hero-slide.active { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,.85fr); min-height: 420px; }
.hero-copy { padding: 56px 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex; align-items: center; width: max-content;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.86); color: var(--primary);
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.hero-copy h1 { margin: 0; font-family: 'Poppins', sans-serif; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.02; }
.hero-copy p { margin: 0; color: #42506a; font-size: 18px; line-height: 1.6; max-width: 36rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-media { position: relative; min-height: 300px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* =====================================================
   SIDE PROMO
   ===================================================== */
.side-promo-stack { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.side-promo {
  position: relative; overflow: hidden;
  border-radius: 24px; min-height: 200px;
  border: 1px solid var(--line); background: #fff;
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s ease;
}
.side-promo:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.side-promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer, .modern-footer { background: #0f172a; color: #e5ecff; margin-top: 56px; }

.footer-newsletter, .modern-newsletter {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}
.newsletter-row, .modern-newsletter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 28px 0;
}
.newsletter-copy h3 { margin: 0 0 4px; font-family: 'Poppins', sans-serif; font-size: 22px; color: #fff; font-weight: 800; }
.newsletter-copy p { margin: 0; color: rgba(255,255,255,.85); }
.newsletter-form { display: flex; min-width: min(100%, 420px); }
.newsletter-form input {
  flex: 1;
  border: none;
  border-radius: 14px 0 0 14px;
  padding: 14px 16px;
  outline: none;
  font-size: 14.5px;
}
.newsletter-form button {
  border: none;
  border-radius: 0 14px 14px 0;
  padding: 0 20px;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--accent); }

.footer-main, .modern-footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 40px 0;
}
.footer-main h4, .modern-footer-main h4 { margin: 0 0 16px; font-size: 16px; font-weight: 700; color: #fff; }
.footer-main p, .footer-main a, .modern-footer-main p, .modern-footer-main a {
  display: block;
  color: #94a3b8;
  font-size: 13.5px;
  line-height: 1.9;
  transition: color 0.2s ease;
}
.footer-main a:hover, .modern-footer-main a:hover { color: #fff; }
.footer-bottom, .modern-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0;
  color: #64748b;
  font-size: 13px;
}
.footer-bottom-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }

/* =====================================================
   CATEGORY PAGES
   ===================================================== */
.ref-category-hero {
  position: relative;
  background: linear-gradient(135deg, #1d4ed8, #4338ca);
  padding: 56px 0;
}
.ref-category-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,0));
}
.ref-category-hero-inner { position: relative; color: #fff; }
.ref-category-hero-inner h1 {
  margin: 0 0 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.ref-category-hero-inner p { margin: 0; max-width: 700px; color: rgba(255,255,255,.88); font-size: 16px; line-height: 1.6; }
.ref-breadcrumb {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 16px; font-size: 13.5px; color: rgba(255,255,255,.78);
}
.ref-breadcrumb a { color: inherit; }
.ref-product-page .ref-breadcrumb { color: var(--muted); margin-bottom: 22px; }
.ref-product-page .ref-breadcrumb a { color: var(--muted); }

.ref-category-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 28px; align-items: start; }
.ref-category-layout.single-column { grid-template-columns: minmax(0,1fr); }
.ref-category-sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 120px;
}
.ref-category-sidebar h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.ref-category-sidebar ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.ref-category-sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
}
.ref-category-sidebar a:hover { background: var(--surface); color: var(--primary); }
.ref-category-main { min-width: 0; }
.ref-sort-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.ref-sort-row p { margin: 0; color: var(--muted); font-size: 13.5px; }
.ref-sort-row select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.ref-sort-row select:focus { border-color: var(--primary); }

/* =====================================================
   PRODUCT DETAIL PAGE
   ===================================================== */
.ref-product-page { padding-top: 24px; padding-bottom: 24px; }
.ref-product-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 40px; }
.ref-product-gallery-main {
  aspect-ratio: 1/1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.ref-product-gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.ref-product-gallery-main:hover img { transform: scale(1.04); }
.product-thumb-modern { position: relative; display: block; }
.coming-soon-label {
  position: absolute; bottom: 0; left: 0; width: 100%;
  background: rgba(15,23,42,.85); color: #fff;
  text-align: center; padding: 8px 0;
  font-size: 13.5px; font-weight: 600;
  pointer-events: none;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}
.ref-product-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.ref-product-thumbs img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--line);
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s var(--ease-bounce);
}
.ref-product-thumbs img:hover { border-color: var(--accent); transform: scale(1.04); }

.ref-product-copy h1 { margin: 0 0 10px; font-family: 'Poppins', sans-serif; font-size: 32px; line-height: 1.15; letter-spacing: -0.03em; }
.modern-product-copy h1 { margin: 0 0 10px; font-family: 'Poppins', sans-serif; font-size: 34px; line-height: 1.1; }
.product-brand-label { margin: 0 0 6px; color: var(--primary); font-size: 13.5px; font-weight: 700; }
.modern-rating-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.price-hero { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 18px 0 6px; }
.price-hero strong { font-size: 38px; font-weight: 800; }
.tax-note { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.stock-line { margin: 0 0 16px; color: var(--success); font-weight: 700; }
.product-short-copy { margin: 0 0 18px; color: #4b5565; line-height: 1.7; font-size: 15px; }
.qty-row, .modern-qty-row { display: flex; align-items: center; gap: 12px; margin: 18px 0; max-width: 120px; }
.qty-row input { width: 88px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); outline: none; }
.card-actions, .product-action-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.rich-text { line-height: 1.75; color: #475569; }
.rich-text p { margin-top: 0; }
.highlight-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.highlight-list li { display: flex; gap: 10px; align-items: flex-start; color: #475569; font-size: 14px; }
.highlight-list li::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--primary); display: block; margin-top: 7px; flex: none; }
.delivery-card { display: grid; gap: 12px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); margin: 22px 0; }
.delivery-card div { display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 14px; color: #445069; }
.delivery-card strong { color: var(--text); }
.product-highlights h3 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.product-description-card { margin-top: 32px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.product-description-card h2 { margin: 0 0 12px; font-size: 22px; font-weight: 700; }
.product-description-card p { margin: 0; line-height: 1.75; color: #465267; }
.product-breadcrumbs { color: var(--muted); margin-bottom: 20px; }
.product-breadcrumbs a { color: var(--muted); }
.ref-related-products { margin-top: 44px; }

/* =====================================================
   CART / CHECKOUT / ACCOUNT
   ===================================================== */
.cart-grid, .checkout-grid, .dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr);
  gap: 24px;
}
.order-card { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.summary-card { position: sticky; top: 120px; height: max-content; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0; color: #475569; }
.summary-row.total { padding-top: 12px; border-top: 1px solid var(--line); font-weight: 800; color: var(--text); font-size: 18px; }

/* =====================================================
   BADGES
   ===================================================== */
.badge-warning, .badge-success, .badge-danger, .badge-neutral {
  display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge-warning { background: #fff7d6; color: #9a6700; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-neutral { background: #eef2ff; color: #334155; }
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface); color: #475569; }

/* =====================================================
   FORMS / AUTH
   ===================================================== */
.form-group { display: grid; gap: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.form-control {
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 14.5px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.auth-wrap { max-width: 520px; margin: 0 auto; }
.auth-card h1 { margin: 0 0 20px; font-size: 28px; font-weight: 800; text-align: center; }
.auth-card .muted { color: var(--muted); font-size: 14px; }

/* =====================================================
   PANELS / CARDS
   ===================================================== */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.trust-card h4 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.trust-card p { margin: 0; color: var(--muted); line-height: 1.65; }

/* =====================================================
   ADMIN STATS
   ===================================================== */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow 0.25s ease, transform 0.25s var(--ease-bounce); }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.stat-card strong { font-size: 32px; font-weight: 800; }

/* =====================================================
   MISC
   ===================================================== */
.muted { color: var(--muted); }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.spacer-sm { height: 12px; }
hr { border: none; border-top: 1px solid var(--line); }

.flash { margin: 0 0 20px; padding: 14px 16px; border-radius: 14px; font-weight: 600; animation: fadeUp 0.4s var(--ease-out); }
.flash.success { background: #dcfce7; color: #166534; }
.flash.warning { background: #fff7d6; color: #9a6700; }
.flash.danger  { background: #fee2e2; color: #991b1b; }
.site-flash { max-width: calc(1320px + 40px); margin: 20px auto 0; padding: 0 20px; }

.listing-hero { display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; }
.listing-copy h1 { font-family: 'Poppins', sans-serif; font-size: 44px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.03em; }
.filter-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 28px; }

/* Page headers */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 0 0 24px; }
.page-header h1 { margin: 0 0 6px; font-family: 'Poppins', sans-serif; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }

.page-hero { margin: 0 0 20px; padding: 44px 36px; border-radius: 0 0 24px 24px; }
.gradient-page-hero { background: linear-gradient(135deg, #2563eb, #38bdf8); color: #fff; }
.page-hero-inner { max-width: 720px; }
.page-hero-breadcrumbs { display: flex; gap: 10px; align-items: center; font-size: 14px; margin-bottom: 12px; color: rgba(255,255,255,.78); }
.page-hero-breadcrumbs a { color: rgba(255,255,255,.88); }
.page-hero h1 { margin: 0 0 8px; font-family: 'Poppins', sans-serif; font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
.page-hero p { margin: 0; color: rgba(255,255,255,.88); font-size: 16px; line-height: 1.6; }

/* Category sidebar */
.category-layout { display: grid; grid-template-columns: 224px minmax(0,1fr); gap: 32px; }
.category-sidebar { align-self: start; }
.category-sidebar h3 { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.category-sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.category-sidebar a { display: block; padding: 10px 12px; border-radius: 12px; font-size: 14px; color: #445069; transition: background 0.15s, color 0.15s; }
.category-sidebar a:hover { background: var(--surface); color: var(--primary); }
.category-main { min-width: 0; }
.category-sort-row { margin-bottom: 18px; }
.subcategory-lead { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.subcategory-lead h2 { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
.subcategory-lead p { margin: 0; color: var(--muted); max-width: 56rem; line-height: 1.65; }

/* Product gallery (detail) */
.modern-product-grid { align-items: start; gap: 40px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.modern-product-gallery { border-radius: 20px; background: var(--surface); }
.modern-product-thumbs { grid-template-columns: repeat(4, minmax(0,1fr)); }

.modern-footer { margin-top: 56px; }
.modern-newsletter { background: linear-gradient(135deg, #2563eb, #38bdf8); }
.modern-newsletter-row { padding: 28px 0; }
.modern-footer-main { padding: 40px 0; }
.modern-footer-bottom { padding: 18px 0; }

/* Showcase */
.ref-showcase-block { display: grid; gap: 16px; }
.ref-inline-icon { font-size: 24px; margin-right: 8px; vertical-align: -3px; }
.showcase-rows { display: grid; gap: 28px; }
.showcase-row-block { display: grid; gap: 14px; }
.compact-section-head { margin-bottom: 0; }

/* Sort / listing */
.sort-row { display: flex; align-items: center; gap: 12px; }
.listing-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Checkout / payment */
.notice-panel { margin-bottom: 18px; border-radius: 18px; padding: 16px; }
.notice-warning { background: #fff7d6; border: 1px solid #f5d87a; color: #7c5c00; }
.notice-success { background: #ecfdf3; border: 1px solid #a7f3d0; color: #166534; }
.notice-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.checkout-footnote { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.payment-method-card { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.payment-method-card.is-selected { border-color: rgba(37,99,235,.38); box-shadow: 0 0 0 4px var(--primary-glow); }
.payment-launch-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-radius: 18px; background: linear-gradient(135deg, #eff6ff, #fff); border: 1px solid rgba(37,99,235,.14); }

/* Invoice */
.invoice-shell { max-width: 980px; margin: 0 auto; }
.invoice-topbar { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.invoice-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.invoice-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.invoice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; margin-bottom: 24px; }
.invoice-grid h3 { margin: 0 0 8px; font-weight: 700; }
.invoice-table { width: 100%; border-collapse: collapse; }
.invoice-table th, .invoice-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.invoice-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; }
.invoice-totals { margin-top: 24px; margin-left: auto; max-width: 360px; }

/* Support */
.support-links { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin: 0 0 20px; }
.support-link { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow-sm); }
.support-link strong { display: block; margin-bottom: 8px; font-weight: 700; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.inline-suggestion-list { display: grid; gap: 10px; }
.inline-suggestion { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }

/* Admin */
.admin-nav { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-nav a { padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background 0.15s, color 0.15s; }
.admin-nav a:hover, .admin-nav a.active { background: var(--primary); color: #fff; }

/* Container */
.container { max-width: 1320px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.site-main > :not(.full-bleed):not(script):not(style) { max-width: 1360px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }

/* Brand colors */
.brand-primary, .footer-brand-primary { color: var(--primary); }
.brand-accent,  .footer-brand-accent  { color: var(--accent); }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 16px; }

/* Breadcrumbs */
.breadcrumbs { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); transition: color 0.15s; }
.breadcrumbs a:hover { color: var(--primary); }

/* Shimmer skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1280px) {
  .ref-department-grid { grid-template-columns: repeat(7, minmax(0,1fr)); }
  .ref-product-grid    { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 1120px) {
  .footer-main, .modern-footer-main { grid-template-columns: 1fr 1fr; }
  .service-strip, .trust-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ref-service-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1024px) {
  .ref-header-main { gap: 18px; }
  .ref-logo h1 { font-size: 30px; }
  .ref-nav { overflow-x: auto; }
  .ref-product-grid, .ref-listing-grid, .ref-showcase-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ref-category-layout, .ref-product-layout, .modern-product-grid, .filter-layout, .category-layout { grid-template-columns: 1fr; }
  .ref-category-sidebar, .category-sidebar { display: none; }
  .ref-promo-grid { grid-template-columns: 1fr; }
  .cart-grid, .checkout-grid, .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ref-department-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .hero-grid, .side-promo-stack { grid-template-columns: 1fr; }
  .newsletter-row, .modern-newsletter-row { flex-direction: column; align-items: flex-start; }
  .stats-grid, .support-links { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .ref-header-main { flex-wrap: wrap; padding: 12px 0; }
  .mobile-nav-toggle { display: block; }
  .ref-header-actions { margin-left: auto; }
  .ref-search-shell { order: 3; width: 100%; }
  .ref-hero-slide, .ref-hero-content-wrap { min-height: 380px; }
  .ref-hero-content h2 { font-size: 2.4rem; }
  .ref-department-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .ref-product-grid, .ref-listing-grid, .ref-showcase-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ref-service-grid { grid-template-columns: 1fr 1fr; }
  .mega-dropdown { position: static; min-width: 0; border-radius: 0 0 20px 20px; }
  .mega-dropdown-grid { grid-template-columns: 1fr; }
  .mega-item:hover .mega-dropdown { display: none; }
  .mega-item.open .mega-dropdown { display: block; }
  .footer-main, .modern-footer-main { grid-template-columns: 1fr; }
  .footer-bottom-row { flex-direction: column; align-items: flex-start; }
  .invoice-grid { grid-template-columns: 1fr; }
  .payment-launch-card, .invoice-topbar { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .ref-logo h1 { font-size: 26px; }
  .ref-hero-content h2 { font-size: 2rem; }
  .ref-department-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ref-service-grid { grid-template-columns: 1fr; }
  .stats-grid, .support-links { grid-template-columns: 1fr; }
}
