/*
Theme Name: Tony Parts
Theme URI: https://tonyparts.co.za
Author: Tony Parts Development
Author URI: https://tonyparts.co.za
Description: Professional WordPress theme for Tony Parts – online store for new & used car parts in South Africa. Mobile-first, WooCommerce-ready, secure checkout and nationwide delivery.
Version: 3.3.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tony-parts
Tags: e-commerce, custom-menu, featured-images, theme-options, translation-ready, block-styles, wide-blocks
*/

/* ==========================================================================
   CSS Custom Properties – Tony Parts Brand
   ========================================================================== */
:root {
  /* Tony Parts brand – deep navy + energetic orange */
  --tony-primary: #0B3D5C;
  --tony-primary-dark: #072A40;
  --tony-primary-light: #145A86;
  --tony-accent: #E85D04;
  --tony-accent-dark: #C44D03;
  --tony-dark: #0F172A;
  --tony-brown: #1E293B;
  --tony-gray-900: #1E293B;
  --tony-gray-700: #334155;
  --tony-gray-500: #64748B;
  --tony-gray-300: #CBD5E1;
  --tony-gray-100: #F1F5F9;
  --tony-white: #ffffff;
  --tony-success: #059669;
  --tony-warning: #D97706;

  /* Typography */
  --tony-font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tony-font-display: "Inter", system-ui, sans-serif;

  /* Spacing & layout */
  --tony-container: 1280px;
  --tony-radius: 6px;
  --tony-radius-lg: 12px;
  --tony-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --tony-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --tony-transition: 0.2s ease;

  /* Header heights */
  --tony-topbar-height: 40px;
  --tony-header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--tony-font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tony-gray-900);
  background-color: var(--tony-white);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--tony-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.75em;
  font-family: var(--tony-font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--tony-dark);
}

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--tony-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section {
  padding: 3.5rem 0;
}

.section-title {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--tony-gray-500);
  margin-bottom: 2rem;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */
.tony-topbar {
  background: var(--tony-dark);
  color: var(--tony-white);
  font-size: 0.8125rem;
  min-height: var(--tony-topbar-height);
  display: flex;
  align-items: center;
  padding: 0.35rem 0;
}

.tony-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tony-topbar a {
  color: var(--tony-white);
  opacity: 0.9;
}

.tony-topbar a:hover {
  opacity: 1;
  color: var(--tony-accent);
}

.tony-topbar-promo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.tony-topbar-promo > span:not(.badge) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tony-topbar-promo .badge {
  background: var(--tony-primary);
  color: white;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.tony-topbar-promo .topbar-cta {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  margin-left: 0.35rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.tony-topbar-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .tony-topbar-links {
    display: flex;
  }
}

/* ==========================================================================
   Footer promo strip (moved from header topbar)
   ========================================================================== */
.tony-footer-promo {
  background: var(--tony-dark);
  color: var(--tony-white);
  font-size: 0.875rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tony-footer-promo .container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
}

.tony-footer-promo__inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  width: 100%;
}

.tony-footer-promo__inner .badge {
  background: var(--tony-primary);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.tony-footer-promo__inner .promo-text {
  flex: 1;
  min-width: 0;
}

.tony-footer-promo__inner .topbar-cta {
  padding: 0.3rem 0.85rem;
  font-size: 0.8125rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.tony-footer-promo__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.8125rem;
}

.tony-footer-promo__links a {
  color: var(--tony-white);
  opacity: 0.9;
}

.tony-footer-promo__links a:hover {
  opacity: 1;
  color: var(--tony-accent);
}

.tony-footer-promo__links .sep {
  opacity: 0.35;
  user-select: none;
}

@media (min-width: 768px) {
  .tony-footer-promo .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .tony-footer-promo__inner {
    flex: 1;
    min-width: 0;
  }
}

/* ==========================================================================
   Header / Site Header
   ========================================================================== */
.site-header {
  background: var(--tony-white);
  border-bottom: 1px solid var(--tony-gray-300);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 64px;
  padding: 0.5rem 0;
}

@media (min-width: 768px) {
  .header-main {
    gap: 1.5rem;
    min-height: var(--tony-header-height);
    padding: 0.75rem 0;
  }
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
}

.site-logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--tony-dark);
  text-decoration: none;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--tony-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
  position: relative;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .logo-mark {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }
}

