/* ==========================================================================
   HIGH TECH AUTO PARTS - LIGHT THEME & MOBILE-FIRST RESPONSIVE CSS
   ========================================================================== */

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

:root {
  /* LIGHT THEME PALETTE */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-topbar: #0f172a; /* Deep contrast topbar for essential info */
  --bg-header: #ffffff;
  --bg-nav: #ffffff;
  --bg-footer: #0f172a;

  --primary-red: #dc2626;
  --primary-red-hover: #b91c1c;
  --primary-red-light: #fee2e2;
  
  --dark-black: #0f172a;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease-in-out;
}

/* ==========================================================================
   TOP ANNOUNCEMENT BAR
   ========================================================================== */
.top-bar {
  background: var(--bg-topbar);
  color: #f8fafc;
  padding: 8px 20px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--primary-red);
}

.top-bar-info {
  display: flex;
  gap: 20px;
  align-items: center;
}

.top-bar-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-bar-links {
  display: flex;
  gap: 15px;
}

.top-bar-links a {
  color: #cbd5e1;
}

.top-bar-links a:hover {
  color: #ffffff;
}

/* ==========================================================================
   HEADER & NAVIGATION (LIGHT THEME)
   ========================================================================== */
.main-header {
  background: var(--bg-header);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* BRAND LOGO */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo-img {
  height: 50px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--dark-black);
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--primary-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* SEARCH BAR WITH VOICE SEARCH */
.header-search {
  flex: 2;
  max-width: 720px;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 2px solid var(--border-color);
  border-radius: 30px;
  padding: 5px 5px 5px 22px;
  min-height: 52px;
  transition: all 0.2s;
}

.search-form:focus-within {
  border-color: var(--primary-red);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: var(--dark-black);
  font-family: var(--font-body);
}

.voice-search-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-search-btn:hover,
.voice-search-btn.listening {
  color: var(--primary-red);
  background: var(--primary-red-light);
  transform: scale(1.1);
}

.search-submit-btn {
  background: var(--primary-red);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  min-width: 42px;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
}

.search-submit-btn:hover {
  background: var(--primary-red-hover);
  transform: scale(1.05);
}

/* HEADER ACTIONS */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  color: var(--dark-black);
  position: relative;
}

.header-action-item i {
  font-size: 1.3rem;
  color: var(--primary-red);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--primary-red);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

/* NAVIGATION BAR (LIGHT THEME) */
.nav-bar {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-links li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-dark);
  border-bottom: 3px solid transparent;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--primary-red);
  border-bottom-color: var(--primary-red);
  background: #f8fafc;
}

/* ==========================================================================
   EASY CATEGORY FINDER MARQUEE (LIGHT THEME)
   ========================================================================== */
.category-marquee-container {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  padding: 10px 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.category-marquee-track {
  display: flex;
  gap: 15px;
  width: max-content;
  animation: marqueeScroll 120s linear infinite;
}

.category-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Very small phones: track is proportionally wider than the viewport, so slow it down even more */
@media (max-width: 420px) {
  .category-marquee-track {
    animation-duration: 280s;
  }
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  color: var(--dark-black);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}

.marquee-item:hover {
  background: var(--primary-red-light);
  border-color: var(--primary-red);
  color: var(--primary-red);
}

/* ==========================================================================
   HOMEPAGE HERO SLIDER
   ========================================================================== */
.hero-slider-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 1280px;
  margin: 20px auto 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(220,38,38,0.15);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1f2937 100%);
  min-height: 380px;
}

.hero-slides {
  position: relative;
  width: 100%;
  min-height: 380px;
}

.hero-slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
  padding: 30px 74px;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.hero-slide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 30px;
  width: 100%;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.hero-badge {
  background: var(--primary-red);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  animation: heroBadgePulse 2.2s ease-in-out infinite;
}

@keyframes heroBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.55); }
  50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); }
}

.hero-sale {
  color: #facc15;
  font-weight: 700;
  font-size: 0.88rem;
}

.hero-slide-content {
  color: #ffffff;
}

.hero-slide-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  color: #ffffff;
}

.hero-slide-subtitle {
  font-size: 1rem;
  margin-bottom: 22px;
  color: #cbd5e1;
  line-height: 1.5;
}

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

