/* ============================================================
   AUTOPARTS PRO THEME — Dedicated Self-Contained Stylesheet
   Design Language: Race Red, Asphalt Carbon, Caution Yellow, 4:3 Cards
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;0,800;1,700&family=Inter:wght@300;400;500;600;700&family=DM+Mono:wght@400;500;600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
  /* Brand Tokens */
  --brand-red: #CC1F1A;          /* Race Red */
  --brand-red-hover: #A61713;
  --brand-yellow: #F5A623;       /* Caution Warning Amber */
  --brand-dark: #111418;         /* Asphalt Black */
  --brand-slate: #1F242D;
  --brand-gunmetal: #4B5563;

  /* Semantic UI Colors */
  --color-bg: #F3F4F6;           /* Metal Workshop Grey Canvas */
  --color-surface: #FFFFFF;
  --color-surface-2: #E5E7EB;
  --color-text: #111418;
  --color-text-2: #4B5563;
  --color-text-3: #6B7280;
  --color-border: #D1D5DB;
  --color-border-strong: #9CA3AF;
  --color-emerald: #10B981;

  /* Typography */
  --font-display: 'Barlow', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Geometry */
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-card: 6px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.18);
  --shadow-hover: 0 8px 20px rgba(204, 31, 26, 0.22);

  --max-w: 1320px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-dark);
  letter-spacing: 0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary, .btn-red {
  background: var(--brand-red);
  color: #FFFFFF;
}

.btn-primary:hover, .btn-red:hover {
  background: var(--brand-red-hover);
  box-shadow: 0 4px 16px rgba(204, 31, 26, 0.35);
  transform: translateY(-1px);
}

.btn-yellow {
  background: var(--brand-yellow);
  color: var(--brand-dark);
}

.btn-yellow:hover {
  background: #E09618;
}

.btn-dark {
  background: var(--brand-dark);
  color: #FFFFFF;
}

.btn-dark:hover {
  background: #232931;
}

.btn-outline {
  border: 2px solid var(--brand-red);
  background: transparent;
  color: var(--brand-red);
}

.btn-outline:hover {
  background: var(--brand-red);
  color: #FFFFFF;
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.825rem;
}

.btn-lg {
  padding: 0.95rem 2.2rem;
  font-size: 1.05rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.badge-red { background: #FEE2E2; color: #CC1F1A; border: 1px solid #FCA5A5; }
.badge-yellow { background: #FEF3C7; color: #B45309; border: 1px solid #FCD34D; }
.badge-dark { background: var(--brand-dark); color: #FFFFFF; }
.badge-emerald { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }

/* Top Announcement Ticker */
.auto-ticker {
  background: #0B0E11;
  color: #E5E7EB;
  font-size: 0.8rem;
  padding: 0.5rem 0;
  text-align: center;
  border-bottom: 1px solid #1F242D;
  letter-spacing: 0.03em;
  font-family: var(--font-mono);
}

.auto-ticker strong {
  color: var(--brand-yellow);
}

/* Header */
.site-header {
  background: var(--brand-dark);
  color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--brand-red);
  box-shadow: var(--shadow-md);
}

.header-main {
  padding: 1.1rem 0;
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  color: #FFFFFF;
}

.brand-logo i {
  color: var(--brand-red);
}

.brand-logo span {
  color: var(--brand-red);
}

.search-bar-wrap {
  flex: 1;
  max-width: 540px;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  background: #1F242D;
  border: 1px solid #374151;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem 0.35rem 1.25rem;
  transition: var(--transition);
}

.search-form:focus-within {
  border-color: var(--brand-red);
  background: #111418;
  box-shadow: 0 0 0 3px rgba(204, 31, 26, 0.25);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  color: #FFFFFF;
}

.search-input::placeholder {
  color: #9CA3AF;
}

.search-btn {
  background: var(--brand-red);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #E5E7EB;
  font-size: 0.85rem;
  font-weight: 700;
  position: relative;
  transition: var(--transition);
}

.action-btn:hover {
  color: var(--brand-red);
}

.action-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--brand-red);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nav Bar */
.nav-bar {
  background: #181D24;
  border-top: 1px solid #28303C;
}

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

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

.nav-item a {
  display: block;
  padding: 0.75rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  color: #D1D5DB;
  letter-spacing: 0.03em;
  transition: var(--transition);
}

.nav-item a:hover,
.nav-item.active a {
  color: #FFFFFF;
  background: var(--brand-red);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #111418 0%, #1A202C 100%);
  color: #FFFFFF;
  padding: 5rem 0;
  border-bottom: 3px solid var(--brand-red);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1F242D;
  color: var(--brand-yellow);
  border: 1px solid #374151;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
}

.hero-title span {
  color: var(--brand-red);
}

.hero-desc {
  font-size: 1.05rem;
  color: #9CA3AF;
  line-height: 1.7;
  margin-bottom: 2.25rem;
  max-width: 560px;
}

.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  max-height: 440px;
  object-fit: cover;
  border: 1px solid #374151;
}

/* Vehicle Finder Widget Bar */
.vehicle-finder-box {
  background: #1F242D;
  border: 2px solid var(--brand-red);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  margin-top: -35px;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.vehicle-finder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 160px;
  gap: 1rem;
  align-items: flex-end;
}

.finder-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #111418;
  border: 1px solid #374151;
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  outline: none;
}