.logo-mark::after {
  content: "";
  display: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text .brand {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--tony-primary);
}

.logo-text .tag {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tony-gray-700);
}

@media (min-width: 480px) {
  .logo-text .brand {
    font-size: 1.2rem;
  }
  .logo-text .tag {
    font-size: 0.65rem;
  }
}

@media (min-width: 768px) {
  .logo-text .brand {
    font-size: 1.35rem;
  }
  .logo-text .tag {
    font-size: 0.7rem;
  }
}

/* Navigation */
.primary-nav {
  display: none;
}

@media (min-width: 992px) {
  .primary-nav {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
  }
}

.primary-nav ul,
.primary-nav .primary-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--tony-gray-900);
  border-radius: var(--tony-radius);
  transition: background var(--tony-transition), color var(--tony-transition);
  white-space: nowrap;
}

@media (min-width: 1100px) {
  .primary-nav a {
    padding: 0.5rem 0.9rem;
    font-size: 0.95rem;
  }
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  background: var(--tony-gray-100);
  color: var(--tony-primary);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .header-actions {
    gap: 0.5rem;
  }
}

.header-action {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem;
  min-width: 40px;
  min-height: 40px;
  justify-content: center;
  border-radius: var(--tony-radius);
  color: var(--tony-gray-900);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--tony-transition);
}

.header-action:hover {
  background: var(--tony-gray-100);
  color: var(--tony-primary);
}

.header-action .icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-count {
  background: var(--tony-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--tony-radius);
  color: var(--tony-dark);
}

.menu-toggle:hover {
  background: var(--tony-gray-100);
}

@media (min-width: 992px) {
  .menu-toggle {
    display: none;
  }
}

/* Search bar under header */
.header-search {
  background: var(--tony-gray-100);
  border-bottom: 1px solid var(--tony-gray-300);
  padding: 0.5rem 0;
}

@media (min-width: 768px) {
  .header-search {
    padding: 0.65rem 0;
  }
}

.search-form {
  display: flex;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--tony-gray-300);
  border-radius: var(--tony-radius);
  overflow: hidden;
  box-shadow: var(--tony-shadow);
}

.search-form input[type="search"] {
  flex: 1;
  border: none;
  padding: 0.65rem 0.85rem;
  outline: none;
  font-size: 0.9rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .search-form input[type="search"] {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
}

.search-form button {
  background: var(--tony-primary);
  color: white;
  padding: 0 0.9rem;
  font-weight: 600;
  transition: background var(--tony-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .search-form button {
    padding: 0 1.25rem;
  }
}

.search-form button:hover {
  background: var(--tony-primary-dark);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1f1f 50%, #1a1a1a 100%);
  color: white;
  padding: 4rem 0 5rem;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23A61E23' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  color: white;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero .lead {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Vehicle selector */
.vehicle-selector {
  background: white;
  border-radius: var(--tony-radius-lg);
  padding: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--tony-shadow-lg);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .vehicle-selector {
    grid-template-columns: repeat(4, 1fr) auto;
    align-items: end;
  }
}

.vehicle-selector label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tony-gray-500);
  margin-bottom: 0.35rem;
  text-align: left;
}

.vehicle-selector select,
.vehicle-selector input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--tony-gray-300);
  border-radius: var(--tony-radius);
  background: white;
  color: var(--tony-dark);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23444' d='M6 8.825L1.175 4 2.05 3.125 6 7.075 9.95 3.125 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.vehicle-selector .btn-search {
  background: var(--tony-primary);
  color: white;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--tony-radius);
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--tony-transition);
  white-space: nowrap;
}