.hero-slide-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-slide-image-wrap img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
  transition: transform 0.4s ease;
}

.hero-slide.active .hero-slide-image-wrap img {
  transform: scale(1.03);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.9);
  color: var(--dark-black);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: all 0.2s;
}

.slider-arrow:hover {
  background: var(--primary-red);
  color: #ffffff;
}

.slider-arrow.prev { left: 15px; }
.slider-arrow.next { right: 15px; }

.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: var(--primary-red);
  width: 28px;
  border-radius: 6px;
}

/* ==========================================================================
   EASY CATEGORIES GRID (LIGHT THEME)
   ========================================================================== */
.section-wrapper {
  max-width: 1280px;
  margin: 35px auto;
  padding: 0 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark-black);
  position: relative;
  padding-left: 14px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 5px;
  background: var(--primary-red);
  border-radius: 3px;
}

.view-all-link {
  color: var(--primary-red);
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-all-link:hover {
  text-decoration: underline;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.category-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 15px;
  text-align: center;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-red);
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.category-icon {
  width: 54px;
  height: 54px;
  background: var(--primary-red-light);
  color: var(--primary-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.category-card:hover .category-icon {
  background: var(--primary-red);
  color: #ffffff;
}

.category-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark-black);
}

/* ==========================================================================
   FRONTEND FORM CONTROLS (checkout, account, login, contact, product page
   variation selector, track-order, etc.)
   These classes were only defined in the admin stylesheet, so every
   storefront form rendered with unstyled browser-default inputs: labels
   sitting inline with tiny inputs, no consistent width, broken on mobile.
   ========================================================================== */
.form-group {
  margin-bottom: 18px;
  display: block;
  width: 100%;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  background: #ffffff;
  color: var(--dark-black);
  box-sizing: border-box;
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 44px;
}

/* ==========================================================================
   PRODUCTS GRID (LIGHT THEME)
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  min-width: 0;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
  min-width: 0;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary-red);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
  text-transform: uppercase;
}

.product-image-wrap {
  width: 100%;
  height: 200px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}

.product-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.06);
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.product-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark-black);
  margin-bottom: 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 12px;
}

.current-price {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary-red);
}

.old-price {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.qty-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
  background: #ffffff;
}

.qty-btn {
  background: #f1f5f9;
  border: none;
  color: var(--dark-black);
  font-weight: 800;
  font-size: 1rem;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.qty-btn:hover {
  background: var(--primary-red);
  color: #ffffff;
}

.qty-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 60px;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--dark-black);
  height: 36px;
  outline: none;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-add-cart {
  background: #f1f5f9;
  color: var(--dark-black);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  width: 100%;
}

.btn-add-cart:hover {
  background: var(--primary-red);
  color: #ffffff;
  border-color: var(--primary-red);
}

/* ==========================================================================
   BUTTON UTILITIES (LIGHT THEME)
   ========================================================================== */
.btn-primary {
  background: var(--primary-red);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-red-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--dark-black);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* ==========================================================================
   FOOTER (LIGHT/CONTRAST THEME)
   ========================================================================== */
.features-strip {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 30px 20px;
  margin-top: 50px;
}

.features-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature-box {
  display: flex;
  align-items: center;
  gap: 15px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-red-light);
  color: var(--primary-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.feature-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark-black);
}

.feature-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.main-footer {
  background: var(--bg-footer);
  color: #94a3b8;
  padding: 50px 20px 20px;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 35px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 35px;
  height: 3px;
  background: var(--primary-red);
}

.footer-links {
  list-style: none;
}

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

.footer-links li a {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.footer-links li a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.social-icon {
  width: 36px;
  height: 36px;
  background: #1e293b;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon:hover {
  background: var(--primary-red);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  font-size: 0.85rem;
  color: #64748b;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS
   ========================================================================== */
.mobile-nav-toggle {
  display: none;
}

/* ==========================================================================
   MOBILE HAMBURGER MENU BUTTON (shown only on mobile: Logo + Search + Hamburger)
   ========================================================================== */
.mobile-menu-btn {
  display: none;
  position: relative;
  background: var(--primary-red);
  color: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: var(--primary-red-hover);
}

.mobile-cart-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--dark-black);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 84%;
  max-width: 330px;
  height: 100%;
  background: #ffffff;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: -6px 0 24px rgba(0,0,0,0.25);
}

