/*
Theme Name: Highway Auto Investments Theme
Theme URI: https://www.highwayautoinvestments.co.za
Author: Highway Auto Investments
Author URI: https://www.highwayautoinvestments.co.za
Description: Custom high-performance e-commerce theme for Highway Auto Investments (Tyres, Starters, Alternators & Batteries) with built-in stock management and PayFast integration.
Version: 1.0.3
License: GNU General Public License v2 or later
Text Domain: highway-auto-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=Syne:wght@700;800&display=swap');

:root {
  --bg-dark: #090a0f;
  --bg-card: rgba(22, 25, 34, 0.75);
  --bg-card-hover: rgba(30, 35, 48, 0.85);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(255, 42, 95, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-crimson: #ff2a5f;
  --accent-crimson-glow: rgba(255, 42, 95, 0.5);
  --accent-amber: #ffab00;
  --accent-cyan: #00f2fe;

  --font-display: 'Syne', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 42, 95, 0.08), transparent 50%),
    radial-gradient(circle at 100% 50%, rgba(0, 242, 254, 0.05), transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #262a36;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-crimson);
}

/* Typography */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
}

h5, h6, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Utility Components */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-primary {
  background: rgba(255, 42, 95, 0.15);
  border: 1px solid var(--accent-crimson);
  color: var(--accent-crimson);
}

.badge-warning {
  background: rgba(255, 171, 0, 0.15);
  border: 1px solid var(--accent-amber);
  color: var(--accent-amber);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #10b981;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #ef4444;
}

.badge-dark {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--accent-crimson);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-crimson-glow);
}

.btn-primary:hover {
  background: #ff4575;
  box-shadow: 0 6px 28px rgba(255, 42, 95, 0.7);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: rotate(30deg);
  transition: all 0.75s ease;
}

.btn-glow:hover::after {
  left: 100%;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(9, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
}

.logo-mark {
  background: linear-gradient(135deg, var(--accent-crimson), #ff6b00);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-crimson-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--accent-crimson);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payfast-nav-badge {
  background: rgba(255, 107, 0, 0.15);
  border: 1px solid #ff6b00;
  color: #ff6b00;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.payfast-nav-badge:hover {
  background: rgba(255, 107, 0, 0.3);
}

.cart-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: all var(--transition-fast);
}

.cart-icon-btn:hover {
  border-color: var(--accent-crimson);
  color: var(--accent-crimson);
}

.cart-count-badge {
  background: var(--accent-crimson);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sections */
.section-padding {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header .sub-title {
  color: var(--accent-crimson);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.section-header .main-title {
  font-size: 2.2rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 28px;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: saturate(1.2) contrast(1.1);
  z-index: 1;
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(9, 10, 15, 0.4) 0%,
    rgba(9, 10, 15, 0.85) 60%,
    var(--bg-dark) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
}

.hero-tag {
  display: inline-block;
  color: var(--accent-amber);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-title .accent-text {
  color: var(--accent-crimson);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 60px;
}

.telemetry-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.telemetry-card {
  padding: 20px;
}

.telemetry-card .number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
}

.telemetry-card .number.accent-text {
  color: var(--accent-crimson);
}

.telemetry-card .label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* Modals */
.modal-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: rgba(18, 21, 30, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-window.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.close-btn:hover {
  color: #fff;
}

/* Forms */
.checkout-form .form-group {
  margin-bottom: 16px;
}

.checkout-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form input[type="password"],
.checkout-form input[type="number"],
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: var(--accent-crimson);
}

/* Toasts */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-message {
  background: rgba(22, 25, 34, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  min-width: 280px;
}

.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-info { border-left: 4px solid var(--accent-amber); }

/* Footer */
.site-footer {
  background: rgba(5, 6, 9, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col h5 {
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-col ul a:hover {
  color: var(--accent-crimson);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
  font-size: 0.75rem;
  color: var(--text-dim);
}




/* Mobile menu toggle (hidden on desktop) */
.mobile-toggle-btn {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.mobile-toggle-btn:hover {
  border-color: var(--accent-crimson);
  color: var(--accent-crimson);
}

/* Ensure cart always visible in header */
.nav-actions {
  flex-shrink: 0;
}
#open-cart-btn.cart-icon-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* =========================================================
   PRODUCT CATALOG GRID — 4 columns desktop, responsive mobile
   ========================================================= */

.catalog-toolbar,
.catalog-filters,
.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.cat-tabs,
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cat-tab-btn:hover,
.cat-tab-btn.active {
  background: rgba(255, 42, 95, 0.15);
  border-color: var(--accent-crimson);
  color: #fff;
}

#catalog-search-input,
.catalog-search-input,
.catalog-sort select,
#catalog-sort {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  min-width: 160px;
  max-width: 100%;
}

#catalog-search-input:focus,
.catalog-sort select:focus {
  outline: none;
  border-color: var(--accent-crimson);
}

/* 4 products side-by-side on desktop */
.catalog-grid,
#catalog-grid-container.catalog-grid,
#catalog-grid-container {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  align-items: stretch;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  min-width: 0;
  padding: 0;
}

.product-card .card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.product-card .card-media .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.product-card .product-img,
.product-card img.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 12px;
  display: block;
  transition: transform var(--transition-normal);
}

.product-card:hover .product-img {
  transform: scale(1.04);
}

.product-card .card-body,
.product-card .card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
  gap: 8px;
}

.product-card .product-name,
.product-card h3,
.product-card .card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.product-card .product-tagline,
.product-card .tagline {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .product-price,
.product-card .price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-crimson);
  margin-top: auto;
}

.product-card .card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.product-card .card-actions .btn {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.78rem;
}

.product-card.out-of-stock-card {
  opacity: 0.85;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
}

#configurator-app {
  max-width: 100%;
  overflow-x: hidden;
}

/* Tablet: 3 columns */
@media (max-width: 1100px) {
  .catalog-grid,
  #catalog-grid-container.catalog-grid,
  #catalog-grid-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Phone landscape / small tablet: 2 columns */
@media (max-width: 768px) {
  .catalog-grid,
  #catalog-grid-container.catalog-grid,
  #catalog-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .hero-title { font-size: 2rem !important; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .telemetry-row { grid-template-columns: 1fr 1fr; }
  .section-padding { padding: 56px 0; }
  .section-header .main-title { font-size: 1.5rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(9, 10, 15, 0.97);
    backdrop-filter: blur(16px);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
  }
  .nav-links.active { display: flex; }
  .nav-actions .payfast-nav-badge span { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .modal-window {
    width: calc(100vw - 24px) !important;
    max-width: 100%;
    padding: 20px;
    max-height: 85vh;
  }

  .product-card .product-name,
  .product-card h3 { font-size: 0.85rem; min-height: 2.4em; }
  .product-card .product-price { font-size: 1.1rem; }
  .product-card .card-body,
  .product-card .card-content { padding: 12px; }

  #hai-float-contact { bottom: 12px !important; right: 12px !important; }
  #hai-float-contact a { padding: 10px 12px !important; font-size: 0.7rem !important; }

  .container { padding-left: 16px; padding-right: 16px; }
  body { overflow-x: hidden; }
}

/* Small phones: 1 column */
@media (max-width: 480px) {
  .catalog-grid,
  #catalog-grid-container.catalog-grid,
  #catalog-grid-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .telemetry-row { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.65rem !important; }
  .nav-actions .cart-icon-btn { padding: 8px 10px; font-size: 0.75rem; }
}

@media (min-width: 1101px) {
  .catalog-grid,
  #catalog-grid-container.catalog-grid,
  #catalog-grid-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* Product card details (matches catalog.js markup) */
.product-card .quick-view-overlay-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.product-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.product-card .category-tag {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-card .product-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.product-card .card-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.product-card .price-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-card .price-lbl {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-card .price-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-crimson);
}

/* Force grid even if other rules interfere */
section#catalog #catalog-grid-container {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
}

@media (max-width: 1100px) {
  section#catalog #catalog-grid-container {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 768px) {
  section#catalog #catalog-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .product-card .product-title { font-size: 0.82rem; }
  .product-card .price-val { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  section#catalog #catalog-grid-container {
    grid-template-columns: 1fr !important;
  }
}


/* Mobile cart visibility fix */
@media (max-width: 900px) {
  .mobile-toggle-btn {
    display: inline-flex !important;
  }
  .nav-container {
    flex-wrap: nowrap !important;
    gap: 6px;
  }
  .nav-actions {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  #open-cart-btn.cart-icon-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 120;
    padding: 8px 10px !important;
    font-size: 0.85rem !important;
    gap: 4px !important;
  }
  #open-cart-btn .cart-label {
    display: none !important;
  }
  #open-cart-btn .cart-emoji {
    font-size: 1.15rem;
    line-height: 1;
  }
  #open-cart-btn .cart-count-badge {
    font-size: 0.7rem !important;
  }
  .nav-actions a[href^="tel"] span {
    display: none !important;
  }
  .brand-logo span {
    font-size: 0.7rem;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* ===== Cart Drawer ===== */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.cart-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: min(420px, 100vw) !important;
  max-width: 100vw !important;
  height: 100% !important;
  height: 100dvh !important;
  background: #0c0e14 !important;
  border-left: 1px solid rgba(255,255,255,0.12) !important;
  z-index: 2147483000 !important;
  display: none;
  flex-direction: column !important;
  transform: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
.cart-drawer.open {
  display: flex !important;
}
.cart-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.7) !important;
  z-index: 2147482999 !important;
  display: none;
  opacity: 1 !important;
  visibility: visible !important;
}
.cart-backdrop.open {
  display: block !important;
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
}
.cart-drawer-header h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.empty-cart-view {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}

.cart-line-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cart-line-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
}
.cart-line-info {
  flex: 1;
  min-width: 0;
}
.cart-line-info h4 {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: #fff;
  line-height: 1.3;
}
.cart-line-info .line-price {
  color: var(--accent-crimson);
  font-weight: 700;
  font-size: 0.9rem;
}
.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.05);
  color: #fff;
  cursor: pointer;
}
.remove-item-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
}