.vehicle-selector .btn-search:hover {
  background: var(--tony-primary-dark);
}

/* ==========================================================================
   Feature Bar
   ========================================================================== */
.feature-bar {
  background: white;
  border-bottom: 1px solid var(--tony-gray-300);
  padding: 1.75rem 0;
}

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

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(166, 30, 35, 0.1);
  color: var(--tony-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.feature-text h3 {
  font-size: 0.95rem;
  margin: 0 0 0.15rem;
  color: var(--tony-dark);
}

.feature-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--tony-gray-500);
  line-height: 1.4;
}

/* ==========================================================================
   Sale / Product Cards
   ========================================================================== */
.sale-section {
  background: var(--tony-gray-100);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: white;
  border-radius: var(--tony-radius-lg);
  overflow: hidden;
  box-shadow: var(--tony-shadow);
  transition: transform var(--tony-transition), box-shadow var(--tony-transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tony-shadow-lg);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--tony-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  z-index: 2;
}

.product-image {
  aspect-ratio: 4/3;
  background: var(--tony-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tony-gray-500);
  font-size: 0.875rem;
}

.product-body {
  padding: 1rem 1.15rem 1.25rem;
}

.product-sku {
  font-size: 0.75rem;
  color: var(--tony-gray-500);
  margin-bottom: 0.25rem;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-title a {
  color: var(--tony-dark);
}

.product-title a:hover {
  color: var(--tony-primary);
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.price-current {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tony-primary);
}

.price-old {
  font-size: 0.9rem;
  color: var(--tony-gray-500);
  text-decoration: line-through;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--tony-radius);
  transition: all var(--tony-transition);
  text-align: center;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--tony-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--tony-primary-dark);
  color: white;
}

.btn-outline {
  background: transparent;
  border-color: var(--tony-primary);
  color: var(--tony-primary);
}

.btn-outline:hover {
  background: var(--tony-primary);
  color: white;
}

.btn-accent {
  background: var(--tony-accent);
  color: var(--tony-dark);
}

.btn-accent:hover {
  background: var(--tony-accent-dark);
  color: var(--tony-dark);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--tony-dark);
  color: #ccc;
  padding-top: 3.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.footer-brand .logo-text .brand {
  color: white;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  color: white;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1.1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #bbb;
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: #999;
}

.footer-bottom a {
  color: #999;
}

.footer-bottom a:hover {
  color: var(--tony-accent);
}

/* ==========================================================================
   Mobile Navigation Overlay
   ========================================================================== */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: white;
  padding: 1.5rem;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.mobile-nav.is-open .mobile-nav-panel {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.mobile-nav ul a {
  display: block;
  padding: 0.75rem 0;
  font-weight: 600;
  color: var(--tony-dark);
  border-bottom: 1px solid var(--tony-gray-100);
}

/* ==========================================================================
   Utility & Accessibility
   ========================================================================== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Hide text labels on small screens, show icons only */
.hide-mobile {
  display: none !important;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: inline !important;
  }
}

