/* ============================================================
   CochesMallorca — Main Stylesheet
   Design tokens: #E01B27 (red accent), Sora + Instrument Sans
   ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: #E7E7E9;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #17181A;
}
h1, h2, h3, h4, h5 {
  font-family: 'Sora', sans-serif;
  margin: 0;
  letter-spacing: -0.02em;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
ul { list-style: none; padding: 0; margin: 0; }

/* ---- Hero Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hero-title {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.hero-search {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}
.hero-header {
  animation: fadeIn 0.6s ease 0.1s both;
}

/* ---- Micro-interacciones ---- */
.hover-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease !important;
}
.hover-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.08);
}
.hover-card:active {
  transform: translateY(-1px) scale(0.98);
}
.hover-lift {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.hover-lift:hover {
  transform: translateY(-2px);
}
.btn-press:active {
  transform: scale(0.96);
}

/* ---- Category Cards ---- */
.cat-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease !important;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.10);
}
.cat-card:active {
  transform: translateY(-1px) scale(0.97);
}
.cat-card.featured {
  background: linear-gradient(135deg, #E01B27 0%, #B0121F 100%);
  border-color: #E01B27 !important;
  color: #fff;
}
.cat-card.featured .cat-count,
.cat-card.featured .cat-arrow {
  color: rgba(255,255,255,0.75) !important;
}

/* ---- Dealer Cells ---- */
.dealer-cell {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dealer-cell:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.10);
}
.dealer-carousel {
  position: relative;
}
.dealer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dealer-cell.is-hidden {
  display: none !important;
}
.dealer-carousel-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.dealer-carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #E4E4E7;
  background: rgba(255,255,255,0.9);
  color: #17181A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.dealer-carousel-btn:hover {
  background: #E01B27;
  border-color: #E01B27;
  color: #fff;
}
.dealer-carousel-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.dealer-carousel-btn:disabled:hover {
  background: rgba(255,255,255,0.9);
  border-color: #E4E4E7;
  color: #17181A;
}
.dealer-carousel-status {
  min-width: 58px;
  text-align: center;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #6B6E73;
}