.cart-drawer-footer {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-color);
  background: rgba(8, 10, 14, 0.95);
}
.cart-totals {
  margin-bottom: 12px;
}
.cart-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.cart-total-row {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 8px;
}
.promo-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.promo-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
}

@media (max-width: 480px) {
  .cart-drawer {
    width: 100vw;
  }
  #hai-float-contact {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    right: 12px !important;
  }
}

/* Sticky safe navbar on mobile */
@media (max-width: 900px) {
  .navbar {
    padding-top: max(10px, env(safe-area-inset-top, 0px));
  }
}


/* Checkout modal polish */
#checkout-modal.modal-window,
#payfast-settings-modal.modal-window {
  z-index: 20000 !important;
}
#checkout-modal.open,
#payfast-settings-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.checkout-header h2 {
  color: #fff;
  font-size: 1.2rem;
  margin: 0 0 8px;
}
.step-indicator {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.step-indicator .step.active {
  color: var(--accent-crimson);
  font-weight: 700;
}
.step-indicator .step.completed {
  color: #10b981;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  #checkout-modal.modal-window {
    width: calc(100vw - 16px) !important;
    max-height: 92vh;
    padding: 16px;
    overflow-y: auto;
  }
}
.payment-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.payment-tab-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}
.payment-tab-btn.active {
  border-color: #ff6b00;
  color: #fff;
  background: rgba(255, 107, 0, 0.12);
}
.modal-footer-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}
.success-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.8rem;
}


/* Product image presentation — smooth, clean cutouts */
.product-card .product-media,
.product-card .card-image,
.catalog-card .product-media,
.catalog-grid .product-card img,
.catalog-grid img.product-img,
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0) 70%),
    linear-gradient(160deg, #151820 0%, #0c0e14 100%);
  border-radius: 12px 12px 0 0;
  padding: 18px;
  display: block;
  image-rendering: auto;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.product-card:hover img,
.catalog-card:hover img {
  transform: scale(1.04);
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.45));
}

.product-media,
.card-image-wrap {
  overflow: hidden;
  background: #0c0e14;
  border-radius: 12px 12px 0 0;
}

/* Modal product image */
#product-modal-body img,
.product-detail-image img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: radial-gradient(circle at center, #1a1e28 0%, #0c0e14 100%);
  border-radius: 12px;
  padding: 20px;
  margin: 0 auto;
  display: block;
}


/* ===== Product Detail Page (Shopify-style) ===== */
#product-detail-modal.modal-window {
  width: min(1100px, calc(100vw - 16px)) !important;
  max-height: 92vh;
  overflow-y: auto;
  padding: 0 !important;
  background: #0f1218 !important;
  border: 1px solid rgba(255,255,255,0.08);
  z-index: 1600;
}
#product-detail-modal.open {
  opacity: 1;
  visibility: visible;
}
body.pdp-open { overflow: hidden; }