.text-center {
  text-align: center;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--tony-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   WordPress Core Adjustments
   ========================================================================== */
.alignwide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

.wp-block-image img {
  height: auto;
}

/* ==========================================================================
   Mobile Responsiveness – comprehensive
   ========================================================================== */

/* Container padding tighter on phones */
@media (max-width: 479px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Top bar: compact promo on very small screens */
@media (max-width: 575px) {
  .tony-topbar {
    font-size: 0.75rem;
  }

  .tony-topbar-promo .btn {
    display: none;
  }

  .tony-topbar-promo > span:not(.badge) {
    max-width: 180px;
  }
}

/* Header: prevent overflow & tighten spacing */
@media (max-width: 991px) {
  .header-main {
    flex-wrap: nowrap;
  }

  /* Hide secondary header actions on very small screens to free space */
  .header-actions .header-action[title="Wishlist"] {
    display: none;
  }
}

@media (min-width: 480px) and (max-width: 991px) {
  .header-actions .header-action[title="Wishlist"] {
    display: flex;
  }
}

/* Hero adjustments */
@media (max-width: 767px) {
  .hero {
    padding: 2.5rem 0 3rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero .lead {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .vehicle-selector {
    padding: 1rem;
    gap: 0.65rem;
  }

  .vehicle-selector .btn-search {
    width: 100%;
    height: 48px;
  }
}

/* Feature bar: stack nicely */
@media (max-width: 575px) {
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .feature-item {
    gap: 0.75rem;
  }
}

/* Product grid */
@media (max-width: 479px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Sections */
@media (max-width: 767px) {
  .section {
    padding: 2.25rem 0;
  }

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

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
}

/* Footer */
@media (max-width: 767px) {
  .site-footer {
    padding-top: 2.5rem;
  }

  .footer-grid {
    gap: 1.75rem;
  }

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

/* Mobile navigation polish */
.mobile-nav-panel {
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.mobile-nav-header .logo-text .brand {
  font-size: 1.15rem;
}

.mobile-nav ul {
  margin: 0;
  padding: 0;
}

.mobile-nav ul a {
  display: block;
  padding: 0.9rem 0;
  font-weight: 600;
  font-size: 1rem;
  color: var(--tony-dark);
  border-bottom: 1px solid var(--tony-gray-100);
}

.mobile-nav ul a:hover {
  color: var(--tony-primary);
}

.menu-close {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tony-radius);
  color: var(--tony-dark);
}

.menu-close:hover {
  background: var(--tony-gray-100);
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
  .tony-topbar .container,
  .header-main,
  .header-search .container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* Touch-friendly targets */
@media (pointer: coarse) {
  .header-action,
  .menu-toggle,
  .menu-close {
    min-width: 44px;
    min-height: 44px;
  }

  .primary-nav a {
    padding: 0.6rem 0.85rem;
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Parts archive search */
.parts-search-form {
  width: 100%;
}
.parts-search-form input[type="search"] {
  font-size: 1rem;
}
@media (max-width: 479px) {
  .parts-search-form button .hide-mobile {
    display: none !important;
  }
}

/* Keep inventory clean – end of stylesheet */
/* ==========================================================================
   Single Part template
   ========================================================================== */
.tony-single-part {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 768px) {
  .tony-single-part {
    grid-template-columns: 1fr 1fr;
  }
}
.tony-single-part__media {
  aspect-ratio: 4 / 3;
  background: var(--tony-gray-100);
  border-radius: var(--tony-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tony-single-part__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tony-single-part__placeholder {
  color: var(--tony-gray-500);
  font-size: 0.95rem;
}
.tony-single-part__details .product-sku {
  margin-bottom: 0.5rem;
}
.tony-single-part__details .entry-title {
  margin-bottom: 0.75rem;
}
.tony-single-part__price {
  margin-bottom: 1.25rem;
  font-size: 1.35rem;
}
.tony-single-part__meta {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--tony-gray-700);
}
.tony-single-part__meta li {
  margin-bottom: 0.4rem;
}
.tony-single-part__meta strong {
  color: var(--tony-dark);
  margin-right: 0.35rem;
}
.tony-single-part .entry-content {
  margin-bottom: 1.5rem;
}
.tony-single-part__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn.is-disabled,
.btn-outline.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}


/* Product images */
.product-image {
  position: relative;
  overflow: hidden;
  background: var(--tony-gray-100);
  aspect-ratio: 4 / 3;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.product-card:hover .product-image img {
  transform: scale(1.04);
}

/* ==========================================================================
   Parts archive filter bar
   ========================================================================== */
.parts-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 960px;
  margin: 0 auto 0.5rem;
  text-align: left;
}
.parts-filter-bar__search input[type="search"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--tony-gray-300);
  border-radius: var(--tony-radius);
  font-size: 1rem;
}
.parts-filter-bar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.parts-filter-bar__filters select {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--tony-gray-300);
  border-radius: var(--tony-radius);
  background: var(--tony-white);
  font-size: 0.95rem;
}
.parts-filter-bar__filters .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.parts-filter-bar__tip {
  font-size: 0.85rem;
  color: var(--tony-gray-500);
  margin: 0.35rem 0 0;
  text-align: center;
}
@media (min-width: 768px) {
  .parts-filter-bar {
    gap: 0.85rem;
  }
  .parts-filter-bar__filters select {
    flex: 1 1 160px;
  }
}

/* Branch stock on single part */
.tony-branch-stock {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--tony-gray-100);
  border-radius: var(--tony-radius);
  font-size: 0.95rem;
}
.tony-branch-stock ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}
.tony-branch-stock li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--tony-gray-300);
}
.tony-branch-stock li:last-child {
  border-bottom: 0;
}

/* Add to cart form */
.tony-add-to-cart-form {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tony-add-to-cart-form input[type="number"] {
  width: 4.5rem;
  padding: 0.55rem 0.5rem;
  border: 1px solid var(--tony-gray-300);
  border-radius: var(--tony-radius);
}

/* Order tracking */
.tony-tracking {
  max-width: 520px;
  margin: 0 auto;
}
.tony-tracking__form input[type="text"],
.tony-tracking__form input[type="email"] {
  width: 100%;
  max-width: 360px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--tony-gray-300);
  border-radius: var(--tony-radius);
}
.tony-tracking__result {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--tony-gray-100);
  border-radius: var(--tony-radius-lg);
}

/* Blog teaser */
.tony-blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .tony-blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.tony-blog-card {
  background: var(--tony-white);
  border: 1px solid var(--tony-gray-300);
  border-radius: var(--tony-radius-lg);
  overflow: hidden;
  box-shadow: var(--tony-shadow);
}
.tony-blog-card__image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.tony-blog-card__body {
  padding: 1rem 1.15rem 1.25rem;
}
.tony-blog-card__title {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}
.tony-blog-card__title a {
  color: var(--tony-dark);
}
.tony-blog-card__excerpt {
  font-size: 0.9rem;
  color: var(--tony-gray-700);
  margin: 0 0 0.75rem;
}
.tony-blog-card__link {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Tony Parts logo image */
.tony-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.tony-logo-img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}
@media (min-width: 768px) {
  .tony-logo-img {
    height: 50px;
    max-width: 240px;
  }
}
.tony-logo-img--mobile {
  height: 36px;
  max-width: 170px;
}
.site-header .custom-logo {
  height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

/* Online business trust strip */
.tony-trust-strip {
  background: var(--tony-primary);
  color: var(--tony-white);
  padding: 0.85rem 0;
}
.tony-trust-strip__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}
.tony-trust-strip__list li {
  position: relative;
}
@media (min-width: 768px) {
  .tony-trust-strip__list li:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: -0.9rem;
    opacity: 0.5;
  }
}

/* Sticky vehicle garage */
.tony-garage-bar {
  background: var(--tony-dark);
  color: var(--tony-white);
  font-size: 0.9rem;
  border-bottom: 2px solid var(--tony-accent);
}
.tony-garage-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.55rem 0;
}
.tony-garage-bar__vehicle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tony-garage-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tony-garage-bar__btn {
  color: var(--tony-white);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 0.35rem 0.75rem;
  border-radius: var(--tony-radius);
  font-weight: 600;
  font-size: 0.85rem;
}
.tony-garage-bar__btn:hover {
  color: var(--tony-accent);
  border-color: var(--tony-accent);
}
.tony-garage-bar__btn--primary {
  background: var(--tony-accent);
  border-color: var(--tony-accent);
  color: var(--tony-dark);
}
.tony-garage-bar__btn--primary:hover {
  color: var(--tony-dark);
  filter: brightness(1.05);
}

