/* ==========================================================================
   MetroTech East Africa — storefront stylesheet
   Clean, airy layout: white cards on a light grey canvas.
   ========================================================================== */

:root {
  /* Brand */
  --primary: #0B2A66;
  --primary-dark: #071D49;
  --primary-soft: #EAF0FB;
  --accent: #E51B24;
  --accent-light: #FDECEC;
  --whatsapp: #1FAF54;

  /* Neutrals */
  --bg-body: #F3F5F9;
  --surface: #FFFFFF;
  --surface-muted: #F7F8FB;
  --text-main: #111827;
  --text-muted: #5B6578;
  --text-light: #8A94A6;
  --border-light: #E6EAF0;
  --border-subtle: #D5DBE5;

  /* Status */
  --success: #0E8A4F;
  --success-bg: #E8F6EE;
  --warning: #B45309;
  --warning-bg: #FEF3E2;
  --danger: #DC2626;
  --danger-bg: #FDECEC;
  --info: #2563EB;

  /* Shape & depth */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 6px 20px -8px rgba(17, 24, 39, 0.12);
  --shadow-lg: 0 18px 40px -16px rgba(17, 24, 39, 0.22);

  /* Type */
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: var(--font-body);

  --container: 1240px;
  --gutter: 24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; color: var(--text-main); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #C4141C; color: #fff; }
.btn-outline {
  background: var(--surface);
  border-color: var(--border-subtle);
  color: var(--text-main);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #18934A; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-muted); color: var(--text-main); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn.whatsapp:hover { border-color: var(--whatsapp); color: var(--whatsapp); }

/* ---------- Badges & pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-navy { background: var(--primary-soft); color: var(--primary); }
.badge-red { background: var(--accent-light); color: var(--accent); }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-amber { background: var(--warning-bg); color: var(--warning); }
.badge-slate { background: #EEF1F5; color: #4B5565; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Cards & surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-main); margin-bottom: 6px; }
.form-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.form-input, .form-select, textarea.form-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 42, 102, 0.12);
}
.form-input:disabled, .form-select:disabled { background: var(--surface-muted); color: var(--text-light); }
textarea.form-input { min-height: 120px; resize: vertical; }
.form-input.is-invalid { border-color: var(--danger); }
.form-error-msg { display: none; font-size: 12.5px; color: var(--danger); margin-top: 4px; }
.form-error-msg.visible { display: block; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }

.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--border-subtle); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice input { margin-top: 3px; accent-color: var(--primary); }
.choice strong { display: block; font-size: 14px; font-weight: 600; }
.choice span { display: block; font-size: 12.5px; color: var(--text-muted); }
.choice-list { display: grid; gap: 10px; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text-main); flex-shrink: 0; }
.logo:hover { color: var(--text-main); }
.logo img { width: 54px; height: auto; }
.logo-name { font-weight: 700; font-size: 18px; letter-spacing: 0.01em; line-height: 1.1; color: var(--primary); }
.logo-name span { color: var(--accent); }
.logo-sub { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }

.header-search { flex: 1; max-width: 560px; position: relative; }
.header-search input {
  width: 100%;
  padding: 11px 48px 11px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--surface-muted);
  font-size: 14px;
}
.header-search input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(11, 42, 102, 0.1); }
.header-search button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.header-action:hover { background: var(--surface-muted); color: var(--primary); }
.header-action i { font-size: 20px; }
.cart-count {
  position: absolute;
  top: 2px;
  left: 24px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
}
.cart-pop-anim { animation: cart-pop 0.35s ease; }
@keyframes cart-pop { 50% { transform: scale(1.3); } }
.menu-toggle { display: none; }

.main-nav { border-top: none; }
.main-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  min-height: 48px;
  align-items: center;
}
.main-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.main-nav .nav-link:hover { color: var(--primary); background: var(--surface-muted); }
.main-nav .nav-link.active { color: var(--primary); background: var(--primary-soft); }
.main-nav .nav-highlight { color: var(--accent); }

/* Mobile navigation drawer */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  z-index: 60;
}
.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

/* ==========================================================================
   Page scaffolding
   ========================================================================== */
main { display: block; }
.page { padding: 32px 0 72px; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.section-head h2 { font-size: 24px; }
.section-head p { color: var(--text-muted); margin-top: 4px; }
.section-head a { font-weight: 500; font-size: 14px; white-space: nowrap; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.page-title { margin-bottom: 24px; }
.page-title h1 { font-size: 30px; }
.page-title p { color: var(--text-muted); margin-top: 6px; max-width: 640px; }

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb i { font-size: 10px; color: var(--text-light); }
.breadcrumb span { color: var(--text-main); overflow-wrap: anywhere; }

/* ==========================================================================
   Home
   ========================================================================== */
.hero-lead { font-size: 16.5px; color: var(--text-muted); margin: 16px 0 28px; max-width: 540px; }
.hero-search { display: flex; gap: 10px; max-width: 560px; }
.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 15px;
}
.hero-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 42, 102, 0.12); }

.finder-strip { margin-top: -1px; }
.finder-card {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: center;
  padding: 20px 24px;
}
.finder-card-title { display: flex; align-items: center; gap: 12px; padding-right: 8px; }
.finder-card-title i {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: var(--primary-soft); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
}
.finder-card-title strong { display: block; font-size: 15px; }
.finder-card-title span { font-size: 12.5px; color: var(--text-muted); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  color: var(--text-main);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); color: var(--text-main); }
.category-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.category-card strong { display: block; font-size: 15px; font-weight: 600; }
.category-card span { font-size: 13px; color: var(--text-muted); }
.category-card .bi-arrow-right { margin-left: auto; color: var(--text-light); }

.brand-row { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-chip {
  padding: 10px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}
.brand-chip:hover { border-color: var(--primary); color: var(--primary); }

.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 24px; }
.feature i {
  display: inline-flex; width: 44px; height: 44px; border-radius: var(--radius-md);
  align-items: center; justify-content: center;
  background: var(--accent-light); color: var(--accent); font-size: 20px; margin-bottom: 14px;
}
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { font-size: 14px; color: var(--text-muted); }