.pdp { color: #e8eaed; padding: 20px 24px 32px; }
.pdp-breadcrumb {
  font-size: 0.8rem;
  color: #9aa3b2;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pdp-crumb-link { color: #9aa3b2; text-decoration: none; }
.pdp-crumb-link:hover { color: #ff2a5f; }
.pdp-crumb-current { color: #c5cdd8; max-width: 50ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdp-crumb-sep { opacity: 0.5; }

.pdp-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
@media (max-width: 800px) {
  .pdp-main { grid-template-columns: 1fr; gap: 20px; }
}

.pdp-image-wrap {
  background: linear-gradient(160deg, #1a1e28, #0c0e14);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.pdp-image {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(0,0,0,0.45));
}

.pdp-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.3;
}
.pdp-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ff2a5f;
  margin-bottom: 12px;
}
.pdp-short {
  color: #aab3c0;
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.pdp-blurb {
  color: #8b93a2;
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 18px;
}
.pdp-meta {
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 12px 0;
  margin-bottom: 18px;
}
.pdp-meta-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #9aa3b2;
}
.pdp-meta-row strong { color: #e8eaed; font-weight: 600; }

.pdp-actions { margin-bottom: 16px; }
.pdp-add-btn {
  min-width: 180px;
  padding: 14px 22px !important;
  font-weight: 700;
}
.pdp-stock {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.pdp-stock.in { color: #ff2a5f; }
.pdp-stock.out { color: #ef4444; }

.pdp-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
  color: #9aa3b2;
  margin-bottom: 18px;
}
.pdp-share a { color: #c5cdd8; text-decoration: none; }
.pdp-share a:hover { color: #ff2a5f; }

.pdp-pay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
}
.pdp-pay-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #e8eaed;
  margin-bottom: 8px;
}
.pdp-pay-badge {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: #aab3c0;
  background: rgba(255,255,255,0.03);
}

.pdp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 18px;
}
.pdp-tab {
  background: none;
  border: none;
  color: #9aa3b2;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 4px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.pdp-tab.active {
  color: #ff2a5f;
  border-bottom-color: #ff2a5f;
}
.pdp-panel { display: none; font-size: 0.92rem; line-height: 1.6; color: #c5cdd8; }
.pdp-panel.active { display: block; }
.pdp-panel h3 { color: #fff; font-size: 1.05rem; margin: 0 0 10px; }
.pdp-feature-list { margin: 12px 0 0; padding-left: 18px; }
.pdp-muted { color: #8b93a2; }
.pdp-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.pdp-spec-table th,
.pdp-spec-table td {
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 14px;
  text-align: left;
}
.pdp-spec-table th {
  width: 40%;
  background: rgba(255,255,255,0.03);
  color: #aab3c0;
  font-weight: 600;
}
.pdp-spec-table td { color: #e8eaed; }

.product-card[data-open-product] { cursor: pointer; }
.product-card[data-open-product]:focus-visible {
  outline: 2px solid #ff2a5f;
  outline-offset: 2px;
}


/* Dimensions section on product detail */
.pdp-dimensions {
  margin-top: 22px;
}
.pdp-dim-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
}
.pdp-dim-table {
  max-width: 420px;
}
.pdp-dim-table th {
  width: 35%;
}


/* Dimensions visualization */
.pdp-dim-visual {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) minmax(160px, 0.9fr);
  gap: 16px 20px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 640px) {
  .pdp-dim-visual { grid-template-columns: 1fr; }
}
.pdp-dim-svg {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.pdp-dim-label {
  fill: #c5cdd8;
  font-size: 11px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
}
.pdp-dim-h { fill: #8eb4ff; }
.pdp-dim-w { fill: #6ee7b7; }

.pdp-dim-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pdp-dim-chip {
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.25);
  border-left: 3px solid #ff2a5f;
}
.pdp-dim-chip span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9aa3b2;
  margin-bottom: 2px;
}
.pdp-dim-chip strong {
  font-size: 1rem;
  color: #fff;
  font-weight: 700;
}
.pdp-dim-chip-l { border-left-color: #ff2a5f; }
.pdp-dim-chip-w { border-left-color: #34d399; }
.pdp-dim-chip-h { border-left-color: #5b8cff; }
.pdp-dim-chip-wt { border-left-color: #fbbf24; }


/* Interactive 3D product dimension model */
.hai-3d-stage {
  position: relative;
  min-height: 220px;
  perspective: 900px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.hai-3d-stage.is-dragging { cursor: grabbing; }
.hai-3d-scene {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}
.hai-3d-box {
  --l: 120px;
  --w: 70px;
  --h: 60px;
  width: var(--l);
  height: var(--h);
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-22deg) rotateY(32deg);
  transition: transform 0.05s linear;
}
.hai-3d-face {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 42, 95, 0.45);
  backface-visibility: visible;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
}
.hai-3d-front, .hai-3d-back {
  width: var(--l);
  height: var(--h);
  left: 0;
  top: 0;
  background: linear-gradient(160deg, rgba(42,49,64,0.95), rgba(18,22,31,0.98));
}
.hai-3d-front {
  transform: translateZ(calc(var(--w) / 2));
  box-shadow: inset 0 0 30px rgba(255,42,95,0.08);
}
.hai-3d-back {
  transform: rotateY(180deg) translateZ(calc(var(--w) / 2));
  background: #12161f;
}
.hai-3d-left, .hai-3d-right {
  width: var(--w);
  height: var(--h);
  top: 0;
  left: calc(50% - var(--w) / 2);
  background: linear-gradient(90deg, #1a2030, #0e121a);
}
.hai-3d-right { transform: rotateY(90deg) translateZ(calc(var(--l) / 2)); }
.hai-3d-left { transform: rotateY(-90deg) translateZ(calc(var(--l) / 2)); }
.hai-3d-top, .hai-3d-bottom {
  width: var(--l);
  height: var(--w);
  left: 0;
  top: calc(50% - var(--w) / 2);
}
.hai-3d-top {
  transform: rotateX(90deg) translateZ(calc(var(--h) / 2));
  background: linear-gradient(180deg, #3a4458, #252c3a);
  border-color: rgba(255,42,95,0.55);
}
.hai-3d-bottom {
  transform: rotateX(-90deg) translateZ(calc(var(--h) / 2));
  background: #0a0d14;
}
.hai-3d-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 700;
}
.hai-3d-leg-l { color: #ff2a5f; }
.hai-3d-leg-w { color: #34d399; }
.hai-3d-leg-h { color: #5b8cff; }
.hai-3d-hint {
  text-align: center;
  font-size: 0.7rem;
  color: #6b7280;
  margin: 4px 0 0;
}
.hai-3d-reset {
  display: block;
  margin: 8px auto 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #aab3c0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  cursor: pointer;
}
.hai-3d-reset:hover {
  border-color: #ff2a5f;
  color: #fff;
}


/* ===== MOBILE UX FIXES (phones) ===== */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  overflow-x: hidden;
  max-width: 100vw;
}
img, video, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* Sticky header safe on notched phones */
.navbar, #main-navbar {
  max-width: 100vw;
  box-sizing: border-box;
}

/* Category tabs: horizontal scroll, no wrap overflow */
.catalog-filters,
.cat-tabs,
.filter-tabs,
#catalog .cat-tab-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
  padding-bottom: 6px;
  scrollbar-width: none;
  max-width: 100%;
}
.catalog-filters::-webkit-scrollbar,
.cat-tabs::-webkit-scrollbar {
  display: none;
}
.cat-tab-btn,
.filter-chip {
  flex: 0 0 auto !important;
  white-space: nowrap;
  min-height: 40px;
  padding: 8px 14px !important;
  font-size: 0.82rem !important;
}

/* Search + sort stack on narrow screens */
.catalog-toolbar,
.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}
.catalog-toolbar input,
.catalog-toolbar select,
#catalog-search-input {
  min-width: 0 !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Product grid: 2 cols on typical phones, 1 only on very small */
@media (max-width: 900px) {
  .catalog-grid,
  #catalog-grid-container.catalog-grid,
  #catalog-grid-container,
  section#catalog #catalog-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .product-card .product-title,
  .product-card h4 {
    font-size: 0.88rem !important;
    line-height: 1.3;
  }
  .product-card .product-tagline {
    font-size: 0.72rem !important;
  }
  .product-card .price-val {
    font-size: 1.05rem !important;
  }
  .product-card .btn,
  .product-card .add-to-cart-btn {
    min-height: 44px;
    font-size: 0.78rem !important;
    padding: 10px 8px !important;
  }
  .product-card .card-content {
    padding: 10px 12px 14px !important;
  }
  .product-card .card-meta {
    font-size: 0.68rem;
  }
}
@media (max-width: 360px) {
  .catalog-grid,
  #catalog-grid-container.catalog-grid,
  #catalog-grid-container,
  section#catalog #catalog-grid-container {
    grid-template-columns: 1fr !important;
  }
}

/* Float buttons: don't cover cart/content */
#hai-float-contact {
  z-index: 1200;
  right: 12px !important;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  gap: 8px;
}
#hai-float-contact a,
#hai-float-contact button {
  min-height: 44px;
  min-width: 44px;
}

/* Cart drawer full-screen phone */
@media (max-width: 600px) {
  .cart-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
  }
  .cart-item {
    flex-wrap: wrap;
    gap: 8px;
  }
  .cart-item img {
    width: 56px !important;
    height: 56px !important;
  }
}

/* Product detail modal mobile */
@media (max-width: 800px) {
  #product-detail-modal.modal-window,
  #product-detail-modal.pdp-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100% !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
  }
  .pdp {
    padding: 12px 14px 28px !important;
  }
  .pdp-title {
    font-size: 1.2rem !important;
  }
  .pdp-price {
    font-size: 1.45rem !important;
  }
  .pdp-tabs {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }
  .pdp-tab {
    flex: 0 0 auto;
    font-size: 0.82rem !important;
    padding: 10px 8px !important;
  }
  .pdp-pay {
    grid-template-columns: 1fr !important;
  }
  .pdp-add-btn {
    width: 100%;
    min-height: 48px;
  }
  .pdp-breadcrumb {
    font-size: 0.72rem;
  }
  .hai-3d-stage {
    min-height: 180px;
  }
}

/* Mobile nav panel */
@media (max-width: 900px) {
  .nav-links {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: min(320px, 88vw) !important;
    height: 100dvh !important;
    background: #0c0e14 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 20px 24px !important;
    gap: 4px !important;
    z-index: 1400 !important;
    transform: translateX(105%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0,0,0,0.45);
  }
  .nav-links.active {
    transform: translateX(0) !important;
    display: flex !important;
  }
  .nav-links a {
    padding: 14px 12px !important;
    font-size: 1rem !important;
    min-height: 48px;
    display: flex !important;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  #nav-backdrop.open {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1350;
  }
  body.menu-open {
    overflow: hidden !important;
    touch-action: none;
  }
  .mobile-toggle-btn {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .header-actions .btn,
  .navbar .btn-call,
  #cart-toggle-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Configurator cards readable on phone */
@media (max-width: 600px) {
  .config-option,
  .config-card,
  .fitment-option {
    width: 100%;
    box-sizing: border-box;
  }
}

/* Reduce hero padding on phones */
@media (max-width: 600px) {
  .hero-section,
  #hero {
    padding-top: 100px !important;
    padding-bottom: 48px !important;
  }
  .hero-section h1,
  .hero-content h1 {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
  }
}


body.cart-open { overflow: hidden !important; touch-action: none; }


/* Catalog toolbar mobile stack */
@media (max-width: 900px) {
  .catalog-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .catalog-toolbar .cat-tabs {
    width: 100%;
    order: 1;
  }
  .catalog-toolbar .catalog-search-box {
    width: 100%;
    order: 2;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .catalog-toolbar .catalog-search-box input,
  .catalog-toolbar .catalog-search-box select {
    width: 100% !important;
    min-height: 44px;
    box-sizing: border-box;
  }
  .section-padding {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* Specs label on cards shouldn't overflow */
  .product-card .specs-label,
  .product-card [style*="font-size: 0.75rem"] {
    word-break: break-word;
  }
}

/* Ensure modal close button reachable on mobile */
#product-detail-modal .modal-close,
#close-product-modal-btn {
  position: sticky;
  top: 8px;
  z-index: 5;
  min-width: 44px;
  min-height: 44px;
}


/* Progressive enhancement helpers */
.no-js .quick-view-overlay-btn { opacity: 1; transform: none; }
.no-js .hai-fallback-cta { display: inline-flex !important; }
.js .hai-fallback-cta { /* JS will re-render cards with add-to-cart */ }
.cat-tab-btn {
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted, #aab3c0);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.cat-tab-btn.active,
.cat-tab-btn:hover {
  color: #fff;
  border-color: rgba(255, 42, 95, 0.55);
  background: rgba(255, 42, 95, 0.12);
}
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
#catalog-grid-container[data-enhanced="false"] .hai-ssr-card {
  animation: hai-ssr-in 0.35s ease both;
}
@keyframes hai-ssr-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}


/* ===== Accessibility ===== */
.skip-to-content {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2147483647;
  padding: 12px 18px;
  background: #ff2a5f;
  color: #fff !important;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.15s ease;
}
.skip-to-content:focus,
.skip-to-content:focus-visible {
  transform: translateY(0);
  outline: 3px solid #fff;
  outline-offset: 2px;
}

:focus-visible {
  outline: 3px solid #ff2a5f !important;
  outline-offset: 3px !important;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
  outline: none;
}

.screen-reader-text,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Prefer higher contrast text where muted */
@media (prefers-contrast: more) {
  body {
    --text-muted: #c5cdd8;
    --text-dim: #b0b8c4;
  }
  .product-card,
  .glass-card {
    border-color: rgba(255,255,255,0.35) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hai-3d-box {
    animation: none !important;
  }
}

/* Cart / modal focus ring on close */
.close-btn:focus-visible,
#close-cart-btn:focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 2px;
}

/* Ensure interactive cards keyboard-friendly */
.product-card[tabindex="0"]:focus-visible {
  box-shadow: 0 0 0 3px #ff2a5f;
}

#main-content:focus {
  outline: none;
}


/* Vehicle Battery Finder */
.bf-section { background: rgba(255,255,255,0.02); }
.bf-form {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
}
.bf-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.bf-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #aab3c0);
  margin-bottom: 6px;
}
.bf-field select,
.bf-field input[type="number"] {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: #fff;
  padding: 10px 12px;
  font-size: 1rem;
  box-sizing: border-box;
}
.bf-check label {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  min-height: 48px;
  color: #e5e7eb;
}
.bf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.bf-actions .btn { min-height: 48px; }
.bf-results { max-width: 960px; margin: 28px auto 0; }
.bf-results-head h3 {
  color: #fff;
  font-size: 1.25rem;
  margin: 0 0 6px;
}
.bf-note, .bf-disclaimer {
  color: var(--text-muted, #aab3c0);
  font-size: 0.9rem;
}
.bf-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}
.bf-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  padding: 14px;
  align-items: center;
}
.bf-card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}
.bf-card h4 {
  margin: 4px 0 6px;
  font-size: 1rem;
  color: #fff;
}
.bf-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,42,95,0.15);
  color: #ff6b9a;
}
.bf-meta { font-size: 0.8rem; color: var(--text-dim, #8b93a1); margin: 0 0 10px; }
.bf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bf-price { color: #fff; font-size: 1.1rem; margin-right: auto; }
.bf-empty, .bf-error, .bf-loading { text-align: center; padding: 24px; color: #e5e7eb; }
.bf-empty .btn { margin: 8px; }
@media (max-width: 800px) {
  .bf-fields { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .bf-fields { grid-template-columns: 1fr; }
  .bf-card { grid-template-columns: 72px 1fr; }
  .bf-card img { width: 72px; height: 72px; }
}

.bf-card-best { border: 1px solid rgba(255,42,95,0.45) !important; box-shadow: 0 0 0 1px rgba(255,42,95,0.15); }
.bf-best, .bf-alt {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  margin-right: 6px;
}
.bf-best { background: rgba(255,42,95,0.2); color: #ff6b9a; }
.bf-alt { background: rgba(52,211,153,0.15); color: #34d399; }


.bf-tip {
  background: rgba(255,42,95,0.08);
  border: 1px solid rgba(255,42,95,0.25);
  border-radius: 10px;
  padding: 12px 14px;
  color: #f3f4f6;
  font-size: 0.92rem;
  margin: 10px 0;
}
.bf-tier { color: #ff6b9a; font-weight: 600; }
.bf-code {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: #cbd5e1;
}


/* Order fulfilment */
.fulfillment-badge {
  display: inline-block;
  margin: 4px 0 6px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #1a1a1a;
  background: linear-gradient(135deg, #ffb347, #ff6b00);
  border-radius: 999px;
}
.cart-fulfillment-notice {
  margin-bottom: 12px;
  padding: 12px 14px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #f5f5f5;
  background: rgba(255, 107, 0, 0.12);
  border: 1px solid rgba(255, 107, 0, 0.4);
  border-radius: 10px;
}
.cart-line-item.fulfillment-item {
  border-left: 3px solid #ff6b00;
}
.fulfillment-checkout-notice p { margin: 0; }

/* Backorder admin */
.bo-card select, .bo-card input[type="text"] {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-color, #333);
  color: inherit;
  border-radius: 6px;
  padding: 6px 8px;
}


/* Mobile admin + manage-on-phone */
@media (max-width: 768px) {
  #admin-modal.open,
  .admin-modal.open,
  [id*="admin"].open {
    /* ensure full viewport usability */
  }
  #admin-modal,
  #admin-modal-content,
  .admin-portal,
  [id="admin-tab-content"] {
    max-width: 100% !important;
  }
  .payment-tabs-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .payment-tab-btn {
    font-size: 0.72rem !important;
    padding: 10px 12px !important;
    min-height: 44px;
    white-space: nowrap;
  }
  .glass-card input,
  .glass-card select,
  .glass-card textarea,
  #admin-tab-content input,
  #admin-tab-content select,
  #admin-tab-content textarea,
  #admin-tab-content button {
    font-size: 16px !important; /* prevents iOS zoom */
    min-height: 44px;
  }
  #admin-tab-content .btn,
  .bo-save-btn,
  .fit-status-btn {
    min-height: 44px !important;
    padding: 10px 14px !important;
  }
  /* stack booking action buttons */
  #admin-tab-content [style*="display:flex"] {
    flex-wrap: wrap !important;
  }
}

/* Sticky mobile manage bar hint - only when admin logged session could show via JS */
.hai-mobile-manage-fab {
  position: fixed;
  bottom: 88px;
  right: 16px;
  z-index: 9998;
  display: none !important;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b00, #d44d00);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  border: none;
  cursor: pointer;
}
@media (max-width: 900px) {
  .hai-mobile-manage-fab.show {
    display: inline-flex !important;
  }
}
/* Never show manage fab without .show (customers) */
.hai-mobile-manage-fab:not(.show) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* Mobile admin dashboard */
@media (max-width: 768px) {
  #admin-portal-modal.modal-window,
  #admin-portal-modal {
    width: 100% !important;
    max-width: 100vw !important;
    min-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
  }
  .hai-admin-tabs .payment-tab-btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .hai-admin-home .btn {
    width: auto;
  }
}


/* === HAI mobile menu fix 2026-08-18 === */
#nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1350;
  border: 0;
}
#nav-backdrop.open {
  display: block !important;
}
.mobile-toggle-btn {
  position: relative;
  z-index: 1500 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}
@media (max-width: 900px) {
  .mobile-toggle-btn {
    display: inline-flex !important;
  }
  nav[aria-label="Primary"] {
    position: static !important;
  }
  #nav-links.nav-links,
  ul#nav-links {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(320px, 88vw) !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    background: #0c0e14 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 20px 24px !important;
    gap: 4px !important;
    z-index: 1400 !important;
    transform: translateX(105%) !important;
    transition: transform 0.28s ease !important;
    overflow-y: auto !important;
    list-style: none !important;
    box-shadow: -8px 0 32px rgba(0,0,0,0.45);
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  #nav-links.nav-links.active,
  ul#nav-links.active {
    transform: translateX(0) !important;
    display: flex !important;
  }
  #nav-links.nav-links a,
  ul#nav-links a {
    color: #fff !important;
    padding: 14px 12px !important;
    font-size: 1rem !important;
    min-height: 48px;
    display: flex !important;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-decoration: none !important;
  }
  #main-navbar {
    z-index: 1450 !important;
  }
  .nav-actions {
    position: relative;
    z-index: 1500 !important;
  }
}


/* === HAI M3 monogram + M5 header lockup === */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  min-width: 0;
}
.brand-logo .logo-mark--mono {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: #ffffff !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25) !important;
  border-radius: 50%;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(201,162,39,0.45);
}
.brand-logo .logo-mono-svg {
  width: 44px;
  height: 44px;
  display: block;
}
.brand-logo .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand-logo .brand-name {
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-logo .brand-sub {
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: #C9A227;
  text-transform: uppercase;
  margin-top: 2px;
}
.brand-logo .brand-loc {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-top: 3px;
  display: none;
}
@media (min-width: 900px) {
  .brand-logo .brand-loc { display: block; }
  .brand-logo .logo-mark--mono,
  .brand-logo .logo-mono-svg { width: 48px; height: 48px; min-width: 48px; }
  .brand-logo .brand-name { font-size: 1.05rem; }
}
@media (max-width: 480px) {
  .brand-logo .brand-sub { letter-spacing: 0.18em; font-size: 0.58rem; }
  .brand-logo .brand-name { font-size: 0.78rem; letter-spacing: 0.08em; }
  .brand-logo .logo-mark--mono,
  .brand-logo .logo-mono-svg { width: 40px; height: 40px; min-width: 40px; }
}
/* Hide old text-only span if any leftover */
.brand-logo > span:not(.logo-mark):not(.brand-text) {
  display: none;
}


/* === Professional overview / hero === */
.hero-section--pro .hero-tag--gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(201,162,39,0.45);
  background: rgba(12,14,20,0.55);
  color: #E8C547;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-section--pro .hero-title {
  max-width: 18ch;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.hero-section--pro .accent-text--gold {
  color: #C9A227 !important;
  background: none !important;
  -webkit-text-fill-color: #C9A227;
}
.hero-section--pro .hero-subtitle {
  max-width: 42rem;
  color: rgba(232,232,236,0.88);
  font-size: 1.05rem;
  line-height: 1.6;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 18px 0 22px;
}
.hero-trust span {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(232,232,236,0.85);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  padding: 6px 12px;
  border-radius: 999px;
}
.hero-section--pro .hero-actions {
  flex-wrap: wrap;
  gap: 10px;
}
.telemetry-row--pro .telemetry-card {
  border: 1px solid rgba(201,162,39,0.18);
  background: rgba(12,14,20,0.72);
}
.telemetry-row--pro .number {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.telemetry-row--pro .label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(160,160,168,0.95);
}
.hero-fineprint {
  margin-top: 14px;
  font-size: 0.75rem;
  color: rgba(160,160,168,0.9);
  max-width: 40rem;
}
.footer-col .brand-logo .logo-mark--mono {
  width: 48px;
  height: 48px;
  min-width: 48px;
}
.footer-col .brand-logo .brand-loc { display: block !important; }


/* Compact overview hero */
.hero-section--pro {
  min-height: auto !important;
  padding-top: 80px !important;
  padding-bottom: 24px !important;
}
.hero-section--pro .hero-content {
  padding-top: 8px;
  padding-bottom: 8px;
}
.hero-section--pro .hero-title {
  max-width: 22ch;
  font-size: clamp(1.45rem, 2.8vw, 2.15rem) !important;
  margin-bottom: 10px !important;
}
.hero-section--pro .hero-subtitle {
  font-size: 0.95rem !important;
  margin-bottom: 10px;
  max-width: 36rem;
}
.hero-section--pro .hero-trust {
  margin: 10px 0 14px !important;
}
.hero-section--pro .telemetry-row {
  margin-top: 16px;
  gap: 10px;
}
.hero-section--pro .telemetry-card {
  padding: 12px 14px;
}
.hero-section--pro .telemetry-row--pro .number {
  font-size: 0.95rem;
}
.hero-section--pro .hero-fineprint {
  margin-top: 10px;
}
.hero-bg-image {
  object-position: center 35%;
}
@media (max-width: 768px) {
  .hero-section, .hero-section--pro {
    padding-top: 72px !important;
    padding-bottom: 20px !important;
  }
  .hero-section--pro .hero-actions .btn {
    width: 100%;
  }
}


/* Dynamic category filter UI */
.cat-tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cat-tab-btn .cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  color: rgba(232,232,236,0.85);
}
.cat-tab-btn.active .cat-count {
  background: rgba(201,162,39,0.25);
  color: #E8C547;
}
.catalog-result-meta {
  margin: 12px 0 16px;
  font-size: 0.9rem;
  color: rgba(232,232,236,0.75);
}
.catalog-result-meta strong {
  color: #E8C547;
}
#catalog-grid-container[aria-busy="true"] {
  opacity: 0.72;
  transition: opacity 0.15s ease;
}