/* ---- Language Switcher ---- */
.language-switcher {
  position: relative;
}
.language-switcher-trigger {
  height: 42px;
  min-width: 82px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.language-switcher-trigger:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
}
.language-switcher-trigger[aria-expanded="true"] {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.32);
}
.language-current-code {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.language-chevron {
  opacity: 0.8;
  transition: transform 0.2s ease;
}
.language-switcher-trigger[aria-expanded="true"] .language-chevron {
  transform: rotate(180deg);
}
.language-switcher-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  background: rgba(23, 24, 26, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.24);
}
.language-option {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.language-option:hover {
  background: rgba(255,255,255,0.08);
}
.language-option.is-active {
  background: rgba(224,27,39,0.16);
  color: #fff;
}
.language-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14);
}
.language-flag-icon {
  font-size: 22px;
  line-height: 1;
}
.language-flag-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Catalog Sidebar ---- */
.catalog-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.catalog-sidebar {
  position: sticky;
  top: 112px;
}
.catalog-sidebar-card {
  padding: 22px 18px;
  border: 1px solid #ECECEE;
  border-radius: 24px;
  background: #17181A;
  color: #fff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.10);
}
.catalog-sidebar-header h3 {
  font-size: 24px;
  font-weight: 800;
}
.catalog-sidebar-kicker {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.56);
}
.catalog-sidebar-header p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
}
.catalog-sidebar-groups {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}
.catalog-sidebar-group {
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.catalog-sidebar-group:first-child {
  padding-top: 0;
  border-top: none;
}
.catalog-sidebar-brand {
  display: inline-block;
  margin-bottom: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.catalog-sidebar-brand.is-active {
  color: #FFD7DB;
}
.catalog-sidebar-models {
  display: grid;
  gap: 6px;
}
.catalog-sidebar-model {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  line-height: 1.35;
  transition: transform 0.2s ease, color 0.2s ease;
}
.catalog-sidebar-model:hover,
.catalog-sidebar-model.is-active {
  transform: translateX(3px);
  color: #fff;
}
.catalog-sidebar-model-arrow {
  color: rgba(255,255,255,0.38);
  font-size: 18px;
  line-height: 1;
}
.catalog-results {
  min-width: 0;
}
.catalog-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.catalog-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFF7F7;
  border: 1px solid #E01B27;
  color: #E01B27;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 100px;
}

/* ---- Search Bar ---- */
.search-wrap {
  position: relative;
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
  color: #B5B7BB;
}
.search-input {
  width: 100%;
  height: 60px;
  padding: 0 4px 0 50px;
  border: 1px solid rgba(255,255,255,0.25);
  border-right: none;
  border-radius: 16px 0 0 16px;
  font-size: 15px;
  font-family: 'Instrument Sans', sans-serif;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  color: #17181A;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.search-input:focus {
  outline: none;
  background: rgba(255,255,255,0.96);
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}
.search-input::placeholder {
  color: #B5B7BB !important;
  opacity: 0.8 !important;
}
.search-btn {
  height: 60px;
  width: 60px;
  padding: 0;
  border: none;
  border-radius: 0 16px 16px 0;
  background: #E01B27;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(224,27,39,0.30);
  transition: background 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.search-btn:hover {
  background: #B0121F;
}
.search-btn:active {
  transform: scale(0.96);
}
.search-btn svg {
  transition: transform 0.2s ease;
}
.search-btn:hover svg {
  transform: translateX(2px);
}

/* ---- Filter Pills ---- */
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  background: #fff;
  border: 1px solid #E4E4E7;
  color: #52555A;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.filter-pill:hover {
  border-color: #E01B27;
  color: #E01B27;
}
.filter-pill.active {
  background: #17181A;
  color: #fff;
  border-color: #17181A;
}

/* ---- Car Card ---- */
.car-card {
  border: 1px solid #ECECEE;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.car-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.12);
}
.car-card:active {
  transform: translateY(-1px) scale(0.98);
}
.car-card-img {
  position: relative;
  height: 180px;
  background: repeating-linear-gradient(135deg, #EDEDEE 0 10px, #F5F5F6 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.car-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.car-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #17181A;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
}
.car-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E01B27;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: background 0.2s ease;
}
.car-fav:hover {
  background: #E01B27;
  color: #fff;
}
.car-card-body {
  padding: 14px 16px 16px;
}
.car-card-name {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 16px;
}
.car-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0 14px;
}
.car-spec {
  background: #F4F4F5;
  color: #52555A;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 6px;
}
.car-price-area {
  padding-top: 13px;
  border-top: 1px solid #F0F0F1;
}
.car-price {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 23px;
  color: #E01B27;
  white-space: nowrap;
}
.car-price-label {
  font-size: 12px;
  color: #93969B;
  font-weight: 500;
}
.car-finance {
  font-size: 13px;
  color: #6B6E73;
  margin-top: 3px;
}
.car-finance strong {
  color: #17181A;
  font-weight: 600;
}

/* ---- Logo Carousel ---- */
.logo-carousel-wrap { position: relative; }
.logo-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0 12px;
}
.logo-carousel::-webkit-scrollbar { display: none; }
.logo-cell {
  flex: 0 0 auto;
  width: 170px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 14px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.logo-cell:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}
.logo-img {
  max-width: 80%;
  max-height: 70%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.3s ease;
}
.logo-cell:hover .logo-img {
  opacity: 0.85;
}
.carousel-fade-left,
.carousel-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  pointer-events: none;
  z-index: 2;
}
.carousel-fade-left {
  left: 0;
  background: linear-gradient(to right, #E7E7E9 0%, transparent 100%);
}
.carousel-fade-right {
  right: 0;
  background: linear-gradient(to left, #E7E7E9 0%, transparent 100%);
}

/* ---- Quick Access Cards ---- */
.quick-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid #ECECEE;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.quick-card:hover {
  border-color: #E01B27;
  background: #FFF7F7;
}
.quick-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: #FDECEC;
  color: #E01B27;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.quick-card-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.quick-card-sub {
  font-size: 13px;
  color: #6B6E73;
  margin-top: 2px;
}

/* ---- Section Header ---- */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 {
  font-size: 26px;
  font-weight: 700;
}
.section-link {
  font-size: 14px;
  font-weight: 600;
  color: #E01B27;
  transition: opacity 0.2s ease;
}
.section-link:hover {
  opacity: 0.8;
}