.finder-select:focus {
  border-color: var(--brand-red);
}

/* Medium & Material Filter Bar */
.spec-bar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.spec-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.spec-pill {
  padding: 0.45rem 1.1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--color-text-2);
  cursor: pointer;
  transition: var(--transition);
}

.spec-pill.active, .spec-pill:hover {
  background: var(--brand-red);
  color: #FFFFFF;
  border-color: var(--brand-red);
}

/* Categories Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.category-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 2.25rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  border-color: var(--brand-red);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.category-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: #FEE2E2;
  color: var(--brand-red);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

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

.category-name {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.category-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-3);
  font-weight: 600;
}

/* Product Cards (4:3 Landscape Ratio for Auto Parts & Engines) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.product-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}

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

.product-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #E5E7EB;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.product-badge-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.product-wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  color: var(--color-text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.product-wishlist-btn:hover,
.product-wishlist-btn.active {
  background: #FEE2E2;
  color: #CC1F1A;
  border-color: #FCA5A5;
}

.product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.oem-part-tag {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--brand-red);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--brand-dark);
  margin-bottom: 0.35rem;
}

.fitment-strip {
  font-size: 0.75rem;
  color: #065F46;
  background: #D1FAE5;
  border: 1px solid #A7F3D0;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.product-price-box {
  display: flex;
  flex-direction: column;
}

.price-current {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--brand-red);
}

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

.add-cart-btn {
  background: var(--brand-red);
  color: #FFFFFF;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  font-family: var(--font-display);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.add-cart-btn:hover {
  background: var(--brand-red-hover);
  box-shadow: 0 4px 12px rgba(204, 31, 26, 0.3);
}

/* Trust Strip */
.trust-strip {
  background: #FFFFFF;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 2.5rem 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.trust-icon {
  font-size: 1.75rem;
  color: var(--brand-red);
  flex-shrink: 0;
}

.trust-text h4 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.15rem;
}

.trust-text p {
  font-size: 0.8rem;
  color: var(--color-text-2);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

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

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-2);
  margin-top: 0.25rem;
}

/* Footer */
.site-footer {
  background: #0B0E11;
  color: #9CA3AF;
  margin-top: auto;
  padding-top: 4.5rem;
  border-top: 3px solid var(--brand-red);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.25fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col h5 {
  color: #FFFFFF;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #9CA3AF;
  font-size: 0.825rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--brand-yellow);
  padding-left: 4px;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  margin: 1rem 0 1.25rem;
}

