/* ============================================================
   GLOBAL.CSS — AutoPerf Store
   Header, Footer, Navigation, Mega Menu, Overlay
   ============================================================ */

/* ============================================================
   HEADER
   ============================================================ */
.ap-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--ap-header-h);
  background: rgba(7, 11, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--ap-border);
  transition: var(--ap-t);
}
.ap-header.scrolled {
  background: rgba(7, 11, 18, 0.98);
  border-bottom-color: var(--ap-border-red);
}

.ap-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

/* LOGO */
.ap-logo { display: inline-flex; align-items: center; text-decoration: none; }
.ap-logo__text {
  font-family: var(--ap-f-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ap-text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ap-logo__text span { color: var(--ap-red); }
.ap-logo img { height: 44px; width: auto; }

/* NAV DESKTOP */
.ap-nav { display: none; }
@media (min-width: 1100px) {
  .ap-nav { display: flex; align-items: center; }
}
.ap-nav__list {
  display: flex;
  list-style: none;
  gap: 2px;
  align-items: center;
}
.ap-nav__item { position: relative; }
.ap-nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-family: var(--ap-f-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ap-text-2);
  border-radius: var(--ap-r-md);
  transition: var(--ap-t);
  white-space: nowrap;
}
.ap-nav__link:hover,
.ap-nav__item--mega:hover > .ap-nav__link,
.ap-nav__link--active {
  color: var(--ap-text);
  background: rgba(255,255,255,0.06);
}
.ap-nav__link--accent { color: var(--ap-red) !important; }
.ap-nav__link--accent:hover { background: var(--ap-red-glow) !important; }
.ap-nav__chevron { transition: transform 0.2s ease; }
.ap-nav__item--mega:hover > .ap-nav__link .ap-nav__chevron { transform: rotate(180deg); }

/* ============================================================
   MEGA MENU
   ============================================================ */
.ap-megamenu {
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 680px;
  background: var(--ap-bg-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-r-xl);
  box-shadow: var(--ap-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: var(--z-dropdown);
}
.ap-nav__item--mega:hover .ap-megamenu,
.ap-nav__item--mega:focus-within .ap-megamenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.ap-megamenu__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 28px;
  gap: 24px;
}
.ap-megamenu__heading {
  font-family: var(--ap-f-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ap-red);
  margin-bottom: 12px;
}
.ap-megamenu__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ap-megamenu__links li a {
  display: block;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--ap-text-2);
  border-radius: var(--ap-r-sm);
  transition: var(--ap-t);
}
.ap-megamenu__links li a:hover {
  color: var(--ap-text);
  background: rgba(255,255,255,0.05);
  padding-left: 14px;
}
.ap-megamenu__links--brands li a {
  font-weight: 600;
  color: var(--ap-text);
}
.ap-megamenu__col--highlight { border-left: 1px solid var(--ap-border); padding-left: 24px; }
.ap-megamenu__guide-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--ap-red-glow);
  border: 1px solid var(--ap-border-red);
  border-radius: var(--ap-r-lg);
  text-decoration: none;
  transition: var(--ap-t2);
}
.ap-megamenu__guide-card span {
  font-family: var(--ap-f-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--ap-text);
  line-height: 1.4;
}
.ap-megamenu__guide-card small {
  font-size: 12px;
  color: var(--ap-red);
  font-weight: 600;
}
.ap-megamenu__guide-card:hover {
  background: rgba(239,68,68,0.22);
  transform: translateY(-2px);
}

/* ============================================================
   ACTIONS HEADER
   ============================================================ */
.ap-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ap-header__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ap-r-md);
  background: transparent;
  border: none;
  color: var(--ap-text-2);
  cursor: pointer;
  transition: var(--ap-t);
  position: relative;
}
.ap-header__action:hover {
  color: var(--ap-text);
  background: rgba(255,255,255,0.06);
}
.ap-header__cart { position: relative; }
.ap-cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--ap-bg-surface);
  border: 1px solid var(--ap-border);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--ap-f-mono);
  color: var(--ap-text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--ap-t);
}
.ap-cart-count--has-items {
  background: var(--ap-red);
  border-color: var(--ap-red);
  color: #fff;
}

/* Hamburger */
.ap-nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.ap-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ap-text-2);
  border-radius: 2px;
  transition: var(--ap-t2);
}
.ap-nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ap-nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ap-nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1100px) { .ap-nav-toggle { display: none; } }