/* Price range slider */
.catalog-price-filter {
  margin: 14px 0 8px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(12,14,20,0.55);
  max-width: 520px;
}
.price-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.price-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232,232,236,0.7);
}
.price-filter-values {
  font-size: 0.9rem;
  font-weight: 600;
  color: #E8C547;
}
.price-slider-wrap {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
}
.price-slider-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}
.price-range-input {
  position: absolute;
  left: 0;
  width: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
  height: 36px;
}
.price-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #C9A227;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.price-range-input::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #C9A227;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  cursor: pointer;
}
.price-range-input::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
}
.price-range-input::-moz-range-track {
  height: 6px;
  background: transparent;
}
.price-filter-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.price-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: rgba(232,232,236,0.65);
}
.price-input-group input {
  width: 6.5rem;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: #E8E8EC;
  padding: 6px 10px;
}
#price-reset-btn {
  min-height: 40px;
  padding: 0 14px;
}
@media (max-width: 600px) {
  .catalog-price-filter { max-width: none; }
  .price-input-group input { width: 5.5rem; }
}


/* === Professional section system (Battery Finder + Book Service) === */
.section-header--pro {
  text-align: center;
  margin-bottom: 28px;
}
.sub-title--gold {
  display: inline-block;
  color: #E8C547 !important;
  letter-spacing: 0.14em;
  font-size: 0.72rem !important;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid rgba(201,162,39,0.4);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(12,14,20,0.4);
  margin-bottom: 12px;
}
.section-header--pro .main-title {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  text-transform: none;
}
.section-lead {
  max-width: 40rem;
  margin: 0 auto;
  color: rgba(232,232,236,0.82);
  font-size: 0.98rem;
  line-height: 1.6;
}
.section-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.section-chips span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(232,232,236,0.8);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  padding: 5px 11px;
  border-radius: 999px;
}