.visit-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
}
.visit-card img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.visit-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.visit-body h2 { font-size: 24px; margin-bottom: 10px; }
.visit-body p { color: var(--text-muted); }
.info-list { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 12px; }
.info-list li { display: flex; gap: 12px; font-size: 14px; }
.info-list i { color: var(--primary); font-size: 17px; margin-top: 1px; }
.info-list strong { display: block; font-weight: 600; }
.info-list span, .info-list a { color: var(--text-muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   Product cards & grids
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.products-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.2s;
}
.product-card:hover { border-color: var(--border-subtle); box-shadow: var(--shadow-md); }
.product-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--surface-muted);
}
.product-media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.product-media .badge { position: absolute; top: 12px; left: 12px; }
.product-info { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1; }
.product-meta-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-brand { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); }
.product-sku { font-size: 11.5px; color: var(--text-muted); font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; }
.product-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
a.product-name:hover { color: var(--primary); }
.product-specs { font-size: 12.5px; color: var(--text-muted); }
.product-specs .dot { margin: 0 6px; color: var(--border-subtle); }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.product-price { font-size: 17px; font-weight: 700; color: var(--text-main); }
.stock { font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.stock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock.in { color: var(--success); }
.stock.out { color: var(--warning); }
.product-actions { display: flex; gap: 8px; padding: 0 16px 16px; }
.product-actions .btn { flex: 1; }

.empty-state {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
}
.empty-state i { font-size: 32px; color: var(--text-light); display: block; margin-bottom: 10px; }
.empty-state h3 { font-size: 17px; margin-bottom: 6px; color: var(--text-main); }
.empty-state p { margin-bottom: 18px; }

.skeleton-card {
  height: 340px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #ECEFF4 0%, #F6F7FA 50%, #ECEFF4 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ==========================================================================
   Catalog
   ========================================================================== */
.catalog-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters { padding: 20px; position: sticky; top: 140px; }
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.filters-head h2 { font-size: 16px; }
.filters-close { display: none; }
.sidebar-section { padding: 16px 0; border-top: 1px solid var(--border-light); }
.sidebar-section:first-of-type { border-top: none; }
.sidebar-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.filter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.filter-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
}
.filter-item label:hover { background: var(--surface-muted); color: var(--text-main); }
.filter-item input { accent-color: var(--primary); width: 16px; height: 16px; }
.price-range input { width: 100%; accent-color: var(--primary); }
.price-range-values { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.catalog-count { font-size: 14px; color: var(--text-muted); }
.catalog-count strong { color: var(--text-main); }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.toolbar-right label { font-size: 13px; color: var(--text-muted); }
.toolbar-right .form-select { width: auto; padding: 8px 12px; }
.filters-toggle { display: none; }
.brand-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

/* ==========================================================================
   Product details
   ========================================================================== */
.pd-loading, .pd-empty { padding: 56px 24px; text-align: center; color: var(--text-muted); }
.pd-empty h1 { font-size: 24px; margin-bottom: 8px; }
.pd-empty p { margin-bottom: 18px; }
.pd-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.pd-image-card { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; padding: 32px; background: var(--surface); }
.pd-image { max-width: 100%; max-height: 100%; object-fit: contain; }
.pd-info-card { padding: 28px; }
.pd-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pd-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.product-brand-name { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); }
.pd-title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; margin-bottom: 16px; overflow-wrap: anywhere; }
.pd-price { font-size: 28px; font-weight: 700; margin-bottom: 20px; }
.pd-price span { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.pd-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 24px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}
.pd-specs dt { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.pd-specs dd { margin: 0; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.pd-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0, 0, 0, 0.12); }
.pd-buy-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pd-qty { display: inline-flex; align-items: center; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.pd-qty .qty-btn { border: none; border-radius: 0; width: 38px; height: 42px; background: transparent; }
.pd-qty input {
  width: 52px; height: 42px; border: none; border-inline: 1px solid var(--border-light);
  text-align: center; font-weight: 600; -moz-appearance: textfield;
}
.pd-qty input::-webkit-outer-spin-button, .pd-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd-pickup { font-size: 13px; color: var(--text-muted); }
.pd-pickup i { color: var(--accent); margin-right: 4px; }
.pd-details-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; }
.pd-section { padding: 24px; }
.pd-section h2 { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pd-section p { color: var(--text-muted); }
.pd-section p a { color: var(--primary); font-weight: 500; }
.pd-count { font-size: 12px; font-weight: 500; background: var(--surface-muted); color: var(--text-muted); border-radius: var(--radius-full); padding: 2px 9px; }
.pd-printer-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px;
  max-height: 300px; overflow-y: auto;
}
.pd-printer-list a {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-main);
}
.pd-printer-list a:hover { border-color: var(--primary); color: var(--primary); }
.pd-printer-list i { color: var(--text-light); }
.pd-related { margin-top: 48px; }
.pd-related h2 { font-size: 20px; margin-bottom: 16px; }

/* ==========================================================================
   Finder
   ========================================================================== */
.finder-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-bottom: 32px; }
.finder-panel { padding: 24px; }
.finder-panel h2 { font-size: 17px; margin-bottom: 4px; }
.finder-panel > p { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }
.wizard-steps { display: grid; gap: 12px; }
.wizard-step-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: center; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-muted); border: 1px solid var(--border-subtle);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
}
.wizard-step-item.active .step-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.wizard-step-item.completed .step-num { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.finder-search-box { position: relative; }
.finder-search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); }
.finder-search-box .form-input { padding-left: 40px; height: 48px; }
.finder-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.finder-results-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.finder-results-head h2 { font-size: 20px; }
.finder-results-head p { font-size: 14px; color: var(--text-muted); }

/* ==========================================================================
   Checkout
   ========================================================================== */
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.checkout-step { padding: 24px; margin-bottom: 16px; }
.checkout-step h2 { font-size: 17px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.checkout-step h2 .step-num { width: 26px; height: 26px; font-size: 12.5px; background: var(--primary); border-color: var(--primary); color: #fff; }
.order-summary { padding: 24px; position: sticky; top: 140px; }
.order-summary h2 { font-size: 17px; margin-bottom: 12px; }
.summary-item strong { white-space: nowrap; }
.summary-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.summary-item small { display: block; color: var(--text-muted); font-size: 12.5px; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--text-muted); }
.summary-row strong { color: var(--text-main); font-weight: 500; }
.summary-row.total { padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--border-light); font-size: 16px; color: var(--text-main); }
.summary-row.total strong { font-size: 19px; font-weight: 700; }
.terms-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-muted); margin: 16px 0; }
.terms-check input { margin-top: 3px; accent-color: var(--primary); }
.secure-note { font-size: 12.5px; color: var(--text-muted); text-align: center; margin-top: 12px; }

/* ==========================================================================
   Contact / About
   ========================================================================== */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.contact-aside { display: grid; gap: 16px; }
.hours-table { width: 100%; font-size: 14px; border-collapse: collapse; }
.hours-table td { padding: 6px 0; }
.hours-table td:last-child { text-align: right; color: var(--text-muted); }
.map-embed { width: 100%; border: 0; border-radius: var(--radius-md); aspect-ratio: 4 / 3; }
.success-check-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--success-bg); color: var(--success); font-size: 30px;
}

.about-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.about-intro p { color: var(--text-muted); margin-bottom: 14px; }
.about-intro img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.brand-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.brand-list li { list-style: none; padding: 12px 16px; font-size: 14px; font-weight: 500; }
.brand-list { padding: 0; margin: 0; }

/* ==========================================================================
   Auth & account
   ========================================================================== */
.auth-wrap { max-width: 440px; margin: 0 auto; }
.auth-card { padding: 32px; }
.auth-card h1 { font-size: 24px; text-align: center; }
.auth-card .auth-sub { text-align: center; color: var(--text-muted); margin: 6px 0 24px; font-size: 14px; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  border-radius: var(--radius-md); background: var(--surface-muted); margin-bottom: 24px;
}
.auth-tab-btn {
  padding: 9px; border: none; border-radius: var(--radius-sm); background: transparent;
  font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer;
}
.auth-tab-btn.active { background: #fff; color: var(--text-main); box-shadow: var(--shadow-sm); }
.password-input-wrap { position: relative; }
.password-input-wrap .form-input { padding-right: 44px; }
.password-toggle-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--text-muted); cursor: pointer; padding: 6px;
}
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-size: 12.5px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 16px; }

.account-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.account-profile { padding: 24px; text-align: center; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600;
}
.account-profile h2 { font-size: 18px; }
.account-profile p { font-size: 13.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.account-meta { list-style: none; padding: 16px 0 0; margin: 16px 0 0; border-top: 1px solid var(--border-light); text-align: left; display: grid; gap: 10px; font-size: 13.5px; }
.account-meta i { color: var(--text-light); margin-right: 8px; }
.account-main { display: grid; gap: 24px; }
.panel { padding: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 17px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-light); padding: 10px 12px; border-bottom: 1px solid var(--border-light); white-space: nowrap;
}
.data-table td { padding: 14px 12px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }

.printer-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border-light); border-radius: var(--radius-md); margin-bottom: 10px;
}

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal-hero { padding: 40px 0 8px; }
.legal-hero h1 { font-size: 30px; }
.legal-hero p { color: var(--text-muted); margin-top: 8px; max-width: 720px; }
.legal-hero .updated { font-size: 13px; color: var(--text-light); margin-top: 8px; }
.legal-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.legal-sidebar { padding: 20px; position: sticky; top: 140px; }
.legal-sidebar h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); margin-bottom: 10px; }
.legal-nav-link { display: block; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text-muted); }
.legal-nav-link:hover, .legal-nav-link.active { background: var(--surface-muted); color: var(--primary); }
.legal-nav-link i { display: none; }
.legal-content { padding: 32px 36px; }
.legal-section { padding: 8px 0 24px; scroll-margin-top: 140px; }
.legal-section + .legal-section { border-top: 1px solid var(--border-light); padding-top: 24px; }
.legal-badge-pill { display: none; }
.legal-heading { font-size: 19px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.legal-heading i { display: none; }
.legal-paragraph, .legal-content p { color: var(--text-muted); margin-bottom: 12px; font-size: 14.5px; line-height: 1.75; }
.legal-content ul, .legal-content ol { color: var(--text-muted); font-size: 14.5px; line-height: 1.75; padding-left: 20px; margin: 0 0 12px; }
.legal-content strong { color: var(--text-main); font-weight: 600; }
.legal-content a { color: var(--primary); font-weight: 500; }
.legal-card {
  padding: 16px 18px; border-radius: var(--radius-md); background: var(--surface-muted);
  border: 1px solid var(--border-light); font-size: 14px; color: var(--text-muted); margin: 12px 0;
}
.legal-content table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.legal-content th, .legal-content td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); text-align: left; }
.legal-content th { font-weight: 600; background: var(--surface-muted); }
.legal-content [style*="overflow"] { overflow-x: auto; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--surface); border-top: 1px solid var(--border-light); margin-top: 24px; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 48px 0 32px;
}
.footer-about p { font-size: 14px; color: var(--text-muted); margin-top: 14px; max-width: 320px; }
.footer-title { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; }
.footer-links a, .footer-links span { color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }
.footer-links i { margin-right: 8px; color: var(--text-light); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-light);
}
.social-links { display: flex; gap: 8px; }
.social-links a {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-light); color: var(--text-muted);
}
.social-links a:hover { border-color: var(--primary); color: var(--primary); }

/* ==========================================================================
   Overlays: cart drawer, modals, toasts, floating WhatsApp
   ========================================================================== */
