/* home.css — Homepage FASE 1 — LlantasRunflat.pe
   Mobile-first. No imports. Depends on main.css for tokens/reset.
   ----------------------------------------------------------------- */

/* ═══════════════════════════════════════════════════════════════════
   HERO — CAROUSEL / STATIC
   ═══════════════════════════════════════════════════════════════════ */
.hp-hero {
    position: relative;
    background: #0a0c10;
    overflow: hidden;
}

/* ── Fallback (sin banners en BD) ───────────────────────────────── */
.hp-hero__fallback {
    padding: 4.5rem 0 3.5rem;
    background: linear-gradient(135deg, #0a0c10 0%, #111318 40%, #1a0f10 70%, #0d0b0b 100%);
}
.hp-hero__fallback-inner {
    max-width: 640px;
}
.hp-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
    margin-bottom: .9rem;
}
.hp-hero__heading {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
    color: #fff;
}
.hp-hero__sub {
    color: #D1D5DB;
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0 0 2rem;
    max-width: 48ch;
}
.hp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

/* ── Carousel wrapper ───────────────────────────────────────────── */
.hp-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0a0c10;
}

/* ── Track & Slides ─────────────────────────────────────────────── */
.hc-track {
    position: relative;
    width: 100%;
    min-height: 320px;
}
@media (min-width: 768px)  { .hc-track { min-height: 440px; } }
@media (min-width: 1200px) { .hc-track { min-height: 520px; } }

.hc-slide {
    position: absolute;
    inset: 0;
    min-height: inherit;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .6s ease;
}

/* Forzar el container a 100% del slide para que su left edge
   coincida con el del header (mismo padding: 0 var(--space-6)) */
.hc-slide > .container {
    width: 100%;
}
.hc-slide--active {
    opacity: 1;
    pointer-events: auto;
    position: relative;  /* active slide takes natural height */
}

/* ── Background image ───────────────────────────────────────────── */
.hc-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    display: block;
}

/* Slide 1 (almacén): subido 50px respecto a 72% base */
.hc-slide[data-slide="0"] .hc-img {
    object-position: center 82%;
}
/* Slide 3 (neumáticos runflat): bajado 30px respecto a 72% base */
.hc-slide[data-slide="2"] .hc-img {
    object-position: center 66%;
}

/* ── Dark gradient overlay for text legibility ──────────────────── */
.hc-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(10,12,16,.88) 0%,
        rgba(10,12,16,.70) 35%,
        rgba(10,12,16,.30) 65%,
        rgba(10,12,16,.10) 100%
    );
    z-index: 1;
}
@media (max-width: 640px) {
    .hc-overlay {
        background: linear-gradient(
            180deg,
            rgba(10,12,16,.30) 0%,
            rgba(10,12,16,.85) 55%,
            rgba(10,12,16,.95) 100%
        );
    }
}

/* ── Copy block ─────────────────────────────────────────────────── */
.hc-copy {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 3rem 0;
    color: #fff;
}
@media (max-width: 640px) {
    .hc-copy {
        padding: 2rem 0;
        margin-top: auto;
    }
}

.hc-title {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    color: #fff;
}
.hc-subtitle {
    font-size: clamp(.9rem, 1.8vw, 1.1rem);
    color: #D1D5DB;
    line-height: 1.6;
    margin: 0 0 .6rem;
}
.hc-desc {
    font-size: .95rem;
    color: rgba(255,255,255,.7);
    line-height: 1.55;
    margin: 0 0 1.75rem;
    max-width: 44ch;
}
.hc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.hc-wa-btn {
    color: #D1D5DB;
    border-color: rgba(255,255,255,.22);
}
.hc-wa-btn:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.4);
    color: #fff;
}

/* ── Prev / Next arrows ─────────────────────────────────────────── */
.hc-prev,
.hc-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.25);
    background: rgba(10,12,16,.55);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
    backdrop-filter: blur(4px);
}
.hc-prev { left: 1rem; }
.hc-next { right: 1rem; }
.hc-prev:hover,
.hc-next:hover {
    background: rgba(232,24,28,.75);
    border-color: transparent;
}
@media (max-width: 480px) {
    .hc-prev { left: .5rem; }
    .hc-next { right: .5rem; }
}