.bf-section--pro {
  background: linear-gradient(180deg, rgba(201,162,39,0.04), transparent 40%);
  border-top: 1px solid rgba(255,255,255,0.04);
}
.bf-section--pro .bf-form {
  max-width: 820px;
  margin: 0 auto;
  padding: 22px 22px 18px;
  border: 1px solid rgba(201,162,39,0.2);
  border-radius: 16px;
  background: rgba(12,14,20,0.72);
}
.bf-section--pro .bf-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.bf-section--pro .bf-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232,232,236,0.65);
  margin-bottom: 6px;
}
.bf-section--pro .bf-field select,
.bf-section--pro .bf-field input[type="number"] {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: #E8E8EC;
  padding: 8px 12px;
}
.bf-section--pro .bf-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding-bottom: 4px;
}
.bf-section--pro .bf-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.bf-section--pro #bf-find-btn {
  min-height: 46px;
  padding: 0 22px;
}
.bf-section--pro .bf-tip {
  border-color: rgba(201,162,39,0.35);
  background: rgba(201,162,39,0.08);
}
.bf-section--pro .bf-card-best {
  border-color: rgba(201,162,39,0.5) !important;
  box-shadow: 0 0 0 1px rgba(201,162,39,0.12);
}
.bf-section--pro .bf-best {
  background: rgba(201,162,39,0.2);
  color: #E8C547;
}
.bf-section--pro .bf-tier { color: #E8C547; }
@media (max-width: 900px) {
  .bf-section--pro .bf-fields {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .bf-section--pro .bf-fields {
    grid-template-columns: 1fr;
  }
}

.booking-section--pro {
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.015);
}
.booking-pro-wrap {
  max-width: 960px;
}
.booking-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.booking-info-card {
  padding: 18px 18px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}
.booking-info-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C9A227;
  margin-bottom: 6px;
}
.booking-info-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
}
.booking-info-card p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: rgba(232,232,236,0.8);
  line-height: 1.5;
}
.booking-info-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.booking-info-card li {
  font-size: 0.85rem;
  color: rgba(232,232,236,0.75);
  padding: 4px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.booking-form-shell {
  padding: 22px 20px;
  border-radius: 16px;
  border: 1px solid rgba(201,162,39,0.22);
  background: rgba(12,14,20,0.65);
}
.booking-form-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
}
.booking-form-note {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: rgba(232,232,236,0.7);
}
#fitment-booking-root label {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232,232,236,0.65);
}
#fitment-booking-root input,
#fitment-booking-root select,
#fitment-booking-root textarea {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: #E8E8EC;
}
@media (max-width: 800px) {
  .booking-info-grid {
    grid-template-columns: 1fr;
  }
}


