/* Motor Parts 360 - Premium Automotive eCommerce Styles */

:root {
  --burgundy: #C8102E;
  --burgundy-dark: #A00D24;
  --burgundy-light: #E8354A;
  --black: #0A0A0A;
  --charcoal: #1A1A1A;
  --dark-grey: #2D2D2D;
  --mid-grey: #6B7280;
  --light-grey: #F3F4F6;
  --silver: #C0C4CC;
  --white: #FFFFFF;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1400px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--charcoal);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.container-custom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light-grey); }
::-webkit-scrollbar-thumb { background: var(--burgundy); border-radius: 4px; }

/* Coming Soon Banner / Top Utility Bar */
.coming-soon-banner,
.top-utility-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--burgundy);
}

.top-utility-bar {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.utility-select {
  background: transparent;
  border: none;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-transform: uppercase;
}
.utility-select option { color: #111; }

.utility-link {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.utility-link:hover { color: white; }

.social-icons-sm a {
  color: white;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.social-icons-sm a:hover { opacity: 1; }

/* Classic White Navigation */
#main-nav.nav-classic {
  background: white !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
#main-nav.nav-classic .nav-link-classic {
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.25s;
}
#main-nav.nav-classic .nav-link-classic:hover,
#main-nav.nav-classic .nav-link-classic.active {
  color: var(--burgundy);
}
#main-nav.nav-classic .nav-link-classic.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--burgundy);
}
#main-nav.nav-classic .search-btn-classic {
  color: #333;
  transition: color 0.2s;
}
#main-nav.nav-classic .search-btn-classic:hover { color: var(--burgundy); }
#main-nav.nav-classic.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Classic Hero */
.hero-classic {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  margin-top: calc(var(--header-height, 120px));
}

.hero-classic-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 40%, #ececec 100%);
  will-change: transform;
}

.dot-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.7) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: 0.6;
  will-change: transform;
}

.hero-classic-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 520px;
  padding: 3rem 0;
}
@media (min-width: 1024px) {
  .hero-classic-inner {
    grid-template-columns: 1fr 1fr;
    min-height: 560px;
  }
}

.hero-slide-image {
  max-height: 420px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
  will-change: transform;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide-image.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.hero-welcome-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.hero-brand-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.05;
  color: var(--burgundy);
  letter-spacing: 0.01em;
}

.hero-slider-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}
.hero-dot {
  width: 12px;
  height: 12px;
  border: 2px solid #bbb;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
}
.hero-dot.active,
.hero-dot:hover {
  background: #888;
  border-color: #888;
}

/* Features Bar (like reference) */
.features-bar {
  background: var(--burgundy);
  color: white;
}
.features-bar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  border-right: 1px solid rgba(255,255,255,0.15);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.3s;
}
.features-bar-item:last-child { border-right: none; }
.features-bar-item:hover { background: rgba(0,0,0,0.1); }
.features-bar-item svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  stroke-width: 1.5;
}

/* Parallax depth sections */
.parallax-float {
  will-change: transform;
  transition: transform 0.1s linear;
}

.welcome-section-parallax {
  position: relative;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Loading Screen */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring {
  width: 48px; height: 48px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--burgundy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Navigation */
#main-nav {
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}
#main-nav.scrolled {
  background: rgba(10, 10, 10, 0.95) !important;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}
.nav-link {
  position: relative;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--burgundy);
  transition: width var(--transition);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Mega Menu */
#site-header-wrap {
  overflow: visible;
}

.mega-menu-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-height, 120px);
  z-index: 45;
  background: white;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  border-top: 3px solid var(--burgundy);
  max-height: calc(100vh - var(--header-height, 120px));
  overflow-y: auto;
}

.mega-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.mega-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 1279px) {
  .mega-menu-panel {
    display: none !important;
  }
}
.mega-category:hover .mega-category-icon {
  transform: scale(1.1);
  background: var(--burgundy);
  color: white;
}
.mega-category-icon {
  transition: all var(--transition);
}

/* Buttons */
.btn-primary {
  background: var(--burgundy);
  color: white;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary:hover {
  background: var(--burgundy-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(122, 28, 46, 0.35);
}
.btn-primary .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

.btn-outline {
  border: 2px solid white;
  color: white;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-outline:hover {
  background: white;
  color: var(--burgundy);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--charcoal);
  color: white;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-secondary:hover {
  background: var(--burgundy);
  transform: translateY(-2px);
}

/* Hero */
.hero-section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,10,0.85) 0%, rgba(122,28,46,0.4) 50%, rgba(10,10,10,0.7) 100%);
}
.hero-shape {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}
.hero-gradient {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122,28,46,0.3) 0%, transparent 70%);
  animation: pulse-glow 4s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

/* Parallax */
.parallax-section {
  position: relative;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
.parallax-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,10,10,0.9), rgba(10,10,10,0.6));
}

/* Cards */
.card-premium {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
}
.card-premium:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Product Card */
.product-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.product-card .product-image {
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--light-grey);
}
.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-image img { transform: scale(1.08); }
.product-card .product-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--transition);
}
.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}
.product-action-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  color: var(--charcoal);
}
.product-action-btn:hover {
  background: var(--burgundy);
  color: white;
}
.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-new { background: var(--burgundy); color: white; }
.badge-sale { background: #EF4444; color: white; }
.badge-bestseller { background: var(--charcoal); color: white; }

/* Glassmorphism */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-zoom {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-zoom.visible { opacity: 1; transform: scale(1); }

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Counter */
.counter-value { font-variant-numeric: tabular-nums; }

/* Brand Carousel */
.brand-track {
  display: flex;
  animation: scroll-brands 30s linear infinite;
}
.brand-track:hover { animation-play-state: paused; }
@keyframes scroll-brands {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* FAQ Accordion */
.faq-item .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.active .faq-answer { max-height: 500px; }
.faq-item .faq-icon { transition: transform var(--transition); }
.faq-item.active .faq-icon { transform: rotate(180deg); }

/* Search Panel */
.search-panel {
  transform: translateY(-100%);
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
}
.search-panel.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s ease;
}
.mobile-menu.active { transform: translateX(0); }

/* Section Titles */
.section-label {
  color: var(--burgundy);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--charcoal);
}

/* Rating Stars */
.star-filled { color: #F59E0B; }
.star-empty { color: #D1D5DB; }

/* Breadcrumb */
.breadcrumb a { transition: color var(--transition); }
.breadcrumb a:hover { color: var(--burgundy); }

/* Form Styles */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid #E5E7EB;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  transition: all var(--transition);
  background: white;
}
.form-input:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(122, 28, 46, 0.1);
}
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

/* Footer */
.footer-link {
  color: #9CA3AF;
  transition: color var(--transition);
  font-size: 0.875rem;
}
.footer-link:hover { color: white; }

/* Pagination */
.page-btn {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition);
  border: 1.5px solid #E5E7EB;
  color: var(--charcoal);
}
.page-btn:hover, .page-btn.active {
  background: var(--burgundy);
  color: white;
  border-color: var(--burgundy);
}

/* Image Gallery Zoom */
.gallery-main { cursor: zoom-in; overflow: hidden; }
.gallery-main img { transition: transform 0.3s ease; }
.gallery-main:hover img { transform: scale(1.5); }
.gallery-thumb {
  border: 2px solid transparent;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--burgundy); }

/* Vehicle Search */
.vehicle-search-card {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

/* Grid/List Toggle */
.view-btn.active { background: var(--burgundy); color: white; }

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .parallax-section { background-attachment: scroll; }
}
@media (max-width: 768px) {
  .hero-section { min-height: 90vh; }
}