/* Fitment badges */
.tony-fit-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}
.tony-fit-badge--yes {
  background: #d1fae5;
  color: #065f46;
}
.tony-fit-badge--no {
  background: #fef3c7;
  color: #92400e;
}
.tony-fit-badge-wrap--single {
  margin-bottom: 0.75rem;
}

/* Breadcrumbs */
.tony-breadcrumbs {
  background: var(--tony-gray-100);
  border-bottom: 1px solid var(--tony-gray-300);
  font-size: 0.85rem;
  padding: 0.55rem 0;
}
.tony-breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}
.tony-breadcrumbs a {
  color: var(--tony-primary);
}
.tony-breadcrumbs__sep {
  opacity: 0.45;
}

/* Sort bar */
.tony-sort-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.tony-sort-bar__form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tony-sort-bar select {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--tony-gray-300);
  border-radius: var(--tony-radius);
}

/* How it works */
.tony-how__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .tony-how__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.tony-how__step {
  background: var(--tony-gray-100);
  border-radius: var(--tony-radius-lg);
  padding: 1.35rem 1.25rem;
  text-align: center;
}
.tony-how__num {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  background: var(--tony-primary);
  color: #fff;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 0.65rem;
}
.tony-how__step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}
.tony-how__step p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--tony-gray-700);
}

