/* ==========================================================================
   AP Hero Slider
   ========================================================================== */

.ap-hero-wrapper {
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
}

/* Patron de lineas diagonales visible */
.ap-hero-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(135deg,
            rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 1px,
            transparent 1px,
            transparent 12px);
    z-index: 1;
    pointer-events: none;
}

/* Resplandor sutil naranja en esquina inferior derecha */
.ap-hero-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(254, 103, 17, 0.08) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* Division diagonal entre zona info y zona imagen */
.ap-hero-wrapper .ap-hero-diagonal {
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background: #111111;
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
    z-index: 1;
    pointer-events: none;
}

/* Imagen de fondo del tema (solo visible en zona derecha) */
.ap-hero-wrapper .th-hero-bg {
    opacity: 0.2;
}

/* Barra inferior degradado naranja */
.ap-hero-bottom-bar {
    position: relative;
    z-index: 3;
    height: 4px;
    background: linear-gradient(90deg, #FE6711, #ff9a56, #FE6711);
}

/* Swiper */
.ap-hero-swiper {
    position: relative;
    z-index: 2;
}

.ap-hero-swiper .swiper-slide {
    height: auto;
    opacity: 0 !important;
    transition: opacity 0.8s ease;
}

.ap-hero-swiper .swiper-slide-active {
    opacity: 1 !important;
}

/* Inner */
.ap-hero-inner {
    display: flex;
    align-items: center;
    min-height: 480px;
    padding: 50px 0 70px;
}

/* ===== Content Left ===== */
.ap-hero-content {
    position: relative;
}

/* Badge */
.ap-hero-badge {
    display: inline-block;
    padding: 5px 16px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-radius: 30px;
    color: #fff;
    margin-bottom: 14px;
}

.ap-hero-badge--new {
    background: linear-gradient(135deg, #FE6711, #f79b66);
}

.ap-hero-badge--used {
    background: linear-gradient(135deg, #58595B, #8A898D);
}

/* Subtitle */
.ap-hero-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ap-hero-subtitle span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #FE6711;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ap-hero-brand-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

/* Title */
.ap-hero-title {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}

/* Specs */
.ap-hero-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ap-hero-spec {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 50px;
}

.ap-hero-spec i {
    font-size: 0.7rem;
    color: #FE6711;
}

/* Price */
.ap-hero-price {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    line-height: 1;
}

.ap-hero-price::before {
    content: 'Desde';
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

/* CTA Button */
.ap-hero-cta {
    display: flex;
}

/* Desktop: boton debajo del precio, alineado izquierda */
@media (min-width: 992px) {
    .ap-hero-btn-col {
        max-width: 50%;
        flex: 0 0 50%;
    }
}

/* ===== Image Right - ocupa toda la zona derecha con corte diagonal ===== */
.ap-hero-img-col {
    position: static;
}

.ap-hero-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
}

.ap-hero-img-main {
    width: 100%;
    height: 100%;
}

.ap-hero-wrapper .ap-hero-img-main img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 70% !important;
}

.swiper-slide-active .ap-hero-img-main img {
    animation: apSlideInCar 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes apSlideInCar {
    0% {
        opacity: 0;
        transform: translateX(60px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Pagination ===== */
.ap-hero-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ap-hero-wrapper .ap-slider-dots {
    display: flex !important;
    align-items: center;
    gap: 6px;
    position: static !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

.ap-hero-wrapper .ap-slider-dots span,
.ap-hero-wrapper .ap-slider-dots .swiper-pagination-bullet {
    display: inline-block !important;
    width: 10px !important;
    height: 10px !important;
    min-width: 10px;
    min-height: 10px;
    background: rgba(255, 255, 255, 0.25) !important;
    opacity: 1 !important;
    border-radius: 50% !important;
    transition: all 0.4s ease;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
}

.ap-hero-wrapper .ap-slider-dots span.swiper-pagination-bullet-active,
.ap-hero-wrapper .ap-slider-dots .swiper-pagination-bullet-active {
    width: 30px !important;
    border-radius: 5px !important;
    background: #FE6711 !important;
}

.ap-slider-counter {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ap-current-slide {
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
}

.ap-total-slides {
    font-weight: 500;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
}

.ap-total-slides::before {
    content: '/';
    margin-right: 4px;
    color: rgba(255, 255, 255, 0.2);
}

/* ===== Nav Arrows ===== */
.ap-hero-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    z-index: 10;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.ap-hero-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    pointer-events: auto;
}

.ap-hero-nav-btn:hover {
    background: #FE6711;
    border-color: #FE6711;
    color: #fff;
}

/* Empty */
.ap-slider-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    padding: 40px 20px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991px) {
    .ap-hero-inner {
        min-height: auto;
        padding: 40px 0 80px;
    }

    .ap-hero-inner .row {
        display: flex;
        flex-direction: column;
    }

    /* Orden: 1 info, 2 imagen, 3 boton */
    .ap-hero-inner .col-xxl-5,
    .ap-hero-inner .col-xl-6:first-child {
        order: 1;
    }

    .ap-hero-img-col {
        order: 2;
    }

    .ap-hero-btn-col {
        order: 3;
    }

    .ap-hero-diagonal {
        display: none;
    }

    .ap-hero-img {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        height: auto;
        clip-path: none;
        text-align: center !important;
        margin-top: 24px;
        display: block;
    }

    .ap-hero-img-main {
        display: block;
        padding: 0;
    }

    .ap-hero-img-main img {
        max-width: 100%;
        max-height: 280px;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .ap-hero-cta {
        justify-content: center;
        margin-top: 24px;
    }

    .ap-hero-nav {
        display: none;
    }

    .ap-hero-title {
        text-align: center;
    }

    .ap-hero-subtitle {
        justify-content: center;
    }

    .ap-hero-specs {
        justify-content: center;
    }

    .ap-hero-price {
        text-align: center;
    }

    .ap-hero-price::before {
        text-align: center;
    }

    .ap-hero-badge {
        display: block;
        text-align: center;
    }
}

@media (max-width: 575px) {
    .ap-hero-inner {
        padding: 30px 0 70px;
    }

    .ap-hero-title {
        font-size: 1.4rem;
    }

    .ap-hero-spec {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .ap-hero-price {
        font-size: 1.2rem;
    }

    .ap-hero-img-main img {
        max-height: 220px;
    }
}

/* ==========================================================================
   AP Carrousel - Best Price Section
   ========================================================================== */

/* Image container - fixed aspect ratio for consistent sizing */
.best-price-car-gallery-1 .best-price-car-box {
    position: relative;
    aspect-ratio: 16 / 10;
    border: 2px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    background: #1a1a1a;
}

.best-price-car-gallery-1 .best-price-car-box img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Content card - consistent height */
.best-price-car-content .car-content {
    overflow: hidden;
}

/* Text overflow - Title (1 line with ellipsis) */
.best-price-car-content .box-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.best-price-car-content .box-title a {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Text overflow - Price */
.best-price-car-content .box-title-price {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Specs - vertical stack with labels */
.best-price-car-content .car-feature ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    gap: 0 !important;
}

.best-price-car-content .car-feature ul li {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    overflow: hidden !important;
    min-width: 0 !important;
    flex: 1 1 0% !important;
    white-space: nowrap !important;
}

.best-price-car-content .car-feature ul li .ap-spec-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #FE6711;
    margin-bottom: 2px;
}

.best-price-car-content .car-feature ul li .ap-spec-value {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-size: 0.85em;
}