/* ---- Newsletter ---- */
.newsletter-section {
  margin: 52px 10% 0;
  padding: 34px 40px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(248,248,250,0.98) 100%);
  border: 1px solid #ECECEE;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.05);
}
.newsletter-copy {
  max-width: 480px;
}
.newsletter-title {
  font-weight: 800;
  font-size: 26px;
  color: #17181A;
}
.newsletter-text {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.65;
  color: #52555A;
}
.newsletter-note {
  margin-top: 12px;
  font-size: 13px;
  color: #93969B;
}
.newsletter-form {
  min-width: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
}
.newsletter-input {
  height: 50px;
  padding: 0 16px;
  border: 1.5px solid #E4E4E7;
  border-radius: 14px;
  font-size: 14px;
  font-family: 'Instrument Sans', sans-serif;
  background: #fff;
}
.newsletter-input-interest {
  grid-column: 1 / -1;
}
.newsletter-input-email {
  width: 100%;
}
.newsletter-input:focus {
  outline: none;
  border-color: #E01B27 !important;
  box-shadow: 0 0 0 3px rgba(224,27,39,0.15);
}
.newsletter-btn {
  height: 50px;
  padding: 0 22px;
  background: #E01B27;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.newsletter-btn:hover {
  background: #B0121F;
}

/* ---- Footer ---- */
.footer {
  margin-top: 52px;
  background: #17181A;
  color: rgba(255,255,255,0.72);
  padding: 48px 10% 0;
}
.footer-brands-section,
.footer-features-section {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-features-section:last-of-type {
  margin-bottom: 0;
}
.footer-features-menu {
  padding: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 24px;
}
.footer-features-menu[hidden] {
  display: none !important;
}
.footer-features-group {
  min-width: 0;
}
.footer-features-title {
  margin: 0 0 8px;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.footer-features-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.footer-features-items .footer-link {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}
.footer-features-items .footer-link:hover {
  color: #fff;
}
.footer-columns {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 32px;
}
.footer-brand {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  color: #fff;
  margin-bottom: 12px;
}
.footer-brand strong {
  font-weight: 800;
}
.footer-brand span {
  font-weight: 500;
}
.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 16px;
}
.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.footer-social-icon:hover {
  background: rgba(255,255,255,0.15);
}
.footer-links {
  display: flex;
  gap: 56px;
  font-size: 14px;
  flex-wrap: wrap;
}
.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links-col span:first-child {
  color: #fff;
  font-weight: 600;
}
.footer-brands {
  position: relative;
}
.footer-brands-trigger {
  padding: 0;
  border: none;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.footer-brands-trigger svg {
  color: rgba(255,255,255,0.6);
  transition: transform 0.2s ease;
}
.footer-brands-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.footer-brands-menu {
  padding: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 24px;
  max-height: 400px;
  overflow-y: auto;
}
.footer-brands-menu[hidden] {
  display: none !important;
}
.footer-brands-group {
  min-width: 0;
}
.footer-brands-title {
  display: inline-block;
  margin-bottom: 4px;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.footer-brands-models {
  display: grid;
  gap: 2px;
}
.footer-brands-models .footer-link {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}
.footer-link {
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: #fff;
}
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* ---- Detail Page ---- */
.detail-main-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 14px;
  background: repeating-linear-gradient(135deg, #EDEDEE 0 10px, #F5F5F6 10px 20px);
}
.detail-gallery {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}
.detail-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}
.detail-thumb:hover,
.detail-thumb.active {
  opacity: 1;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.spec-label {
  font-size: 12px;
  color: #93969B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.spec-value {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 15px;
}

/* ---- Header ---- */
.hero-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  color: #fff;
  padding: 0 10%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(107,0,12,0.85) 0%, rgba(180,0,6,0.7) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-header-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-header-tag {
  font-size: 10px;
  opacity: 0.65;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.hero-header-actions {
  display: flex;
  align-items: center;
  gap: 32px;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}
.header-nav a {
  color: #fff;
  transition: opacity 0.2s;
}
.header-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.header-menu-toggle:hover,
.header-menu-toggle[aria-expanded="true"] {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.32);
}
.header-menu-toggle span,
.header-menu-toggle span::before,
.header-menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.header-menu-toggle span { position: relative; }
.header-menu-toggle span::before,
.header-menu-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
}
.header-menu-toggle span::before { top: -7px; }
.header-menu-toggle span::after { top: 7px; }
.header-menu-toggle[aria-expanded="true"] span { background: transparent; }
.header-menu-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.header-menu-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---- Detail Layout ---- */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: start;
}
.detail-side {
  position: sticky;
  top: 110px;
}

/* ---- Dealer Detail Layout ---- */
.dealer-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}
.dealer-detail-side {
  position: sticky;
  top: 110px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,20,22,0.65) 0%, rgba(20,20,22,0.35) 40%, rgba(20,20,22,0.45) 100%);
}
.hero-inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 40px 60px;
}
.hero-title-text {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}