/* Buy confidence */
.tony-buy-confidence {
  margin-bottom: 1rem;
}
.tony-buy-confidence ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--tony-gray-700);
}
.tony-buy-confidence li::before {
  content: "✓ ";
  color: var(--tony-success);
  font-weight: 700;
}

/* ==========================================================================
   Alignment + mobile layout hard fixes (v3.3.2)
   ========================================================================== */

/* Consistent horizontal rhythm */
.container {
  width: 100%;
  max-width: var(--tony-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Header: true 3-column align */
.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 64px;
}
@media (min-width: 992px) {
  .header-main {
    grid-template-columns: minmax(140px, auto) 1fr minmax(140px, auto);
    min-height: var(--tony-header-height);
  }
}
.site-logo {
  justify-self: start;
}
.primary-nav {
  justify-self: center;
  min-width: 0;
}
.header-actions {
  justify-self: end;
}

/* Logo image never blows layout */
.tony-logo-img {
  height: 40px;
  width: auto;
  max-width: min(180px, 42vw);
}
@media (min-width: 768px) {
  .tony-logo-img {
    height: 48px;
    max-width: 220px;
  }
}

/* Topbar wrap cleanly */
.tony-topbar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}
.tony-topbar__promo {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .tony-topbar__promo {
    white-space: normal;
    font-size: 0.8rem;
    line-height: 1.35;
  }
}

/* Garage bar alignment */
.tony-garage-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
@media (max-width: 640px) {
  .tony-garage-bar__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .tony-garage-bar__actions {
    width: 100%;
  }
  .tony-garage-bar__btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* Vehicle selector grid */
.vehicle-selector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: end;
}
@media (min-width: 640px) {
  .vehicle-selector {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .vehicle-selector {
    grid-template-columns: repeat(4, 1fr) auto;
  }
}
.vehicle-selector label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--tony-gray-700);
}
.vehicle-selector select,
.vehicle-selector input {
  width: 100%;
  min-height: 44px;
}

/* Feature bar */
.feature-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 600px) {
  .feature-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .feature-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 100%;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}
@media (min-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}
@media (min-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}
.product-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--tony-gray-100);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.85rem 1rem 1rem;
  gap: 0.35rem;
}
.product-body .product-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
}
.product-body .btn {
  margin-top: auto;
}

/* Single part layout */
.tony-single-part {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 900px) {
  .tony-single-part {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 2rem;
  }
}
.tony-single-part__media img {
  width: 100%;
  height: auto;
  border-radius: var(--tony-radius-lg);
}