.cart-drawer-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(17, 24, 39, 0.45);
  opacity: 0; visibility: hidden; transition: opacity 0.2s;
}
.cart-drawer-overlay.active { opacity: 1; visibility: visible; }
.cart-drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  display: flex; flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.cart-drawer-overlay.active .cart-drawer { transform: translateX(0); }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border-light); }
.cart-title { font-size: 17px; }
.cart-close-btn { border: none; background: none; font-size: 26px; line-height: 1; color: var(--text-muted); cursor: pointer; }
.cart-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.cart-item-img img { width: 56px !important; height: 56px !important; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface-muted); border: 1px solid var(--border-light); }
.cart-item-title { font-size: 13.5px; font-weight: 500; line-height: 1.4; margin-bottom: 2px; }
.cart-item-price { font-size: 13px; color: var(--text-muted); }
.cart-item-qty-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn {
  width: 28px; height: 28px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-size: 15px; line-height: 1;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.cart-item-remove { border: none; background: none; color: var(--text-light); cursor: pointer; padding: 2px; }
.cart-item-remove:hover { color: var(--danger); }
.cart-empty-state { text-align: center; padding: 48px 12px; display: grid; justify-items: center; gap: 8px; color: var(--text-muted); }
.cart-empty-state h4 { font-size: 16px; color: var(--text-main); }
.cart-footer { padding: 18px 20px; border-top: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 10px; }
.cart-summary-row { display: flex; justify-content: space-between; font-size: 15px; }
.cart-summary-row span:last-child { font-weight: 700; }
.cart-note { font-size: 12.5px; color: var(--text-muted); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(17, 24, 39, 0.5);
  opacity: 0; visibility: hidden; transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-window {
  width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 24px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-size: 18px; }
.modal-close { border: none; background: none; font-size: 26px; line-height: 1; color: var(--text-muted); cursor: pointer; }

.toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; max-width: min(360px, calc(100vw - 40px)); }
.toast {
  padding: 12px 16px; border-radius: var(--radius-md); background: var(--text-main); color: #fff;
  font-size: 14px; box-shadow: var(--shadow-lg); border-left: 4px solid var(--info);
}
.toast.success { border-left-color: #22C55E; }
.toast.error { border-left-color: #F87171; }

.floating-whatsapp-btn {
  position: fixed; left: 20px; bottom: 20px; z-index: 70;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--whatsapp); color: #fff; box-shadow: var(--shadow-lg);
}
.floating-whatsapp-btn:hover { color: #fff; transform: translateY(-2px); }
.floating-whatsapp-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.floating-whatsapp-btn i { font-size: 24px !important; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finder-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finder-card-title { grid-column: 1 / -1; }
  .finder-card .btn { grid-column: 1 / -1; }
  .products-grid.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  :root { --gutter: 20px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-action .label { display: none; }
  .menu-toggle { display: inline-flex; }

  .main-nav {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 61;
    width: min(300px, 85vw);
    background: var(--surface);
    border: none;
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .nav-open .main-nav { transform: translateX(0); }
  .main-nav .container { padding: 16px; }
  .main-nav .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav .nav-link { padding: 12px; font-size: 15px; }
  .nav-drawer-head { display: flex !important; }

  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit-card { grid-template-columns: minmax(0, 1fr); }
  .visit-card img { min-height: 220px; max-height: 280px; }

  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .filters {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 61;
    width: min(320px, 88vw); border-radius: 0; overflow-y: auto;
    transform: translateX(-100%); transition: transform 0.25s ease;
  }
  .filters-open .filters { transform: translateX(0); }
  .filters-open .nav-backdrop { opacity: 1; visibility: visible; }
  .filters-close { display: inline-flex; }
  .filters-toggle { display: inline-flex; }

  .pd-layout, .pd-details-grid, .finder-layout, .checkout-layout, .contact-layout,
  .about-intro, .account-layout, .legal-grid { grid-template-columns: minmax(0, 1fr); }
  .order-summary, .legal-sidebar { position: static; }
  .legal-sidebar { display: none; }
  .pd-image-card { aspect-ratio: 4 / 3; }
  .products-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 14.5px; }
  .section { padding: 40px 0; }
  .page { padding: 20px 0 56px; }
  .page-title h1, .legal-hero h1 { font-size: 24px; }
  .section-head h2 { font-size: 20px; }
  .logo img { width: 44px; }
  .logo-sub { display: none; }
  .hero-search { flex-direction: column; }
  .finder-card { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .category-grid, .feature-grid, .footer-grid, .form-row { grid-template-columns: minmax(0, 1fr); }
  .products-grid, .products-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-info { padding: 12px; }
  .product-actions { padding: 0 12px 12px; }
  .product-actions .btn { padding: 8px 10px; font-size: 13px; }
  .product-actions .icon-btn { width: 34px; height: 34px; }
  .product-name { font-size: 13.5px; }
  .product-price { font-size: 15px; }
  .product-bottom { flex-direction: column; align-items: flex-start; gap: 2px; }
  .card-pad, .panel, .checkout-step, .order-summary, .pd-info-card, .pd-section, .auth-card, .finder-panel { padding: 18px; }
  .legal-content { padding: 20px 18px; }
  .visit-body { padding: 24px 20px; }
  .pd-buy-row .btn { flex: 1 1 100%; }
  .pd-specs { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { justify-content: center; text-align: center; }
  .toast-container { right: 12px; left: 12px; bottom: 84px; max-width: none; }
}

@media (max-width: 360px) {
  .products-grid, .products-grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Numbered steps used in the return policy */
.policy-step { display: flex; gap: 14px; margin: 14px 0; }
.policy-step-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600;
}
.policy-step-body { color: var(--text-muted); font-size: 14.5px; }

/* Keep side-by-side photos from stretching their card */
.visit-card { align-items: stretch; }
.visit-card > img { height: 100%; max-height: 440px; }
.category-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.category-card { flex-direction: column; align-items: flex-start; gap: 12px; }
.category-card .bi-arrow-right { display: none; }
@media (max-width: 600px) { .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .category-card { padding: 16px; } }

/* Product photos always fill a fixed 4:3 frame, whatever their original shape */
.product-media { overflow: hidden; }
.product-media img { position: absolute; inset: 0; }
.product-media .badge { z-index: 1; box-shadow: var(--shadow-sm); background-clip: padding-box; }
.product-media .badge-red { background: #fff; border: 1px solid var(--accent-light); }
.product-media .badge-navy { background: #fff; border: 1px solid var(--primary-soft); }

/* Results land below the sticky header when scrolled into view */
#finder-results-section, #compatible-printers { scroll-margin-top: 150px; }

@media (max-width: 600px) {
  .catalog-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { width: 100%; }
  .toolbar-right #catalog-search-input { flex: 1; width: auto !important; min-width: 0; }
  .toolbar-right .form-select { flex: 1; min-width: 0; }
  .toolbar-right label[for="catalog-sort-select"] { display: none; }
  /* WhatsApp is already in the top bar and on every product card */
  .floating-whatsapp-btn { display: none; }
}

/* ==========================================================================
   SPACING, LARGER NAVIGATION & MOTION LAYER
   ========================================================================== */
:root {
  --container: 1280px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Keyframes ---------- */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes scale-in { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slow-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(31, 175, 84, 0.45); }
  70% { box-shadow: 0 0 0 16px rgba(31, 175, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 175, 84, 0); }
}
@keyframes added-pop { 0% { transform: scale(1); } 40% { transform: scale(0.94); } 100% { transform: scale(1); } }

main { animation: page-in 0.45s ease both; }

/* ---------- Bigger header & navigation ---------- */

.site-header { transition: box-shadow 0.3s ease; }
.site-header.scrolled { box-shadow: 0 8px 24px -12px rgba(17, 24, 39, 0.18); }
.logo img { width: 64px; transition: transform 0.4s var(--ease-spring); }
.logo:hover img { transform: rotate(-6deg) scale(1.06); }
.logo-name { font-size: 21px; }
.logo-sub { font-size: 11px; }
.header-search input { padding: 13px 54px 13px 20px; font-size: 15px; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.header-search button { width: 40px; height: 40px; transition: transform 0.3s var(--ease-spring), background 0.2s; }
.header-search button:hover { transform: translateY(-50%) scale(1.08); background: var(--accent); }
.header-action { padding: 10px 14px; font-size: 15px; transition: background 0.2s, color 0.2s; }
.header-action i { font-size: 22px; transition: transform 0.3s var(--ease-spring); }
.header-action:hover i { transform: translateY(-2px); }
.cart-count { left: 28px; top: 3px; }

.main-nav .nav-list { min-height: 62px; gap: 6px; }
.main-nav .nav-link {
  position: relative;
  padding: 12px 18px;
  font-size: 15.5px;
  border-radius: var(--radius-md);
  transition: color 0.2s, background 0.2s;
}
.main-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.main-nav .nav-link:hover { background: transparent; }
.main-nav .nav-link:hover::after, .main-nav .nav-link.active::after { transform: scaleX(1); }
.main-nav .nav-link.active { background: var(--primary-soft); }
.main-nav .nav-link i { transition: transform 0.3s var(--ease-spring); }
.main-nav .nav-link:hover i { transform: scale(1.2) rotate(-8deg); }

/* ---------- More breathing room ---------- */
.page { padding: 48px 0 96px; }
.section { padding: 80px 0; }
.section-tight { padding: 44px 0; }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: 28px; }
.section-head p { margin-top: 8px; }
.page-title { margin-bottom: 36px; }
.page-title h1 { font-size: 34px; }
.page-title p { margin-top: 10px; }
.breadcrumb { margin-bottom: 28px; }

.hero-lead { margin: 20px 0 32px; }

.finder-card { padding: 26px 30px; gap: 16px; }
.category-grid { gap: 24px; }
.category-card { padding: 26px; }
.feature-grid { gap: 24px; }
.feature { padding: 30px; }
.feature i { margin-bottom: 18px; }
.brand-row { gap: 12px; }
.brand-chip { padding: 12px 22px; }

.products-grid { gap: 28px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.products-grid.cols-4 { gap: 28px; }
.product-info { padding: 20px 20px 14px; gap: 8px; }
.product-actions { padding: 0 20px 20px; gap: 10px; }
.product-bottom { padding-top: 14px; }

.catalog-layout { gap: 32px; grid-template-columns: 280px minmax(0, 1fr); }
.filters { padding: 24px; top: 168px; }
.sidebar-section { padding: 20px 0; }
.catalog-toolbar { padding: 14px 20px; margin-bottom: 24px; }
.brand-pills { gap: 10px; margin-bottom: 28px; }

.card-pad, .panel, .checkout-step, .order-summary, .pd-section, .finder-panel { padding: 30px; }
.checkout-step { margin-bottom: 20px; }
.checkout-layout, .contact-layout, .account-layout, .finder-layout, .pd-layout, .pd-details-grid, .legal-grid { gap: 32px; }
.pd-info-card { padding: 34px; }
.contact-aside, .account-main { gap: 24px; }
.order-summary, .legal-sidebar { top: 168px; }
.footer-grid { padding: 64px 0 40px; gap: 40px; }
.form-group { margin-bottom: 20px; }

/* ---------- Hero entrance ---------- */

/* ---------- Scroll reveal (classes added by layout.js) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* Product cards animate in whenever a grid renders */
.products-grid > .product-card { animation: rise-in 0.55s var(--ease-out) both; }
.products-grid > .product-card:nth-child(2) { animation-delay: 0.05s; }
.products-grid > .product-card:nth-child(3) { animation-delay: 0.1s; }
.products-grid > .product-card:nth-child(4) { animation-delay: 0.15s; }
.products-grid > .product-card:nth-child(5) { animation-delay: 0.2s; }
.products-grid > .product-card:nth-child(6) { animation-delay: 0.25s; }
.products-grid > .product-card:nth-child(7) { animation-delay: 0.3s; }
.products-grid > .product-card:nth-child(n+8) { animation-delay: 0.35s; }

/* ---------- Hover effects ---------- */
.btn { transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.25s, transform 0.25s var(--ease-out); position: relative; overflow: hidden; }
.btn:not(:disabled):hover { transform: translateY(-2px); }
.btn:not(:disabled):active { transform: translateY(0) scale(0.97); }
.btn-primary:not(:disabled):hover { box-shadow: 0 10px 20px -10px rgba(11, 42, 102, 0.6); }
.btn-whatsapp:not(:disabled):hover { box-shadow: 0 10px 20px -10px rgba(31, 175, 84, 0.6); }
.btn-accent:not(:disabled):hover { box-shadow: 0 10px 20px -10px rgba(229, 27, 36, 0.55); }
.btn-outline:not(:disabled):hover { box-shadow: var(--shadow-md); }
/* Light sweep across filled buttons */
.btn-primary::after, .btn-whatsapp::after, .btn-accent::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.btn-primary:not(:disabled):hover::after, .btn-whatsapp:not(:disabled):hover::after, .btn-accent:not(:disabled):hover::after { left: 130%; }
.btn i { transition: transform 0.3s var(--ease-spring); }
.btn:hover i { transform: scale(1.15); }
.btn.added { animation: added-pop 0.4s var(--ease-spring); background: var(--success); }

.icon-btn { transition: border-color 0.2s, color 0.2s, transform 0.3s var(--ease-spring), background 0.2s; }
.icon-btn:hover { transform: translateY(-2px) rotate(-8deg); }
.icon-btn.whatsapp:hover { background: #E9F8EF; }

.pill { transition: all 0.25s var(--ease-out); }
.pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pill.active { box-shadow: 0 8px 18px -10px rgba(11, 42, 102, 0.7); }

.product-card { transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.25s; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-media img { transition: transform 0.6s var(--ease-out); }
.product-card:hover .product-media img { transform: scale(1.07); }
.product-name { transition: color 0.2s; }
.product-card:hover .product-name { color: var(--primary); }

.category-card, .feature, .brand-chip, .brand-list li { transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.25s, color 0.2s; }
.category-card:hover, .feature:hover, .brand-list li:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.category-icon, .feature i { transition: transform 0.45s var(--ease-spring), background 0.25s, color 0.25s; }
.category-card:hover .category-icon { transform: scale(1.12) rotate(-6deg); background: var(--primary); color: #fff; }
.feature:hover i { transform: scale(1.12) rotate(6deg); background: var(--accent); color: #fff; }
.brand-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.visit-card { overflow: hidden; }
.visit-card > img, .about-intro img { transition: transform 0.8s var(--ease-out); }
.visit-card:hover > img { transform: scale(1.04); }

.pd-image { transition: transform 0.6s var(--ease-out); }
.pd-image-card:hover .pd-image { transform: scale(1.06); }
.pd-printer-list a { transition: border-color 0.2s, color 0.2s, transform 0.25s var(--ease-out), box-shadow 0.25s; }
.pd-printer-list a:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }

.choice { transition: border-color 0.2s, background 0.2s, transform 0.25s var(--ease-out), box-shadow 0.25s; }
.choice:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.form-input:hover:not(:focus):not(:disabled), .form-select:hover:not(:focus):not(:disabled) { border-color: #B9C2D0; }

.filter-item label { transition: background 0.2s, color 0.2s, padding-left 0.25s var(--ease-out); }
.filter-item label:hover { padding-left: 10px; }

.footer-links a { display: inline-block; transition: color 0.2s, transform 0.25s var(--ease-out); }
.footer-links a:hover { transform: translateX(4px); }
.social-links a { transition: transform 0.3s var(--ease-spring), border-color 0.2s, color 0.2s, background 0.2s; }
.social-links a:hover { transform: translateY(-3px); background: var(--primary); border-color: var(--primary); color: #fff; }

.data-table tbody tr { transition: background 0.2s; }
.data-table tbody tr:hover { background: var(--surface-muted); }
.printer-row { transition: border-color 0.2s, transform 0.25s var(--ease-out), box-shadow 0.25s; }
.printer-row:hover { transform: translateX(4px); border-color: var(--border-subtle); box-shadow: var(--shadow-sm); }

/* ---------- Overlays ---------- */
.cart-drawer { transition: transform 0.4s var(--ease-out); }
.cart-drawer-overlay.active .cart-item { animation: slide-in-right 0.45s var(--ease-out) both; }
.cart-drawer-overlay.active .cart-item:nth-child(2) { animation-delay: 0.05s; }
.cart-drawer-overlay.active .cart-item:nth-child(3) { animation-delay: 0.1s; }
.cart-drawer-overlay.active .cart-item:nth-child(n+4) { animation-delay: 0.15s; }
.modal-overlay.active .modal-window { animation: scale-in 0.35s var(--ease-out) both; }
.toast { animation: slide-in-right 0.4s var(--ease-out) both; }
.floating-whatsapp-btn { animation: pulse-ring 2.4s ease-out 1.5s 3; transition: transform 0.3s var(--ease-spring); }
.floating-whatsapp-btn:hover { transform: translateY(-4px) scale(1.06); }
.main-nav { transition: transform 0.35s var(--ease-out); }

/* ---------- Responsive adjustments for the larger layout ---------- */
@media (max-width: 1100px) {
  .main-nav .nav-link { padding: 12px; font-size: 15px; }
  .main-nav .nav-link::after { left: 12px; right: 12px; }
}
@media (max-width: 960px) {
  .logo img { width: 52px; }
  .main-nav .nav-list { min-height: 0; }
  .main-nav .nav-link { padding: 14px 16px; font-size: 16px; }
  .main-nav .nav-link::after { display: none; }
  .section { padding: 56px 0; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { top: 0; }
  .order-summary, .legal-sidebar { top: 0; }
}
@media (max-width: 600px) {
  .page { padding: 28px 0 64px; }
  .section { padding: 44px 0; }
  .section-head { margin-bottom: 22px; }
  .section-head h2 { font-size: 22px; }
  .page-title h1 { font-size: 26px; }
  .products-grid, .products-grid.cols-4 { gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-info { padding: 14px 12px 10px; }
  .product-actions { padding: 0 12px 14px; gap: 8px; }
  .card-pad, .panel, .checkout-step, .order-summary, .pd-section, .finder-panel, .pd-info-card { padding: 20px; }
  .category-card { padding: 18px; }
  .feature { padding: 22px; }
}
@media (max-width: 360px) {
  .products-grid, .products-grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
}
/* Touch screens: no hover lift that would stick after a tap */
@media (hover: none) {
  .product-card:hover, .category-card:hover, .feature:hover, .btn:hover, .pill:hover, .choice:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   SINGLE HEADER BAR: logo · navigation · actions, with Products mega menu
   ========================================================================== */
.header-bar {
  display: flex;
  align-items: stretch;
  gap: 32px;
  min-height: 84px;
}
.header-bar .logo { align-self: center; }
.header-bar .header-actions { align-self: center; margin-left: 0; gap: 4px; }
.header-bar .menu-toggle { align-self: center; }

/* Desktop navigation sits inline in the bar */
.site-header .main-nav { flex: 1; display: flex; align-items: stretch; }
.main-nav .nav-drawer-head { display: none; }
.main-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-height: 0;
  width: 100%;
}
.main-nav .nav-list > li { display: flex; align-items: center; }
.main-nav .nav-list > li:last-child { margin-right: 0; }
.main-nav .nav-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nav-caret { font-size: 12px; transition: transform 0.3s var(--ease-out); }
.has-mega.open .nav-caret { transform: rotate(180deg); }
.has-mega.open > .nav-link { color: var(--primary); }
.has-mega.open > .nav-link::after { transform: scaleX(1); }

/* Mega menu panel: full width under the header bar */
.has-mega { position: static; }
.mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 55;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 24px 40px -24px rgba(17, 24, 39, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
}
.has-mega.open .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s;
}
.mega-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 40px;
  padding-top: 32px;
  padding-bottom: 32px;
}
.mega-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 14px;
}
.mega-categories, .mega-brands { list-style: none; margin: 0; padding: 0; }
.mega-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.mega-categories a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  transition: background 0.2s, transform 0.25s var(--ease-out);
}
.mega-categories a:hover { background: var(--surface-muted); transform: translateX(4px); color: var(--primary); }
.mega-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.25s, color 0.25s, transform 0.35s var(--ease-spring);
}
.mega-categories a:hover .mega-icon { background: var(--primary); color: #fff; transform: rotate(-6deg) scale(1.06); }
.mega-categories strong { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.mega-categories small { display: block; font-size: 12.5px; color: var(--text-muted); }
.mega-loading { color: var(--text-muted); font-size: 14px; padding: 10px 12px; }

.mega-brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; }
.mega-brands a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s, padding-left 0.25s var(--ease-out);
}
.mega-brands a:hover { color: var(--primary); background: var(--surface-muted); padding-left: 14px; }

.mega-promo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: #fff;
  align-self: start;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.mega-promo:hover { color: #fff; transform: translateY(-4px); box-shadow: 0 18px 30px -16px rgba(11, 42, 102, 0.7); }
.mega-promo > i { font-size: 26px; opacity: 0.9; }
.mega-promo strong { font-size: 17px; font-weight: 600; }
.mega-promo span { font-size: 13.5px; color: rgba(255, 255, 255, 0.82); }
.mega-promo .mega-promo-link { color: #fff; font-weight: 500; margin-top: 6px; }
.mega-promo .mega-promo-link i { transition: transform 0.3s var(--ease-out); display: inline-block; }
.mega-promo:hover .mega-promo-link i { transform: translateX(4px); }

.mega-foot { border-top: 1px solid var(--border-light); background: var(--surface-muted); }
.mega-foot .container { padding-top: 12px; padding-bottom: 12px; text-align: right; }
.mega-foot a { font-size: 14px; font-weight: 500; }

/* Search panel slides down under the bar */
.search-panel {
  max-height: 0;
  overflow: hidden;
  border-top: 1px solid transparent;
  transition: max-height 0.35s var(--ease-out), border-color 0.2s;
}
.search-panel.open { max-height: 120px; border-top-color: var(--border-light); }
.search-panel .container { padding-top: 16px; padding-bottom: 18px; }
.search-panel .header-search { max-width: 720px; margin: 0 auto; }
#search-toggle i { font-size: 20px; }

/* Medium screens: tighten the bar */
@media (max-width: 1180px) {
  .header-bar { gap: 20px; }
  .main-nav .nav-link { padding: 12px 10px; font-size: 15px; }
  .main-nav .nav-link::after { left: 10px; right: 10px; }
  .header-action .label { display: none; }
  .logo-sub { display: none; }
}

/* Mobile: navigation becomes the slide-out drawer, Products expands inline */
@media (max-width: 960px) {
  .header-bar { min-height: 68px; gap: 12px; align-items: center; }
  .header-bar .header-actions { margin-left: auto; }
  .site-header .main-nav {
    display: block;
    flex: none;
    padding: 16px;
  }
  .main-nav .nav-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .main-nav .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav .nav-list > li { display: block; }
  .main-nav .nav-link { display: flex; justify-content: space-between; width: 100%; padding: 14px 12px; }
  .main-nav .container { padding: 0; }

  .mega-menu {
    position: static;
    box-shadow: none;
    border: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    background: transparent;
  }
  .has-mega.open .mega-menu { display: block; }
  .mega-inner { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 4px 0 12px; }
  .mega-categories, .mega-brands { grid-template-columns: minmax(0, 1fr); }
  .mega-categories a { padding: 8px 10px; }
  .mega-icon { width: 34px; height: 34px; font-size: 16px; }
  .mega-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mega-promo { display: none; }
  .mega-foot { background: transparent; border: none; }
  .mega-foot .container { text-align: left; padding: 0 10px 8px; }
}

/* Sticky sidebars sit just below the single header bar */
.filters, .order-summary, .legal-sidebar { top: 108px; }
@media (max-width: 960px) { .filters, .order-summary, .legal-sidebar { top: 0; } }

.logo-sub { display: block; }

/* While the mobile menu is open, lift the header (and its drawer) above the dimmed backdrop */
.nav-open .site-header { z-index: 75; }

/* ==========================================================================
   HERO BANNER: full-width product photo with text on the left
   ========================================================================== */
.hero-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(520px, 44vw, 640px);
  background: #EEF4FB;
  border-bottom: 1px solid var(--border-light);
}
.hero-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  animation: slow-zoom 8s ease-out both;
}
/* Soft white fade behind the text so it stays readable over the photo */
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
    rgba(246, 249, 254, 0.97) 0%,
    rgba(246, 249, 254, 0.9) 32%,
    rgba(246, 249, 254, 0.55) 48%,
    rgba(246, 249, 254, 0) 62%);
  pointer-events: none;
}
.hero-banner > .container { position: relative; z-index: 2; width: 100%; }
.hero-content { max-width: 580px; padding-block: 72px; }
.hero-content h1 { font-size: clamp(32px, 4vw, 50px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
.hero-content h1 span { color: var(--accent); }
.hero-content .hero-lead { color: #3F4A5E; }
.hero-content .hero-search input { background: #fff; box-shadow: 0 10px 24px -16px rgba(11, 42, 102, 0.45); }

/* Entrance animation for the text */
.hero-content > * { animation: rise-in 0.7s var(--ease-out) both; }
.hero-content > :nth-child(2) { animation-delay: 0.08s; }
.hero-content > :nth-child(3) { animation-delay: 0.16s; }
.hero-content > :nth-child(4) { animation-delay: 0.24s; }
.hero-content > :nth-child(5) { animation-delay: 0.32s; }

/* Tablets: widen the fade so text never sits on busy parts of the photo */
@media (max-width: 1100px) {
  .hero-banner::before {
    background: linear-gradient(90deg,
      rgba(246, 249, 254, 0.97) 0%,
      rgba(246, 249, 254, 0.92) 45%,
      rgba(246, 249, 254, 0.5) 65%,
      rgba(246, 249, 254, 0) 80%);
  }
  .hero-content { max-width: 520px; }
}

/* Phones: photo on top, text underneath on a clean background */
@media (max-width: 760px) {
  .hero-banner { display: block; min-height: 0; background: var(--surface); }
  .hero-banner::before { display: none; }
  .hero-banner-img {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 16 / 9;
    object-position: 75% center;
  }
  .hero-content { max-width: none; padding-block: 28px 36px; }
}

/* ==========================================================================
   FLOATING ROUNDED HEADER (no top banner)
   ========================================================================== */
:root {
  --header-gap: 14px;          /* space between the bar and the window edge */
  --header-height: 72px;
  --header-offset: calc(var(--header-height) + var(--header-gap) * 2);
}

.site-header {
  position: sticky;
  top: var(--header-gap);
  z-index: 50;
  width: calc(100% - var(--gutter) * 2);
  max-width: calc(var(--container) - var(--gutter) * 2);
  margin: var(--header-gap) auto 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background: transparent;
  box-shadow: 0 10px 30px -14px rgba(17, 24, 39, 0.28), 0 1px 0 rgba(17, 24, 39, 0.04);
  transition: box-shadow 0.3s ease, top 0.3s ease;
}
/* Frosted glass lives on a background layer so it doesn't trap the mobile drawer */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(170%) blur(16px);
  backdrop-filter: saturate(170%) blur(16px);
}
.site-header.scrolled { box-shadow: 0 16px 40px -16px rgba(17, 24, 39, 0.35), 0 1px 0 rgba(17, 24, 39, 0.05); }
.site-header.scrolled::before { background: rgba(255, 255, 255, 0.94); }

/* Inside the floating card the content uses the card's own padding */
.site-header > .header-bar,
.site-header .search-panel > .container {
  width: 100%;
  max-width: none;
  padding-left: 22px;
  padding-right: 14px;
}
.header-bar { min-height: var(--header-height); gap: 28px; }
.logo img { width: 54px; }
.main-nav .nav-list > li { height: var(--header-height); }
.main-nav .nav-link { padding: 10px 16px; }
.main-nav .nav-link::after { bottom: 3px; }

.header-whatsapp i { color: var(--whatsapp); }
.header-whatsapp:hover i { color: var(--whatsapp); }

/* Search panel: part of the floating card */
.search-panel.open { border-top-color: rgba(17, 24, 39, 0.08); }
.search-panel .container { padding-top: 14px; padding-bottom: 16px; }

/* Mega menu drops as its own rounded floating panel under the bar */
.mega-menu {
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px -24px rgba(17, 24, 39, 0.35);
}
.mega-menu .container { width: 100%; max-width: none; padding-left: 30px; padding-right: 30px; }
/* Invisible bridge so the pointer can travel from "Products" down into the panel */
.mega-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

/* Page content starts below the floating bar */
.page { padding-top: 40px; }

/* Homepage: the hero photo runs to the top of the window, behind the floating bar */
body[data-page="home"] .site-header { margin-bottom: calc(var(--header-offset) * -1 + var(--header-gap)); }
body[data-page="home"] .hero-banner { min-height: clamp(600px, 50vw, 760px); }
body[data-page="home"] .hero-content { padding-top: calc(var(--header-offset) + 48px); padding-bottom: 72px; }
body[data-page="home"] .site-header:not(.scrolled) { box-shadow: 0 12px 34px -16px rgba(11, 42, 102, 0.35); }
body[data-page="home"] .site-header:not(.scrolled)::before { background: rgba(255, 255, 255, 0.78); }

/* Sticky sidebars sit just under the floating bar */
.filters, .order-summary, .legal-sidebar { top: calc(var(--header-offset) + 8px); }
#finder-results-section, #compatible-printers, .legal-section { scroll-margin-top: calc(var(--header-offset) + 20px); }

@media (max-width: 1180px) {
  .header-bar { gap: 18px; }
  .main-nav .nav-link { padding: 10px 10px; }
}

@media (max-width: 960px) {
  :root { --header-gap: 10px; --header-height: 64px; }
  .site-header { border-radius: 16px; }
  .site-header > .header-bar { padding-left: 10px; padding-right: 8px; }
  .main-nav .nav-list > li { height: auto; }
  .header-bar { min-height: var(--header-height); gap: 8px; }
  .logo img { width: 44px; }
  .filters, .order-summary, .legal-sidebar { top: 0; }
}

@media (max-width: 760px) {
  /* Phone hero: photo first (under the floating bar), text below */
  body[data-page="home"] .hero-banner { min-height: 0; }
  body[data-page="home"] .hero-banner-img { aspect-ratio: 4 / 3; object-position: 72% 70%; }
  body[data-page="home"] .hero-content { padding-top: 28px; padding-bottom: 36px; }
}

@media (max-width: 600px) {
  .header-whatsapp { display: none; }
  .page { padding-top: 28px; }
}

.hero-content .hero-lead { margin-bottom: 0; }

/* ==========================================================================
   ADMIN PORTAL
   ========================================================================== */
.admin-body { background: var(--bg-body); }
.admin-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 16px;
  background: var(--surface);
  border-right: 1px solid var(--border-light);
}
.admin-logo { padding: 0 10px; }
.admin-logo img { width: 46px; }
.admin-logo .logo-name { font-size: 18px; }
.admin-nav { display: grid; gap: 4px; }
.admin-sidebar-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.25s var(--ease-out);
}
.admin-nav-item i { font-size: 18px; transition: transform 0.3s var(--ease-spring); }
.admin-nav-item:hover { background: var(--surface-muted); color: var(--text-main); transform: translateX(3px); }
.admin-nav-item:hover i { transform: scale(1.12); }
.admin-nav-item.active { background: var(--primary-soft); color: var(--primary); }
.admin-nav-count {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  text-align: center;
}
.admin-nav-count.alert { background: var(--accent); color: #fff; }
.admin-nav-count:empty { display: none; }

/* Main area */
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 36px;
  background: rgba(243, 245, 249, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.admin-crumb { font-size: 12.5px; color: var(--text-light); margin-bottom: 2px; }
.admin-topbar h1 { font-size: 24px; }
.admin-topbar-actions { display: flex; align-items: center; gap: 16px; }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.admin-user .avatar { width: 38px; height: 38px; margin: 0; font-size: 14px; }
.admin-content { padding: 32px 36px 64px; }
.admin-tab-panel { animation: rise-in 0.45s var(--ease-out) both; }
.admin-tab-panel[hidden] { display: none; }

/* Stats */
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.admin-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.admin-stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.admin-stat p { font-size: 13px; color: var(--text-muted); margin-bottom: 2px; }
.admin-stat strong { font-size: 26px; font-weight: 700; line-height: 1.1; }
.admin-stat-icon {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 21px;
  transition: transform 0.4s var(--ease-spring);
}
.admin-stat:hover .admin-stat-icon { transform: rotate(-8deg) scale(1.08); }
.admin-stat-icon.navy { background: var(--primary-soft); color: var(--primary); }
.admin-stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.admin-stat-icon.red { background: var(--accent-light); color: var(--accent); }
.admin-stat-icon.green { background: var(--success-bg); color: var(--success); }

.admin-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.panel-sub { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }

/* Overview lists */
.admin-list { display: grid; gap: 4px; }
.admin-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, transform 0.25s var(--ease-out);
}
.admin-list-row:hover { background: var(--surface-muted); transform: translateX(4px); }
.admin-list-main { min-width: 0; }
.admin-list-main strong { display: block; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list-main small, .admin-list-side small { color: var(--text-muted); font-size: 12.5px; }
.admin-list-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: 14px; }
.admin-empty { display: flex; align-items: center; gap: 10px; padding: 14px; color: var(--text-muted); font-size: 14px; }
.admin-empty i { font-size: 18px; color: var(--success); }

.photo-progress-text { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; }
.photo-progress-text strong { color: var(--text-main); }
.photo-progress { height: 8px; border-radius: var(--radius-full); background: var(--surface-muted); overflow: hidden; margin-bottom: 18px; }
.photo-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #3B6FD8); transition: width 0.8s var(--ease-out); }

/* Toolbars */
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 20px; }
.admin-search { position: relative; flex: 1 1 260px; }
.admin-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); }
.admin-search .form-input { padding-left: 40px; }
.admin-filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-filter-pills .pill { padding: 6px 14px; }
.admin-toolbar-actions { display: flex; gap: 8px; margin-left: auto; }

/* Tables */
.table-card { overflow: hidden; }
.admin-table th { background: var(--surface-muted); padding: 12px 16px; }
.admin-table td { padding: 14px 16px; vertical-align: top; }
.admin-table tbody tr { transition: background 0.2s; }
.admin-table tbody tr:hover { background: #FAFBFD; }
.table-empty { text-align: center; color: var(--text-muted); padding: 40px 16px !important; }
.table-empty.error { color: var(--danger); }
.nowrap { white-space: nowrap; }
.muted-block { display: block; color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
code.sku { font-size: 12.5px; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--surface-muted); color: var(--text-main); white-space: nowrap; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.actions-col { text-align: right; width: 1%; white-space: nowrap; }
.row-actions { display: inline-flex; gap: 6px; }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }

.admin-product-cell { display: flex; align-items: center; gap: 14px; min-width: 260px; }
.admin-product-text { min-width: 0; }
.admin-product-text strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.4; }
.admin-product-text small { color: var(--text-muted); font-size: 12.5px; }
.needs-photo { color: var(--warning); font-weight: 500; }
.admin-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--surface-muted);
  overflow: hidden;
  cursor: pointer;
}
.admin-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s var(--ease-out); }
.admin-thumb.no-photo { border-style: dashed; border-color: var(--warning); }
.admin-thumb-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(11, 42, 102, 0.6); color: #fff; font-size: 18px; opacity: 0; transition: opacity 0.2s;
}
.admin-thumb:hover .admin-thumb-overlay, .admin-thumb:focus-visible .admin-thumb-overlay { opacity: 1; }
.admin-thumb:hover img { transform: scale(1.08); }

.order-items { list-style: none; margin: 0; padding: 0; font-size: 13.5px; display: grid; gap: 3px; }
.order-items span { color: var(--text-muted); }
.contact-links { display: grid; gap: 2px; margin-top: 6px; font-size: 12.5px; }
.contact-links a { color: var(--text-muted); }
.contact-links a:hover { color: var(--primary); }
.status-select { width: auto; min-width: 140px; padding: 7px 12px; font-size: 13px; font-weight: 500; border-radius: var(--radius-full); }
.status-pending { background: var(--warning-bg); border-color: #F5D9A8; color: var(--warning); }
.status-processing, .status-dispatched { background: var(--primary-soft); border-color: #C9D7F2; color: var(--primary); }
.status-delivered { background: var(--success-bg); border-color: #B7E3C9; color: var(--success); }
.status-cancelled { background: var(--danger-bg); border-color: #F5C2C2; color: var(--danger); }

/* Messages */
.admin-messages { display: grid; gap: 16px; }
.admin-message { padding: 24px; transition: box-shadow 0.3s, transform 0.3s var(--ease-out); }
.admin-message:hover { box-shadow: var(--shadow-md); }
.admin-message.resolved { opacity: 0.75; }
.admin-message header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.admin-message header strong { display: block; font-size: 15px; }
.admin-message header small { color: var(--text-muted); font-size: 12.5px; }
.admin-message h3 { font-size: 16px; margin-bottom: 8px; }
.admin-message p { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; white-space: pre-line; }
.admin-message footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-light); }

/* Images */
.banner-preview { aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-muted); margin-bottom: 16px; border: 1px solid var(--border-light); }
.banner-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.banner-preview:hover img { transform: scale(1.04); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.media-item { margin: 0; padding: 10px; border: 1px solid var(--border-light); border-radius: var(--radius-md); transition: box-shadow 0.25s, transform 0.25s var(--ease-out); }
.media-item:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.media-item.broken { display: none; }
.media-thumb { aspect-ratio: 1; border-radius: 8px; background: var(--surface-muted); overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.media-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.media-item figcaption { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }
.media-item .btn { width: 100%; }

/* Modals */
.admin-modal { max-width: 760px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border-light); }
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-drop {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin-bottom: 22px;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  transition: border-color 0.2s, background 0.2s;
}
.photo-drop-preview {
  position: relative; width: 104px; height: 104px; flex-shrink: 0; border-radius: 12px;
  background: #fff; border: 1px solid var(--border-light); overflow: hidden; cursor: pointer;
}
.photo-drop-preview img { width: 100%; height: 100%; object-fit: contain; }
.photo-drop-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(11, 42, 102, 0.55); color: #fff; font-size: 22px; opacity: 0; transition: opacity 0.2s;
}
.photo-drop-preview:hover .photo-drop-overlay { opacity: 1; }
.photo-drop-body strong { display: block; font-size: 15px; margin-bottom: 4px; }
.photo-drop-body p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 16px 0; margin-bottom: 18px; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle span {
  position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--border-subtle);
  transition: background 0.25s; flex-shrink: 0;
}
.toggle span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease-spring);
}
.toggle input:checked + span { background: var(--primary); }
.toggle input:checked + span::after { transform: translateX(18px); }
.toggle input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.admin-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--primary-soft); margin-bottom: 18px; }
.admin-note strong { display: block; font-size: 14px; }
.admin-note span { font-size: 13px; color: var(--text-muted); }
.csv-drop {
  padding: 32px 20px; text-align: center; border: 2px dashed var(--border-subtle); border-radius: var(--radius-lg);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.csv-drop:hover { border-color: var(--primary); background: var(--surface-muted); }
.csv-drop i { font-size: 36px; color: var(--primary); display: block; margin-bottom: 8px; }
.csv-drop div { font-weight: 500; margin-bottom: 4px; }
.csv-drop span { font-size: 12.5px; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1200px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-sidebar {
    position: sticky; top: 0; z-index: 30; height: auto;
    flex-direction: row; align-items: center; gap: 12px; padding: 10px 16px;
    border-right: none; border-bottom: 1px solid var(--border-light); overflow-x: auto;
  }
  .admin-logo .logo-name, .admin-logo .logo-sub { display: none; }
  .admin-nav { display: flex; gap: 4px; }
  .admin-nav-item { width: auto; padding: 9px 12px; white-space: nowrap; }
  .admin-nav-item:hover { transform: none; }
  .admin-sidebar-foot { display: flex; margin: 0 0 0 auto; padding: 0; border: none; }
  .admin-sidebar-foot .admin-nav-item span { display: none; }
  .admin-topbar { position: static; padding: 18px 20px; }
  .admin-content { padding: 20px 20px 56px; }
  .admin-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .admin-toolbar-actions { margin-left: 0; }
}
@media (max-width: 600px) {
  .admin-stats { grid-template-columns: minmax(0, 1fr); }
  .admin-nav-item span { display: none; }
  .admin-nav-item i { font-size: 20px; }
  .admin-user-name { display: none; }
  .admin-topbar h1 { font-size: 20px; }
  .form-row-3 { grid-template-columns: minmax(0, 1fr); }
  .photo-drop { flex-direction: column; text-align: center; }
}

.admin-sidebar { scrollbar-width: none; }
.admin-sidebar::-webkit-scrollbar { display: none; }
.admin-list-side small { white-space: nowrap; }
@media (max-width: 600px) { .admin-logo { display: none; } .admin-list-side small { display: none; } }