/* ============================================================
   OVERLAY FOND
   ============================================================ */
.ap-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: var(--ap-t2);
}
.ap-overlay.visible { opacity: 1; visibility: visible; }

/* ============================================================
   OVERLAY RECHERCHE
   ============================================================ */
.ap-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-modal);
  background: rgba(7, 11, 18, 0.97);
  backdrop-filter: blur(24px);
  padding: 80px 24px 40px;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.35s ease, visibility 0.35s;
}
.ap-search-overlay.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.ap-search-overlay__inner { max-width: 700px; margin: 0 auto; }
.ap-search-form {
  display: flex;
  gap: 0;
  background: var(--ap-bg-input);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-r-xl);
  overflow: hidden;
  transition: var(--ap-t);
}
.ap-search-form:focus-within { border-color: var(--ap-red); }
.ap-search-form__input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 18px 20px;
  font-size: 18px;
  color: var(--ap-text);
  outline: none;
  min-height: 60px;
}
.ap-search-form__input::placeholder { color: var(--ap-text-3); }
.ap-search-form__btn {
  background: transparent;
  border: none;
  padding: 0 20px;
  color: var(--ap-text-2);
  cursor: pointer;
  transition: var(--ap-t);
}
.ap-search-form__btn:hover { color: var(--ap-red); }
.ap-search-overlay__results {
  margin-top: 16px;
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-r-lg);
  overflow: hidden;
}
.ap-search-overlay__results:empty { display: none; }
.ap-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ap-border);
  text-decoration: none;
  transition: var(--ap-t);
}
.ap-search-result-item:last-child { border-bottom: none; }
.ap-search-result-item:hover { background: rgba(255,255,255,0.04); }
.ap-search-result-item img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--ap-r-sm); }
.ap-search-result-item__name { font-weight: 600; color: var(--ap-text); font-size: 14px; }
.ap-search-result-item__price { color: var(--ap-red); font-family: var(--ap-f-mono); font-size: 14px; }
.ap-search-overlay__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--ap-border);
  border-radius: 50%;
  color: var(--ap-text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--ap-t);
}
.ap-search-overlay__close:hover { border-color: var(--ap-red); color: var(--ap-red); }

/* ============================================================
   MENU MOBILE
   ============================================================ */
.ap-nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--ap-bg-surface);
  border-right: 1px solid var(--ap-border);
  z-index: var(--z-modal);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), visibility 0.35s;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.ap-nav-mobile.open {
  transform: translateX(0);
  visibility: visible;
}
.ap-nav-mobile__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ap-border);
}
.ap-nav-mobile__close {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--ap-border);
  border-radius: 50%;
  color: var(--ap-text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ap-nav-mobile__list {
  list-style: none;
  padding: 16px 0;
  flex: 1;
}
.ap-nav-mobile__list li a {
  display: block;
  padding: 14px 20px;
  font-family: var(--ap-f-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--ap-text-2);
  border-bottom: 1px solid var(--ap-border);
  transition: var(--ap-t);
}
.ap-nav-mobile__list li a:hover,
.ap-nav-mobile__list li a:focus { color: var(--ap-text); background: rgba(255,255,255,0.04); padding-left: 28px; }
.ap-nav-mobile__accent { color: var(--ap-red) !important; }
.ap-nav-mobile__footer { padding: 20px; border-top: 1px solid var(--ap-border); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.ap-breadcrumb { margin-bottom: 24px; }
.ap-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  gap: 4px;
}
.ap-breadcrumb__item a { font-size: 13px; color: var(--ap-text-3); transition: var(--ap-t); }
.ap-breadcrumb__item a:hover { color: var(--ap-red); }
.ap-breadcrumb__item span { font-size: 13px; color: var(--ap-text-2); }
.ap-breadcrumb__sep { font-size: 13px; color: var(--ap-text-3); }

/* ============================================================
   FOOTER
   ============================================================ */
.ap-footer {
  border-top: 1px solid var(--ap-border);
  margin-top: auto;
}

/* Newsletter */
.ap-footer__newsletter {
  background: linear-gradient(135deg, var(--ap-bg-elevated) 0%, var(--ap-bg-surface) 100%);
  border-bottom: 1px solid var(--ap-border);
  padding: 60px 0;
}
.ap-footer__newsletter-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.ap-footer__newsletter-text { max-width: 400px; }
.ap-footer__newsletter-title {
  font-family: var(--ap-f-heading);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--ap-text);
  margin-bottom: 8px;
}
.ap-footer__newsletter-text p { margin-bottom: 0; max-width: none; }
.ap-newsletter-form { width: 100%; max-width: 460px; }
.ap-newsletter-form__row {
  display: flex;
  gap: 8px;
}
.ap-newsletter-form__row input {
  flex: 1;
  background: var(--ap-bg-input);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-r-md);
  color: var(--ap-text);
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  transition: var(--ap-t);
}
.ap-newsletter-form__row input:focus { border-color: var(--ap-red); }
.ap-newsletter-form__note { margin-top: 8px; font-size: 12px; color: var(--ap-text-3); }