/* Filter bar */
.parts-filter-bar {
  width: 100%;
}
.parts-filter-bar__filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .parts-filter-bar__filters {
    grid-template-columns: repeat(2, 1fr) auto;
  }
}
@media (min-width: 900px) {
  .parts-filter-bar__filters {
    grid-template-columns: repeat(3, 1fr) auto;
  }
}
.parts-filter-bar__filters select,
.parts-filter-bar__search input {
  width: 100%;
  min-height: 44px;
}
.parts-filter-bar__filters .btn {
  min-height: 44px;
  width: 100%;
  justify-content: center;
}
@media (min-width: 640px) {
  .parts-filter-bar__filters .btn {
    width: auto;
  }
}

/* Footer columns */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

/* Section titles centered consistently */
.section-title,
.section-subtitle {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.section-subtitle {
  margin-bottom: 1.5rem;
}

/* Buttons – consistent touch targets */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  line-height: 1.2;
}

/* Mobile nav full-width alignment */
.mobile-navigation {
  z-index: 10000;
}
.mobile-nav-panel {
  max-width: 100%;
}
@media (min-width: 480px) {
  .mobile-nav-panel {
    max-width: 360px;
  }
}

/* Trust strip */
.tony-trust-strip__list {
  justify-content: center;
  text-align: center;
}

/* Prevent horizontal scroll from overflow */
html,
body {
  overflow-x: hidden;
}
img,
video,
iframe {
  max-width: 100%;
}

/* Blog / how grids already responsive – tighten mobile gaps */
.tony-how__grid,
.tony-blog-grid {
  gap: 1rem;
}
@media (max-width: 767px) {
  .section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .hero {
    padding: 1.75rem 0 2rem;
  }
  h1, .page-title {
    font-size: clamp(1.45rem, 5vw, 2rem);
  }
}

/* ==========================================================================
   Competitive UX polish – garage, cards, fitment, trust
   ========================================================================== */
.tony-garage-bar {
  background: var(--tony-primary-dark);
  color: var(--tony-white);
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 999;
}

.tony-garage-bar--active {
  background: linear-gradient(90deg, var(--tony-primary-dark) 0%, var(--tony-primary) 100%);
}

.tony-garage-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0;
}

.tony-garage-bar__vehicle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.tony-garage-bar__icon {
  display: inline-flex;
  color: var(--tony-accent);
  flex-shrink: 0;
}

.tony-garage-bar__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tony-garage-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.tony-garage-bar__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: var(--tony-radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--tony-white);
  font-size: 0.8125rem;
  font-weight: 600;
  background: transparent;
  transition: background var(--tony-transition), border-color var(--tony-transition), color var(--tony-transition);
}

.tony-garage-bar__btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--tony-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.tony-garage-bar__btn--primary {
  background: var(--tony-accent);
  border-color: var(--tony-accent);
  color: #fff;
}

.tony-garage-bar__btn--primary:hover {
  background: var(--tony-accent-dark);
  border-color: var(--tony-accent-dark);
  color: #fff;
}

.tony-garage-bar__btn--muted {
  opacity: 0.75;
  border-color: transparent;
}

.tony-garage-bar__btn--muted:hover {
  opacity: 1;
}

/* Fitment badges */
.tony-fit-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  line-height: 1.2;
}

.tony-fit-badge--yes {
  background: #d1fae5;
  color: #065f46;
}

.tony-fit-badge--no {
  background: #fef3c7;
  color: #92400e;
}

.tony-fit-badge-wrap {
  margin-bottom: 0.35rem;
}

.tony-fit-badge-wrap--single {
  margin-bottom: 0.6rem;
}

/* Product card enhancements */
.product-badge--sold {
  background: var(--tony-gray-500);
}

.product-badge--low {
  background: var(--tony-warning);
}

.product-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  margin: 0.35rem 0 0.5rem;
  color: var(--tony-gray-500);
}

.product-condition {
  font-weight: 600;
  color: var(--tony-primary);
}

.product-stock--in {
  color: var(--tony-success);
  font-weight: 600;
}