.mobile-menu-panel.active {
  transform: translateX(0);
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--dark-black);
  color: #ffffff;
  border-bottom: 3px solid var(--primary-red);
  position: sticky;
  top: 0;
}

.mobile-menu-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
}

.mobile-menu-links {
  list-style: none;
  padding: 6px 0;
}

.mobile-menu-links li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  border-bottom: 1px solid #f1f5f9;
}

.mobile-menu-links li a:active,
.mobile-menu-links li a:hover {
  background: var(--primary-red-light);
  color: var(--primary-red);
}

.mobile-menu-links li a i {
  color: var(--primary-red);
  width: 18px;
  text-align: center;
}

.mobile-menu-badge {
  margin-left: auto;
  background: var(--primary-red);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.mobile-menu-section-label {
  padding: 16px 20px 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  font-weight: 800;
}

body.mobile-menu-open {
  overflow: hidden;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  .hero-slide-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-slide-content {
    order: 1;
  }
  .hero-slide-image-wrap {
    order: 2;
  }
  .hero-badge-row,
  .hero-slide-actions {
    justify-content: center;
  }
  .hero-slide-image-wrap img {
    max-height: 220px;
  }
  .hero-slider-wrapper {
    min-height: unset;
  }
  .hero-slides {
    min-height: unset;
    display: flex;
    width: 100%;
    transition: transform 0.4s ease-in-out;
    will-change: transform;
  }
  .hero-slide {
    position: relative;
    flex: 0 0 100%;
    max-width: 100%;
    padding: 26px 24px;
    opacity: 1;
    visibility: visible;
    transition: none;
  }
  .footer-container {
    text-align: left;
  }
}

/* ---- SIMPLE MOBILE HEADER: Logo + Search + Hamburger only ---- */
@media (max-width: 768px) {
  .top-bar,
  .nav-bar,
  .header-actions {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .main-header {
    padding: 10px 14px;
    position: sticky;
  }
  .header-container {
    flex-wrap: nowrap;
    gap: 10px;
  }
  .brand-logo {
    gap: 8px;
  }
  .brand-tagline {
    display: none;
  }
  .site-logo-img {
    height: 38px;
  }
  .header-search {
    order: 0;
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  .search-form {
    padding: 3px 4px 3px 12px;
    min-height: 44px;
  }
  .search-input {
    font-size: 0.85rem;
  }
  .search-submit-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 0.9rem;
  }
  .category-marquee-track {
    animation-duration: 240s;
  }
  .section-wrapper {
    margin: 22px auto;
    padding: 0 14px;
  }
  .hero-slider-wrapper {
    margin: 10px auto 0;
    border-radius: 8px;
  }
  .hero-slide {
    padding: 16px 18px;
  }
  .hero-slide-grid {
    gap: 8px;
  }
  .hero-badge-row {
    margin-bottom: 6px;
  }
  .hero-badge {
    font-size: 0.68rem;
    padding: 3px 8px;
  }
  .hero-sale {
    font-size: 0.8rem;
  }
  .hero-slide-title {
    font-size: 1.22rem;
    margin-bottom: 5px;
    line-height: 1.15;
  }
  .hero-slide-subtitle {
    font-size: 0.82rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-slide-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hero-slide-actions .btn-primary,
  .hero-slide-actions .btn-secondary {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
  .hero-slide-image-wrap img {
    max-height: 110px;
  }
  .slider-arrow {
    display: none;
  }
  .slider-dots {
    bottom: 8px;
  }
  .dot {
    width: 8px;
    height: 8px;
  }
  .dot.active {
    width: 20px;
  }
}

/* ---- VERY SMALL PHONES ---- */
@media (max-width: 420px) {
  .brand-text {
    display: none;
  }
  .site-logo-img {
    height: 32px;
  }
  .search-submit-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.82rem;
  }
  .voice-search-btn {
    padding: 6px 8px;
  }
  .top-bar {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    min-width: 0;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    min-width: 0;
  }
  .product-image-wrap {
    height: 140px;
  }
  .product-body {
    padding: 10px;
  }
  .product-title {
    font-size: 0.88rem;
    height: 2.6em;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .current-price {
    font-size: 1.05rem;
  }
  .btn-add-cart {
    padding: 8px;
    font-size: 0.8rem;
  }
  .hero-slide {
    padding: 14px 14px;
  }
  .hero-slide-title {
    font-size: 1.05rem;
    margin-bottom: 4px;
  }
  .hero-slide-subtitle {
    font-size: 0.76rem;
    margin-bottom: 10px;
    -webkit-line-clamp: 1;
  }
  .hero-slide-image-wrap img {
    max-height: 85px;
  }
  .hero-badge {
    font-size: 0.62rem;
    padding: 2px 7px;
  }
  .hero-sale {
    font-size: 0.72rem;
  }
  .hero-slide-actions .btn-primary,
  .hero-slide-actions .btn-secondary {
    padding: 7px 11px;
    font-size: 0.75rem;
  }
}

/* ---- TABLET: keep header on one row but roomier ---- */
@media (min-width: 769px) and (max-width: 992px) {
  .header-search {
    max-width: 360px;
  }
  .nav-links {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 8px;
  }
}

/* ==========================================================================
   GLOBAL RESPONSIVE GRID FIX
   Many pages (shop sidebar+listing, cart, checkout, account, product detail,
   contact, login, order tracking) use inline two/three-column CSS grids for
   desktop layout. Force every one of them to a single readable column on
   tablet/mobile instead of squeezing multiple columns into a narrow screen.
   ========================================================================== */
@media (max-width: 900px) {
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* Re-allow short paired fields (first/last name, city/postal code, etc.) to
   stay side-by-side on tablets where there is enough room, but stack them on
   phones. */
@media (min-width: 641px) and (max-width: 900px) {
  form [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Tables that use inline layouts (cart, account order history) need to
   scroll horizontally instead of squashing/overflowing on small screens. */
@media (max-width: 640px) {
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ==========================================================================
   SHOP FILTER PANEL (collapsible on mobile)
   Previously the full category/bike-model filter list rendered as a giant
   always-open block above the product grid on mobile, forcing shoppers to
   scroll past 30+ category links before seeing a single product. It is now
   wrapped in a native <details> so it can be collapsed to a single tap
   target; JS below collapses it by default on small screens only.
   ========================================================================== */
.filter-summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.filter-summary::-webkit-details-marker {
  display: none;
}
.filter-summary::after {
  content: '\2013\00a0Tap to collapse';
  float: right;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  border-bottom: none;
}
.filter-details:not([open]) .filter-summary::after {
  content: '+ Show Filters';
}

.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  min-width: 0;
}

@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .shop-sidebar {
    margin-bottom: 20px;
    min-width: 0;
    width: 100%;
  }
  .shop-products-main {
    min-width: 0;
  }
  .products-grid {
    min-width: 0;
  }
  .filter-summary::after {
    content: '\25be Tap to collapse';
  }
  .filter-details:not([open]) .filter-summary::after {
    content: '\25b8 Show Filters';
  }
}

/* ==========================================
   VOICE NOTE RECORDER (WhatsApp-style)
   ========================================== */
.voice-note-recorder {
  margin-top: 10px;
}

.voice-note-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-record-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: var(--primary-red);
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.voice-record-btn:hover {
  background: #fde2e2;
}

.voice-record-btn.recording {
  background: var(--primary-red);
  color: #ffffff;
  animation: voiceRecordPulse 1.2s infinite;
}

@keyframes voiceRecordPulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.voice-note-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.voice-note-timer {
  display: none;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-red);
  font-variant-numeric: tabular-nums;
}

.voice-note-timer.active {
  display: inline-block;
}

.voice-note-preview {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.voice-note-preview.active {
  display: flex;
}

.voice-note-preview audio {
  flex: 1;
  height: 36px;
  max-width: 320px;
}

.voice-note-delete {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-note-delete:hover {
  background: #fecaca;
}

.shop-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 35px;
}
.shop-pagination-link {
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  border: 1px solid var(--border-color);
}

@media (max-width: 480px) {
  .voice-note-hint {
    display: none;
  }
  .shop-pagination {
    gap: 6px;
    margin-top: 25px;
  }
  .shop-pagination-link {
    padding: 6px 11px;
    font-size: 0.85rem;
  }
}