.social-links {
  display: flex;
  gap: 0.65rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #1F242D;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.footer-newsletter p {
  font-size: 0.825rem;
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-input {
  flex: 1;
  background: #1F242D;
  border: 1px solid #374151;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: #FFF;
  outline: none;
  font-size: 0.825rem;
}

.newsletter-input:focus {
  border-color: var(--brand-yellow);
}

.footer-bottom {
  border-top: 1px solid #1F242D;
  padding: 1.5rem 0;
  font-size: 0.78rem;
}

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

/* Slide-out Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  width: 100%;
  max-width: min(440px, 100vw);
  height: 100vh;
  background: #FFFFFF;
  z-index: 999;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
}

.cart-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand-dark);
  color: #FFFFFF;
}

.drawer-close {
  color: #9CA3AF;
  font-size: 1.25rem;
}

.drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drawer-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.drawer-item-img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #E5E7EB;
}

.drawer-item-info {
  flex: 1;
}

.drawer-item-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 0.2rem;
}

.drawer-item-price {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--brand-red);
  margin-bottom: 0.4rem;
}

.drawer-qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: fit-content;
  background: var(--color-bg);
}

.drawer-qty-stepper button {
  padding: 0.15rem 0.5rem;
  font-weight: 700;
}

.drawer-qty-stepper span {
  padding: 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
  background: #F9FAFB;
}

.drawer-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--brand-red);
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--brand-dark);
  color: #FFFFFF;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.825rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-left: 4px solid var(--brand-red);
  animation: slideInToast 0.3s ease forwards;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Catalog Filter Layout */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.filter-sidebar {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  position: sticky;
  top: 85px;
}

.filter-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.filter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--color-text-2);
  cursor: pointer;
}

.filter-item input[type="checkbox"] {
  accent-color: var(--brand-red);
}

/* PDP Layout */
.pdp-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  align-items: start;
}

.pdp-gallery {
  position: static;
}

@media (min-width: 1025px) {
  .pdp-gallery {
    position: sticky;
    top: 85px;
  }
}

.pdp-main-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  object-fit: cover;
  margin-bottom: 1rem;
  background: #E5E7EB;
}

.pdp-thumb-row {
  display: flex;
  gap: 0.75rem;
}

.pdp-thumb {
  width: 85px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  cursor: pointer;
  object-fit: cover;
}

.pdp-thumb.active {
  border-color: var(--brand-red);
}

.pdp-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.pdp-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 1.25rem 0;
}

.pdp-price {
  font-size: 2.4rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--brand-red);
}

/* Technical Specs Table */
.auto-spec-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin: 1.5rem 0;
}

.auto-spec-table tr:nth-child(even) {
  background: #F9FAFB;
}

.auto-spec-table td {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--color-border);
}

.auto-spec-table td.spec-key {
  font-weight: 700;
  color: var(--color-text-2);
  width: 35%;
  font-family: var(--font-mono);
}

/* Forms & Tables */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--color-text-2);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--color-text);
  background: #FFFFFF;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(204, 31, 26, 0.12);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--color-surface-2);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: var(--font-display);
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-border);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM (AutoParts Gear Theme)
   Breakpoints:
   - Tablet & Small Laptops: <= 1024px
   - Mobile Landscape & Tablets: <= 768px
   - Mobile Portrait & Phablets: <= 640px
   - Small Mobile Phones: <= 520px / 390px
   ============================================================ */