/* ---- Utilities ---- */
.px-10 { padding-left: 10%; padding-right: 10%; }
.py-section { padding-top: 44px; padding-bottom: 44px; }
.py-section-lg { padding-top: 52px; padding-bottom: 52px; }
.text-red { color: #E01B27; }
.bg-red { background: #E01B27; }
.text-muted { color: #93969B; }
.text-secondary { color: #6B6E73; }
.font-sora { font-family: 'Sora', sans-serif; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ---- Category Carousel ---- */
.cat-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-carousel {
  display: flex;
  gap: 16px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 0;
  flex: 1;
}
.cat-carousel::-webkit-scrollbar { display: none; }
.cat-carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #E4E4E7;
  background: #fff;
  color: #52555A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.cat-carousel-btn:hover {
  background: #E01B27;
  color: #fff;
  border-color: #E01B27;
}
.cat-carousel-btn:active {
  transform: scale(0.95);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .newsletter-section { margin: 52px 5% 0; flex-direction: column; text-align: center; }
  .newsletter-copy { max-width: 100%; }
  .newsletter-form { min-width: 100%; width: 100%; max-width: 680px; }
  .newsletter-input { width: 100%; }
  .footer { padding: 48px 5% 32px; }
  .dealer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-shell { grid-template-columns: 1fr; }
  .catalog-sidebar { position: static; }
  .footer-features-menu { grid-template-columns: repeat(2, 1fr); }
  .footer-brands-menu { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .dealer-detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .dealer-detail-side { position: static; }
}
@media (max-width: 768px) {
  /* Header → mobile menu */
  .hero-header { padding: 0 5%; height: 64px; }
  .hero-header-tag { display: none; }
  .hero-header-actions { gap: 14px; }
  .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 5%;
    background: linear-gradient(180deg, rgba(107,0,12,0.98) 0%, rgba(180,0,6,0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.28);
    display: none;
  }
  .header-nav.is-open { display: flex; }
  .header-nav a {
    padding: 14px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    opacity: 1 !important;
  }
  .header-nav a:last-child { border-bottom: none; }
  .header-menu-toggle { display: inline-flex; }

  /* Grids */
  .grid-4 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .px-10 { padding-left: 5%; padding-right: 5%; }

  /* Hero */
  .hero-inner { padding: 90px 20px 36px; }
  .hero-title-text { font-size: 28px !important; }
  .hero-title { font-size: 28px !important; }

  /* Search bar compact */
  .search-input { height: 52px; padding-left: 46px; }
  .search-btn { height: 52px; width: 52px; }
  .search-icon { left: 14px; }

  /* Spec & dealer */
  .spec-grid { grid-template-columns: 1fr; }
  .dealer-grid { grid-template-columns: 1fr; }
  .dealer-carousel-controls { width: 100%; justify-content: space-between; }

  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Newsletter */
  .newsletter-section { padding: 28px 22px; }
  .newsletter-form { grid-template-columns: 1fr; }
  .newsletter-title { font-size: 22px; }

  /* Footer */
  .footer { padding: 40px 5% 28px; }
  .footer-features-menu { grid-template-columns: 1fr; }
  .footer-brands-menu { grid-template-columns: 1fr; }
  .footer-columns { flex-direction: column; gap: 28px; }
  .footer-links { gap: 28px; }

  /* Language menu */
  .language-switcher-menu {
    right: auto;
    left: 0;
  }

  /* Detail page */
  .detail-main-img { height: 240px; }

  /* Dealer detail header */
  .dealer-detail-header { flex-direction: row; }

  /* Catalog active filters */
  .catalog-active-filters { gap: 6px; }
}
@media (max-width: 480px) {
  .grid-5 { grid-template-columns: 1fr; }
  .hero-title-text { font-size: 24px !important; }
  .hero-title { font-size: 24px !important; }
  .hero-inner { padding: 84px 16px 28px; }
  .px-10 { padding-left: 4%; padding-right: 4%; }
  .newsletter-section { margin: 40px 4% 0; padding: 24px 18px; }
  .footer { padding: 36px 5% 24px; }
  .car-card-img { height: 160px; }
}
