/* ==========================================================================
   GearStrike Auto Parts — auto-theme.css
   Estilos para index.html + header-preview.html
   Guardar en:  assets/auto-theme.css
   Breakpoints: 768px (tablet) y 480px (móvil)
   ========================================================================== */

/* ---------- Variables de tema ---------- */
:root {
  --ap-primary-red: #e2231a;
  --ap-primary-red-dark: #b81b14;
  --ap-yellow: #ffcc00;
  --ap-yellow-dark: #e6b800;
  --ap-dark: #1a1a1a;
  --ap-text: #333;
  --ap-muted: #777;
  --ap-border: #e0e0e0;
  --ap-page-bg: #f4f4f4;
  --ap-card-bg: #fff;
  --ap-radius: 8px;
  --ap-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --ap-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.14);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--ap-page-bg);
  color: var(--ap-text);
  line-height: 1.4;
}

img {
  max-width: 100%;
}

/* ---------- Contenedor ---------- */
.ap-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Botones ---------- */
.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 0;
  border-radius: var(--ap-radius);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.ap-btn:active {
  transform: translateY(1px);
}

.ap-btn--primary {
  background: var(--ap-primary-red);
  color: #fff;
}

.ap-btn--primary:hover {
  background: var(--ap-primary-red-dark);
}

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

.ap-btn--yellow:hover {
  background: var(--ap-yellow-dark);
}

/* ---------- Barra de categorías (nav) ---------- */
.ap-nav {
  background: var(--ap-primary-red);
}

.ap-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-nav__list li a {
  display: block;
  padding: 12px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.ap-nav__list li a:hover {
  background: rgba(0, 0, 0, 0.18);
}

/* ---------- Selector de vehículo ---------- */
.ap-vehicle {
  background: #222;
  padding: 14px 0;
}

.ap-vehicle__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ap-vehicle__msg {
  color: #fff;
  font-size: 14px;
  margin-right: auto;
}

.ap-vehicle select {
  height: 42px;
  min-width: 130px;
  padding: 0 12px;
  border: 1px solid #444;
  border-radius: var(--ap-radius);
  background: #fff;
  color: var(--ap-text);
  font-size: 14px;
  cursor: pointer;
}

.ap-vehicle .ap-btn {
  height: 42px;
}

/* ---------- Hero ---------- */
.ap-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 60%, #3a3a3a 100%);
  padding: 48px 0;
}

.ap-hero__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.ap-hero__h {
  margin: 0 0 12px;
  color: #fff;
  font-size: 44px;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.ap-hero__sub {
  margin: 0 0 24px;
  max-width: 520px;
  color: #d7d7d7;
  font-size: 17px;
}

.ap-hero__badge {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--ap-yellow);
  color: var(--ap-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  text-transform: uppercase;
}

.ap-hero__badge strong {
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}

.ap-hero__badge span {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* ---------- Grid de categorías (iconos) ---------- */
.ap-categories {
  background: #fff;
  padding: 36px 0;
  border-bottom: 1px solid var(--ap-border);
}

.ap-cat-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 12px;
}

.ap-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 18px 8px;
  border: 1px solid transparent;
  border-radius: var(--ap-radius);
  color: var(--ap-text);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ap-cat svg {
  width: 40px;
  height: 40px;
  color: var(--ap-dark);
  transition: color 0.15s ease;
}

.ap-cat__label {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.ap-cat:hover {
  color: var(--ap-primary-red);
  border-color: var(--ap-border);
  background: #fafafa;
}

.ap-cat:hover svg {
  color: var(--ap-primary-red);
}

/* ---------- Banners promocionales ---------- */
.ap-promos {
  padding: 32px 0;
}

.ap-promo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ap-promo {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
}

.ap-promo svg {
  width: 44px;
  height: 44px;
  color: var(--ap-primary-red);
  flex-shrink: 0;
}

.ap-promo h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
}

.ap-promo p {
  margin: 0;
  color: var(--ap-muted);
  font-size: 14px;
}

/* ---------- Tarjetas genéricas ---------- */
.ap-card {
  background: var(--ap-card-bg);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ap-card:hover {
  border-color: var(--ap-primary-red);
}

/* ---------- Sección "Deals" ---------- */
.ap-deals {
  padding: 32px 0 48px;
}

.ap-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.ap-section-title__h {
  margin: 0;
  padding-left: 14px;
  border-left: 5px solid var(--ap-primary-red);
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.ap-section-title__link {
  color: var(--ap-primary-red);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.ap-section-title__link:hover {
  text-decoration: underline;
}

.ap-deals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ---------- Tarjeta de producto ---------- */
.ap-product {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ap-product:hover {
  box-shadow: var(--ap-shadow-hover);
  transform: translateY(-3px);
}

.ap-product__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  background: #f7f7f7;
  text-decoration: none;
}

.ap-placeholder-img {
  width: 70%;
  height: 70%;
  background: #eee;
  border-radius: var(--ap-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
  font-weight: 700;
}

.ap-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  background: var(--ap-primary-red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
}

.ap-pill--hot {
  background: #ff7a00;
}

.ap-product__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.ap-product__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ap-text);
  min-height: 40px;
}

.ap-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ap-price__current {
  color: var(--ap-primary-red);
  font-size: 22px;
  font-weight: 900;
}

.ap-price__compare {
  color: var(--ap-muted);
  font-size: 14px;
  text-decoration: line-through;
}

.ap-product__cta {
  margin-top: auto;
}

.ap-product__cta .ap-btn {
  width: 100%;
}

/* ---------- Servicios ---------- */
.ap-services {
  background: var(--ap-dark);
  padding: 40px 0;
}

.ap-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.ap-service {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ap-service svg {
  width: 36px;
  height: 36px;
  color: var(--ap-yellow);
  flex-shrink: 0;
}

.ap-service strong {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.ap-service span {
  display: block;
  margin-top: 2px;
  color: #b3b3b3;
  font-size: 13px;
}

/* ---------- Footer ---------- */
.ap-footer-bar {
  background: var(--ap-primary-red);
  color: #fff;
  text-align: center;
  padding: 22px 0;
  font-size: 14px;
  font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE — Tablet (≤768px)
   ========================================================================== */
@media (max-width: 768px) {
  .ap-hero {
    padding: 36px 0;
  }

  .ap-hero__grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .ap-hero__h {
    font-size: 32px;
  }

  .ap-hero__badge {
    width: 120px;
    height: 120px;
  }

  .ap-hero__badge strong {
    font-size: 28px;
  }

  .ap-cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ap-promo-row {
    grid-template-columns: 1fr;
  }

  .ap-deals-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ap-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ap-vehicle__msg {
    width: 100%;
    margin: 0 0 6px;
  }

  .ap-vehicle select,
  .ap-vehicle .ap-btn {
    flex: 1 1 auto;
  }

  .ap-nav__list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ap-section-title__h {
    font-size: 22px;
  }
}

/* ==========================================================================
   RESPONSIVE — Móvil (≤480px)
   ========================================================================== */
@media (max-width: 480px) {
  .ap-hero__h {
    font-size: 26px;
  }

  .ap-hero__sub {
    font-size: 15px;
  }

  .ap-cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ap-deals-grid {
    grid-template-columns: 1fr;
  }

  .ap-services-grid {
    grid-template-columns: 1fr;
  }

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

  .ap-promo {
    padding: 18px;
  }
}