/* Find us / local SEO block */
.find-us-section {
  border-top: 1px solid rgba(255,255,255,0.05);
}
.find-us-wrap { max-width: 1000px; }
.find-us-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.find-us-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}
.find-us-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: #E8C547;
}
.find-us-card p, .find-us-card li {
  font-size: 0.9rem;
  color: rgba(232,232,236,0.82);
  line-height: 1.55;
}
.find-us-card a { color: #E8C547; }
.find-us-keywords {
  margin: 0;
  padding-left: 1.1rem;
}
@media (max-width: 700px) {
  .find-us-grid { grid-template-columns: 1fr; }
}


.gbp-actions {
  margin-top: 16px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(201,162,39,0.25);
}
.gbp-actions h3 { margin: 0 0 8px; color: #E8C547; }
.gbp-actions p { color: rgba(232,232,236,0.82); font-size: 0.92rem; line-height: 1.55; }
.gbp-action-btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; }
.gbp-note { font-size: 0.8rem !important; color: rgba(160,160,168,0.95) !important; margin: 0 !important; }

.local-faq-section { border-top: 1px solid rgba(255,255,255,0.05); }
.local-faq-list { display: flex; flex-direction: column; gap: 10px; }
.local-faq-item { padding: 0; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); overflow: hidden; }
.local-faq-item summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
}
.local-faq-item summary::-webkit-details-marker { display: none; }
.local-faq-item p {
  margin: 0;
  padding: 0 16px 14px;
  font-size: 0.9rem;
  color: rgba(232,232,236,0.82);
  line-height: 1.55;
}