/* Main footer */
.ap-footer__main { background: var(--ap-bg-surface); padding: 60px 0 40px; }
.ap-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}
.ap-footer__col--brand { grid-column: span 1; }
.ap-footer__logo { margin-bottom: 16px; display: inline-block; }
.ap-footer__tagline { font-size: 14px; color: var(--ap-text-3); margin-bottom: 20px; max-width: none; }
.ap-footer__social { display: flex; gap: 8px; }
.ap-footer__social-link {
  width: 36px;
  height: 36px;
  border: 1px solid var(--ap-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ap-text-3);
  transition: var(--ap-t);
}
.ap-footer__social-link:hover { border-color: var(--ap-red); color: var(--ap-red); }
.ap-footer__col-title {
  font-family: var(--ap-f-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ap-text);
  margin-bottom: 16px;
}
.ap-footer__links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ap-footer__links li a {
  font-size: 14px;
  color: var(--ap-text-3);
  transition: var(--ap-t);
}
.ap-footer__links li a:hover { color: var(--ap-red); padding-left: 4px; }

/* Bottom bar */
.ap-footer__bottom {
  background: var(--ap-bg-deep);
  border-top: 1px solid var(--ap-border);
  padding: 16px 0;
}
.ap-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ap-footer__copy { font-size: 13px; color: var(--ap-text-3); margin-bottom: 0; max-width: none; }
.ap-footer__payments { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-footer__payment-item {
  padding: 4px 10px;
  background: var(--ap-bg-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-r-sm);
  font-size: 11px;
  font-weight: 700;
  color: var(--ap-text-2);
  font-family: var(--ap-f-heading);
}
.ap-footer__payment-separator { color: var(--ap-border); }
.ap-footer__payment-ssl {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ap-green);
  font-weight: 600;
}

/* ============================================================
   HOMEPAGE — HERO
   ============================================================ */
.ap-hero {
  position: relative;
  height: clamp(500px, 75vh, 800px);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ap-hero__video,
.ap-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ap-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(7,11,18,0.85) 0%,
    rgba(7,11,18,0.55) 60%,
    rgba(7,11,18,0.30) 100%
  );
}
.ap-hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.ap-hero__eyebrow {
  display: inline-block;
  font-family: var(--ap-f-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ap-red);
  margin-bottom: 16px;
  padding: 4px 12px;
  border: 1px solid var(--ap-border-red);
  border-radius: var(--ap-r-sm);
  background: var(--ap-red-glow);
}
.ap-hero__title {
  font-family: var(--ap-f-display);
  font-size: clamp(32px, 6vw, 72px);
  font-weight: 700;
  color: var(--ap-text);
  text-transform: uppercase;
  line-height: 1.0;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.ap-hero__title em { color: var(--ap-red); font-style: normal; }
.ap-hero__subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--ap-text-2);
  max-width: 500px;
  margin-bottom: 32px;
  line-height: 1.6;
}
.ap-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ap-hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ap-text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: bounce 2s ease infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   HOMEPAGE — CATÉGORIES GRID
   ============================================================ */
.ap-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.ap-cat-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--ap-r-lg);
  border: 1px solid var(--ap-border);
  background: var(--ap-bg-card);
  text-decoration: none;
  display: block;
  transition: var(--ap-t2);
}
.ap-cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.ap-cat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,11,18,0.85) 0%, rgba(7,11,18,0.2) 60%);
  transition: var(--ap-t);
}
.ap-cat-card:hover { border-color: var(--ap-border-red); transform: translateY(-4px); box-shadow: var(--ap-shadow-red); }
.ap-cat-card:hover img { transform: scale(1.05); }
.ap-cat-card__body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 1;
}
.ap-cat-card__title {
  font-family: var(--ap-f-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--ap-text);
  margin-bottom: 4px;
}
.ap-cat-card__count {
  font-size: 12px;
  color: var(--ap-text-2);
  font-family: var(--ap-f-mono);
}
.ap-cat-card__arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 32px;
  height: 32px;
  background: var(--ap-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--ap-t2);
}
.ap-cat-card:hover .ap-cat-card__arrow { opacity: 1; transform: scale(1); }