.product-stock--out {
  color: var(--tony-gray-500);
}

.product-card__cta {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tony-primary);
}

.product-card__cta:hover {
  color: var(--tony-accent);
}

.product-image__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  background: var(--tony-gray-100);
  color: var(--tony-gray-500);
  font-size: 0.875rem;
}

/* Trust strip */
.tony-trust-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1rem;
  font-size: 0.875rem;
  color: var(--tony-gray-700);
}

.tony-trust-strip li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.tony-trust-strip__icon {
  color: var(--tony-success);
  font-weight: 700;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .tony-trust-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Related */
.tony-related .section-subtitle {
  margin-top: -0.5rem;
  margin-bottom: 1.25rem;
  color: var(--tony-gray-500);
}

/* Single part actions */
.tony-single-part__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1.25rem;
}

.tony-add-to-cart-form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tony-add-to-cart-form input[type="number"] {
  width: 4rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--tony-gray-300);
  border-radius: var(--tony-radius);
}

.tony-qty-note {
  font-weight: 400;
  color: var(--tony-gray-500);
  font-size: 0.9em;
}

.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

/* Sticky header offset when garage is present */
.site-header {
  top: 0;
}

body:has(.tony-garage-bar) .site-header {
  /* garage is above header in body_open order; keep simple sticky stack */
}

@media (max-width: 640px) {
  .tony-garage-bar__label strong {
    display: none;
  }
  .tony-single-part__actions .btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}

/* ==========================================================================
   SEO fitment table (crawlable)
   ========================================================================== */
.tony-fitment-table {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  background: var(--tony-gray-100);
  border-radius: var(--tony-radius-lg);
  border: 1px solid var(--tony-gray-300);
}

.tony-fitment-table__title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--tony-dark);
}

.tony-fitment-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.tony-fitment-table th,
.tony-fitment-table td {
  text-align: left;
  padding: 0.4rem 0.5rem 0.4rem 0;
  border-bottom: 1px solid var(--tony-gray-300);
  vertical-align: top;
}

.tony-fitment-table th {
  width: 35%;
  color: var(--tony-gray-700);
  font-weight: 600;
}

.tony-fitment-table tr:last-child th,
.tony-fitment-table tr:last-child td {
  border-bottom: none;
}

.tony-fitment-table__note {
  margin: 0.65rem 0 0;
  font-size: 0.8125rem;
  color: var(--tony-gray-500);
}

/* ==========================================================================
   Checklist hardening – mobile filters & vehicle selector
   ========================================================================== */
@media (max-width: 767px) {
  .vehicle-selector {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.65rem;
  }
  .vehicle-selector > div:last-of-type,
  .vehicle-selector .btn-search {
    grid-column: 1 / -1;
  }
  .parts-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .parts-filter-bar__search input[type="search"] {
    width: 100%;
  }
  .parts-filter-bar__filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .parts-filter-bar__filters select,
  .parts-filter-bar__filters input {
    width: 100%;
    min-width: 0;
  }
  .parts-filter-bar__filters .btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
  .tony-single-part {
    grid-template-columns: 1fr !important;
  }
  .tony-footer-promo__inner {
    flex-direction: column;
    text-align: center;
  }
  .tony-footer-promo__links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Search autocomplete
   ========================================================================== */
.tony-ac {
  position: relative;
  display: block;
  width: 100%;
}

.tony-ac__list {
  position: absolute;
  z-index: 1000;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--tony-gray-300, #d1d5db);
  border-radius: var(--tony-radius, 6px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  max-height: 280px;
  overflow-y: auto;
}

.tony-ac__item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  line-height: 1.3;
}

.tony-ac__item:hover,
.tony-ac__item.is-active {
  background: var(--tony-gray-100, #f3f4f6);
}

.tony-ac__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tony-dark, #111827);
}

.tony-ac__meta {
  font-size: 0.75rem;
  color: var(--tony-gray-500, #6b7280);
}