/* ── Dots ───────────────────────────────────────────────────────── */
.hc-dots {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: .5rem;
    align-items: center;
}
.hc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.35);
    cursor: pointer;
    padding: 0;
    transition: background .25s, transform .25s;
    flex-shrink: 0;
}
.hc-dot--active,
.hc-dot:hover {
    background: #fff;
    transform: scale(1.3);
}

/* ── Static mode (1 banner) — hide controls ─────────────────────── */
.hp-carousel--static .hc-prev,
.hp-carousel--static .hc-next,
.hp-carousel--static .hc-dots {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════
   QUICK SEARCH
   ═══════════════════════════════════════════════════════════════════ */
.hp-search {
    background-color: #1a1d23;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49'%3E%3Cpath d='M14 0 L28 8 L28 24 L14 32 L0 24 L0 8 Z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3Cpath d='M14 32 L28 40 L28 56 L14 64 L0 56 L0 40 Z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E"),
        linear-gradient(to bottom, #050608 0%, #1a1d23 50%);
    background-size: 28px 49px, 100% 100%;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 50px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hp-search__title {
    color: #D1D5DB;
    font-size: clamp(.9rem, 2vw, 1.1rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 1rem;
}
.hp-search__row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: flex-end;
}
.hp-search__row .form-group {
    flex: 1 1 130px;
    min-width: 0;
    margin: 0;
}
.hp-search__row .btn {
    flex-shrink: 0;
    align-self: flex-end;
}

/* ── Quick search: dark-context form overrides ─────────────── */
.hp-search .form-label {
    color: rgba(255,255,255,.85);
}
.hp-search .form-control,
.hp-search .form-select {
    background-color: #252830;
    border: 1.5px solid rgba(255,255,255,.18);
    color: #fff;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='white' stroke-opacity='.5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 12px;
    padding-right: 2.25rem;
}
.hp-search .form-control:focus,
.hp-search .form-select:focus {
    border-color: rgba(255,255,255,.45);
    box-shadow: 0 0 0 3px rgba(255,255,255,.08);
    outline: none;
}
.hp-search .form-control option,
.hp-search .form-select option {
    background: var(--c-dark-2, #1E2128);
    color: #fff;
}
.hp-search__error {
    color: #fca5a5;
    font-size: .85rem;
    margin: .5rem 0 0;
}

/* ═══════════════════════════════════════════════════════════════════
   CATEGORIES
   ═══════════════════════════════════════════════════════════════════ */
.hp-cats {
    padding: 4rem 0;
    background: #fff;
}
.hp-cats__heading {
    text-align: center;
    margin-bottom: 2.5rem;
}
.hp-cats__heading h2 {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin: 0 0 .5rem;
    color: var(--c-dark, #111318);
}
.hp-cats__heading p {
    color: #666;
    margin: 0;
}
.hp-cats__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 640px) {
    .hp-cats__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    .hp-cats__grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
.hp-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.75rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
    min-height: 140px;
    background-image: var(--cat-bg, none);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.hp-cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.52);
    border-radius: inherit;
    transition: background .2s;
    z-index: 0;
}
.hp-cat-card:hover,
.hp-cat-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    color: #fff;
    text-decoration: none;
}
.hp-cat-card:hover::before { background: rgba(0,0,0,.35); }
.hp-cat-card--runflat { background-color: #6b1010; }
.hp-cat-card--uhp     { background-color: #1a0828; }
.hp-cat-card--suv     { background-color: #1a252f; }
.hp-cat-card--at      { background-color: #0f1f0a; }
.hp-cat-card--carga   { background-color: #1a1200; }
.hp-cat-card__icon {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.hp-cat-card__icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hp-cat-card__label {
    line-height: 1.3;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 6px rgba(0,0,0,.6);
}

/* ═══════════════════════════════════════════════════════════════════
   BRAND STRIP
   ═══════════════════════════════════════════════════════════════════ */
.hp-brands {
    background: var(--c-dark, #111318);
    padding: 3rem 0;
    overflow: hidden;
}
.hp-brands__label {
    text-align: center;
    color: rgba(255,255,255,.65);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 1.75rem;
}
.hp-brands__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1.5rem;
}
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: .55;
    transition: opacity .2s;
    text-decoration: none;
}
.brand-logo:hover { opacity: .9; }
.brand-logo img {
    display: block;
    height: 28px;
    width: auto;
    max-width: 115px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* ═══════════════════════════════════════════════════════════════════
   TRUST STRIP
   ═══════════════════════════════════════════════════════════════════ */
.hp-trust {
    background: var(--c-brand, #E8181C);
    color: #fff;
    padding: 2.25rem 0;
}
.hp-trust__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .hp-trust__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.hp-trust-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}
.hp-trust-item__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hp-trust-item__icon svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hp-trust-item__text strong {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.2;
}
.hp-trust-item__text span {
    font-size: .78rem;
    opacity: 1;
    display: block;
    margin-top: .2rem;
}

/* ═══════════════════════════════════════════════════════════════════
   FEATURED PRODUCTS
   ═══════════════════════════════════════════════════════════════════ */
.hp-featured {
    padding: 4rem 0;
    background: #f7f8fa;
}
.hp-featured__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}
.hp-featured__header h2 {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 800;
    margin: 0;
    color: var(--c-dark, #111318);
}
.hp-featured__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 640px) {
    .hp-featured__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    .hp-featured__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PROMO BANNER (Aros)
   ═══════════════════════════════════════════════════════════════════ */
.hp-promo {
    background: linear-gradient(120deg, #111318 0%, #1a1d25 60%, #0d0b0b 100%);
    color: #fff;
    padding: 3.5rem 0;
    position: relative;
    overflow: hidden;
}
.hp-promo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 80% at 90% 50%, rgba(232,24,28,0.18) 0%, transparent 60%);
    pointer-events: none;
}
.hp-promo__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.hp-promo__copy h2 {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    margin: 0 0 .6rem;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0,0,0,.6);
}
.hp-promo__copy h2 span {
    color: var(--c-brand, #E8181C);
}
.hp-promo__copy p {
    color: #D1D5DB;
    margin: 0;
    font-size: 1rem;
}
.hp-promo__action {
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   WHY US
   ═══════════════════════════════════════════════════════════════════ */
.hp-why {
    padding: 4.5rem 0;
    background: #fff;
}
.hp-why__heading {
    text-align: center;
    margin-bottom: 3rem;
}
.hp-why__heading h2 {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    margin: 0 0 .5rem;
    color: var(--c-dark, #111318);
}
.hp-why__heading p {
    color: #666;
    margin: 0;
}
.hp-why__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) {
    .hp-why__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .hp-why__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.hp-why-card {
    background: #f7f8fa;
    border-radius: 14px;
    padding: 1.75rem 1.5rem;
    border: 1px solid #eef0f3;
}
.hp-why-card__icon {
    width: 52px;
    height: 52px;
    background: rgba(232,24,28,0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}
.hp-why-card__icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--c-brand, #E8181C);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hp-why-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .5rem;
    color: var(--c-dark, #111318);
}
.hp-why-card p {
    font-size: .88rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════
   WA CTA STRIP
   ═══════════════════════════════════════════════════════════════════ */
.hp-wa-cta {
    background: var(--c-dark, #111318);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}
.hp-wa-cta h2 {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: clamp(1.5rem, 2.5vw, 1.8rem);
    font-weight: 800;
    margin: 0 0 .6rem;
    color: #fff;
    text-shadow: 0 1px 12px rgba(0,0,0,.45);
}
.hp-wa-cta p {
    color: #D1D5DB;
    margin: 0 0 1.75rem;
}
.hp-wa-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: #0f5d2d;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: .85rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    transition: background .2s, transform .15s;
}
.hp-wa-cta__btn:hover,
.hp-wa-cta__btn:focus-visible {
    background: #1eb558;
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}
.hp-wa-cta__btn svg {
    fill: #fff;
    flex-shrink: 0;
}
.hp-wa-cta__text { white-space: nowrap; }
.hp-wa-cta__phone { white-space: nowrap; }

@media (max-width: 600px) {
    .hp-wa-cta__btn {
        flex-direction: column;
        gap: .15rem;
        text-align: center;
        padding: .9rem 2rem;
        max-width: 100%;
    }
    .hp-wa-cta__btn svg { margin-bottom: .1rem; }
    .hp-wa-cta__phone { font-size: .95rem; opacity: .85; }
}

/* ── Homepage: prevent white gap between last dark section and footer ── */
.site-footer { margin-top: 0; }