/* ============================================================
   HOMEPAGE — BRAND STRIP
   ============================================================ */
.ap-brands-strip { padding: 40px 0; }
.ap-brands-strip__title {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ap-text-3);
  margin-bottom: 24px;
}
.ap-brands-strip__track {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ap-brand-pill {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border);
  border-radius: 40px;
  font-family: var(--ap-f-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-text-2);
  text-decoration: none;
  transition: var(--ap-t);
  letter-spacing: 0.03em;
}
.ap-brand-pill:hover { border-color: var(--ap-border-red); color: var(--ap-text); background: var(--ap-red-glow); }

/* ============================================================
   HOMEPAGE — TRACKDAY BANNER
   ============================================================ */
.ap-trackday-banner {
  position: relative;
  padding: 80px 0;
  background: var(--ap-bg-elevated);
  border-top: 1px solid var(--ap-border);
  border-bottom: 1px solid var(--ap-border);
  overflow: hidden;
}
.ap-trackday-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, var(--ap-red-glow) 0%, transparent 70%);
  pointer-events: none;
}
.ap-trackday-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}
.ap-trackday-banner__text { max-width: 520px; }
.ap-trackday-banner__label {
  font-family: var(--ap-f-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ap-red);
  margin-bottom: 12px;
}
.ap-trackday-banner__title {
  font-family: var(--ap-f-display);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ap-text);
  margin-bottom: 16px;
  line-height: 1.0;
}
.ap-trackday-banner p { font-size: 16px; margin-bottom: 0; }

/* ============================================================
   SOCIAL PROOF
   ============================================================ */
.ap-social-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid var(--ap-border);
  border-bottom: 1px solid var(--ap-border);
}
.ap-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  flex: 1;
  min-width: 140px;
}
.ap-stat__number {
  font-family: var(--ap-f-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--ap-red);
  line-height: 1;
}
.ap-stat__label {
  font-size: 13px;
  color: var(--ap-text-3);
  font-family: var(--ap-f-heading);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   BLOG CARDS
   ============================================================ */
.ap-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.ap-post-card { text-decoration: none; display: block; }
.ap-post-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--ap-r-lg) var(--ap-r-lg) 0 0;
  display: block;
}
.ap-post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ap-post-card:hover .ap-post-card__thumb img { transform: scale(1.04); }
.ap-post-card__body { padding: 20px; }
.ap-post-card__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ap-red);
  margin-bottom: 8px;
}
.ap-post-card__title {
  font-family: var(--ap-f-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--ap-text);
  margin-bottom: 8px;
  line-height: 1.3;
  transition: var(--ap-t);
}
.ap-post-card:hover .ap-post-card__title { color: var(--ap-red); }
.ap-post-card__excerpt { font-size: 14px; color: var(--ap-text-3); margin-bottom: 0; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.ap-empty-state {
  text-align: center;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.ap-empty-state p { font-size: 18px; }

/* ============================================================
   POSTS GRID
   ============================================================ */
.ap-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ap-r-md);
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border);
  color: var(--ap-text-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--ap-t);
}
.page-numbers:hover,
.page-numbers.current {
  background: var(--ap-red);
  border-color: var(--ap-red);
  color: #fff;
}
.page-numbers.dots { background: transparent; border-color: transparent; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .ap-footer__newsletter-inner { flex-direction: column; }
  .ap-newsletter-form { max-width: 100%; }
  .ap-newsletter-form__row { flex-direction: column; }
  .ap-footer__grid { grid-template-columns: 1fr 1fr; }
  .ap-footer__col--brand { grid-column: span 2; }
  .ap-hero__actions { flex-direction: column; }
  .ap-hero__actions .ap-btn { width: 100%; justify-content: center; }
  .ap-trackday-banner__inner { flex-direction: column; }
  .ap-footer__bottom-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .ap-footer__grid { grid-template-columns: 1fr; }
  .ap-footer__col--brand { grid-column: span 1; }
}