/* Mobile & Tablet Overrides (max-width: 1024px) */
@media (max-width: 1024px) {
  /* Containers */
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Header Main */
  .header-main .container {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .brand-logo {
    font-size: 1.6rem;
  }

  .search-bar-wrap {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 0.25rem;
  }

  .header-actions {
    gap: 0.5rem;
    margin-left: auto;
  }

  /* Navigation Bar Touch Horizontal Scroll */
  .nav-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-bar::-webkit-scrollbar {
    display: none;
  }

  .nav-bar .container {
    width: max-content;
    min-width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    gap: 1rem;
  }

  .nav-links {
    flex-wrap: nowrap;
    gap: 0.25rem;
  }

  .nav-item a {
    white-space: nowrap;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
  }

  .nav-right-link {
    white-space: nowrap;
    padding-right: 0.5rem;
  }

  /* Hero Section */
  .hero-section {
    padding: 3rem 0;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-image-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
  }

  .hero-image {
    width: 100%;
    max-width: 480px;
    height: auto;
  }

  .hero-badge-float {
    position: static;
    margin: 1.25rem auto 0;
    max-width: 320px;
    width: 90%;
    justify-content: center;
  }

  /* Vehicle Finder */
  .vehicle-finder-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  /* Standard Grids */
  .trust-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2.5rem;
  }

  /* PDP Grid */
  .pdp-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem;
  }

  .pdp-gallery {
    position: static !important;
  }

  .catalog-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .filter-sidebar {
    position: static !important;
    margin-bottom: 1.5rem;
  }

  /* Neutralize Asymmetric Inline Grids on Tablet */
  div[style*="grid-template-columns:1.8fr 1fr"],
  div[style*="grid-template-columns: 1.8fr 1fr"],
  div[style*="grid-template-columns:1.2fr 1fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:260px 1fr"],
  div[style*="grid-template-columns: 260px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
  }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  /* Ticker Top Bar */
  .auto-ticker {
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
    line-height: 1.35;
  }

  /* Vehicle Finder Single Column */
  .vehicle-finder-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }

  /* Section Spacing */
  .section {
    padding: 2.5rem 0;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  /* Product & Repeat Grids */
  .product-grid,
  .product-grid[style*="grid-template-columns"],
  div[style*="grid-template-columns:repeat(4, 1fr)"],
  div[style*="grid-template-columns: repeat(4, 1fr)"],
  div[style*="grid-template-columns:repeat(3, 1fr)"],
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .category-grid,
  .category-grid[style*="grid-template-columns"],
  div.category-grid[style*="grid-template-columns"] {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* Promo Banner */
  .promo-banner {
    padding: 2rem 1.25rem;
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }

  /* Table Horizontal Scrolling */
  .data-table {
    min-width: 520px;
  }

  div:has(> .data-table),
  div:has(> * > .data-table) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem 0.65rem;
    font-size: 0.825rem;
  }

  /* Drawer Cart Responsive */
  .cart-drawer {
    max-width: 100vw;
  }
}

/* Mobile Screens (max-width: 640px) */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  /* PDP Responsive Details */
  .pdp-title {
    font-size: 1.6rem;
  }

  .pdp-price {
    font-size: 1.65rem;
  }

  .pdp-price-wrap {
    margin: 0.75rem 0;
    gap: 0.75rem;
  }

  .pdp-tabs {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .pdp-tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    scrollbar-width: none;
  }

  .pdp-tab-nav::-webkit-scrollbar {
    display: none;
  }

  .pdp-tab-btn {
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .pdp-tabs table.data-table {
    min-width: 100% !important;
  }

  .pdp-tabs table.data-table td:first-child {
    width: auto !important;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 700;
  }

  .pdp-tabs table.data-table td {
    padding: 0.65rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* Small Mobile Phones (max-width: 520px / 390px) */
@media (max-width: 520px) {
  /* Header Compact Icons */
  .action-btn span:not(.action-badge) {
    display: none;
  }

  .action-btn {
    padding: 0.5rem;
    min-width: 38px;
    height: 38px;
    justify-content: center;
    border-radius: 50%;
    background: #1F242D;
  }

  /* Hero Adjustments */
  .hero-title {
    font-size: 1.85rem;
    letter-spacing: -0.5px;
  }

  .hero-desc {
    font-size: 0.925rem;
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* Grids for Small Mobile */
  .trust-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .category-grid,
  .category-grid[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem;
  }

  .category-card {
    padding: 1.25rem 0.75rem;
  }

  .category-name {
    font-size: 0.875rem;
  }

  /* Product Card Footer */
  .product-body {
    padding: 0.85rem;
  }

  .product-title {
    font-size: 0.875rem;
  }

  .product-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .product-footer .add-cart-btn {
    width: 100%;
    justify-content: center;
    padding: 0.45rem 0.5rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .footer-bottom .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