/* Invoice admin mobile */
@media (max-width: 700px) {
  #admin-portal-modal { width: 100vw !important; max-width: 100vw !important; border-radius: 0 !important; }
  .inv-wrap label { font-size: 0.8rem; }
  .inv-wrap input, .inv-wrap select, .inv-wrap textarea {
    font-size: 16px !important; /* prevent iOS zoom */
    min-height: 44px;
  }
  .inv-line {
    grid-template-columns: 1fr 1fr !important;
  }
  .inv-line .inv-desc { grid-column: 1 / -1; }
  #inv-editor > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .hai-admin-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap !important; }
  .hai-admin-tabs .payment-tab-btn { flex: 0 0 auto; white-space: nowrap; }
}


/* Android admin long-press target */
a.brand-logo[data-hai-admin-entry],
[data-hai-admin-entry] {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}


/* ========== HAI Admin Portal (phone + laptop) ========== */
.hai-admin-portal.modal-window,
#admin-portal-modal.hai-admin-portal {
  width: min(960px, 100vw) !important;
  max-width: 100vw !important;
  max-height: min(92vh, 100dvh) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  border-radius: 16px !important;
  border: 1px solid rgba(201,162,39,0.25) !important;
  background: #0c0e14 !important;
}
.hai-admin-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  max-height: min(92vh, 100dvh);
}
.hai-admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(201,162,39,0.08), transparent);
  flex-shrink: 0;
}
.hai-admin-brand { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.hai-admin-pill {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0c0e14;
  background: #E8C547;
  padding: 4px 8px;
  border-radius: 6px;
  margin-top: 4px;
}
.hai-admin-title { margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.hai-admin-sub { margin: 4px 0 0; font-size: 0.75rem; color: rgba(232,232,236,0.65); }
.hai-admin-top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hai-admin-close {
  width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; background: rgba(255,255,255,0.05); color: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.hai-admin-nav {
  display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0;
}
.hai-admin-nav-btn {
  flex: 0 0 auto; min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  color: rgba(232,232,236,0.85); font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.hai-admin-nav-btn.active {
  background: rgba(201,162,39,0.2); border-color: rgba(201,162,39,0.55); color: #E8C547;
}
.hai-admin-content {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px 28px;
}
.hai-home-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.hai-home-date { margin: 0; font-size: 0.8rem; color: rgba(232,232,236,0.6); }
.hai-home-heading { margin: 4px 0 0; font-size: 1.2rem; }
.hai-home-badge { font-size: 0.7rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.hai-home-badge.is-on { background: rgba(34,197,94,0.15); color: #4ade80; }
.hai-home-badge.is-off { background: rgba(248,113,113,0.15); color: #f87171; }
.hai-home-note { margin: 0 0 14px; font-size: 0.8rem; color: rgba(232,232,236,0.65); }
.hai-home-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px;
}
@media (min-width: 640px) {
  .hai-home-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.hai-stat-card {
  text-align: left; padding: 14px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
  color: inherit; cursor: pointer;
}
.hai-stat-card.is-alert {
  border-color: rgba(255,179,71,0.4); background: rgba(255,107,0,0.08);
}
.hai-stat-num { display: block; font-size: 1.5rem; font-weight: 800; color: #E8C547; line-height: 1.1; }
.hai-stat-label { display: block; font-size: 0.78rem; margin-top: 4px; opacity: 0.85; }
.hai-stat-sub { display: block; font-size: 0.72rem; margin-top: 2px; opacity: 0.6; }
.hai-home-actions { padding: 14px; border-radius: 12px; margin-bottom: 14px; }
.hai-home-action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hai-home-action-row .btn { min-height: 44px; }
@media (max-width: 640px) {
  .hai-admin-portal.modal-window,
  #admin-portal-modal.hai-admin-portal {
    width: 100vw !important; max-height: 100dvh !important; height: 100dvh !important;
    border-radius: 0 !important; top: 0 !important; left: 0 !important; transform: none !important;
  }
  .hai-admin-shell { max-height: 100dvh; height: 100dvh; }
  .hai-admin-nav-btn { min-height: 44px; padding: 10px 16px; }
}
.hai-mobile-manage-fab {
  position: fixed !important; right: 16px !important; bottom: 88px !important; z-index: 9998 !important;
  min-height: 48px !important; padding: 12px 16px !important; border-radius: 999px !important;
  border: 1px solid rgba(201,162,39,0.5) !important; background: #C9A227 !important;
  color: #0c0e14 !important; font-weight: 700 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35) !important;
}


/* Cart shipping */
.cart-shipping-box {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(201,162,39,0.25);
  background: rgba(201,162,39,0.06);
}
.cart-shipping-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232,232,236,0.7);
  margin-bottom: 6px;
}
#cart-shipping-method {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: #E8E8EC;
  padding: 8px 10px;
  font-size: 0.9rem;
}
.cart-shipping-note {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: rgba(232,232,236,0.65);
  line-height: 1.4;
}


/* About + Tips journal */
.hai-story-section,
.hai-tips-section {
  padding: 56px 0 64px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.hai-story-eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E8C547;
}
.hai-story-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
}
@media (max-width: 800px) {
  .hai-story-grid { grid-template-columns: 1fr; }
}
.hai-story-copy h2,
.hai-tips-header h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.hai-story-lead {
  font-size: 1.1rem;
  color: rgba(232,232,236,0.9);
  margin: 0 0 14px;
  line-height: 1.5;
}
.hai-story-copy p {
  color: rgba(232,232,236,0.78);
  line-height: 1.65;
  margin: 0 0 12px;
}
.hai-story-points {
  margin: 16px 0 20px;
  padding-left: 1.15rem;
  color: rgba(232,232,236,0.85);
  line-height: 1.55;
}
.hai-story-points li { margin-bottom: 8px; }
.hai-story-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.hai-story-card {
  padding: 22px 20px;
  border-radius: 14px;
  border: 1px solid rgba(201,162,39,0.28);
  background: linear-gradient(160deg, rgba(201,162,39,0.1), rgba(255,255,255,0.03));
}
.hai-story-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: #E8C547;
}
.hai-story-card p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(232,232,236,0.82);
}
.hai-story-card a { color: #E8C547; }
.hai-story-card-note {
  font-size: 0.8rem !important;
  opacity: 0.75;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
}
.hai-tips-header { max-width: 640px; margin-bottom: 24px; }
.hai-tips-intro {
  margin: 0;
  color: rgba(232,232,236,0.7);
  line-height: 1.55;
}
.hai-tips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 900px) {
  .hai-tips-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hai-tips-grid { grid-template-columns: 1fr; }
}
.hai-tip-card {
  padding: 18px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.hai-tip-tag {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C9A227;
}
.hai-tip-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.3;
}
.hai-tip-card p {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(232,232,236,0.75);
  flex: 1;
}
.hai-tip-card a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #E8C547;
  text-decoration: none;
}
.hai-tip-card a:hover { text-decoration: underline; }


/* Admin modal must always sit above nav/cart/PWA */
#admin-portal-modal.hai-admin-portal,
#admin-portal-modal.modal-window {
  z-index: 10050 !important;
  pointer-events: auto !important;
}
#admin-portal-modal.hai-admin-portal.open,
#admin-portal-modal.modal-window.open {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}
.modal-backdrop.open {
  z-index: 10040 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
/* Login form needs padding when shell padding is 0 */
#admin-portal-modal .checkout-form,
#admin-portal-modal .text-center {
  padding-left: 20px;
  padding-right: 20px;
}
#admin-login-form {
  padding: 8px 20px 28px;
}
#admin-portal-modal .close-btn {
  z-index: 2;
}

#product-detail-modal.modal-window.open {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  z-index: 20000 !important;
}
