/* Video Product Carousel - Frontend styles */

.vpc-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0 40px;
    box-sizing: border-box;
}

.vpc-wrapper * {
    box-sizing: border-box;
}

.vpc-wrapper .swiper {
    overflow: hidden;
    padding: 10px 10px 40px;
}

.vpc-wrapper .swiper-wrapper {
    align-items: center;
}

.vpc-wrapper .vpc-slide {
    width: 260px;
    height: auto;
    transition: transform .35s ease, opacity .35s ease;
}

.vpc-slide-inner {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* Video */
.vpc-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #111;
    overflow: hidden;
}

.vpc-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.vpc-video-native {
    object-fit: cover;
}

.vpc-video-iframe {
    background-size: cover;
    background-position: center;
}

.vpc-video-iframe iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.vpc-video-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    background: #222;
}

/* Controles de sonido y play/pause (esquina superior derecha) */
.vpc-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.vpc-ctrl {
    pointer-events: auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.vpc-ctrl:hover,
.vpc-ctrl:focus-visible {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
    outline: none;
}

.vpc-ctrl:active {
    transform: scale(0.95);
}

.vpc-ico {
    width: 18px;
    height: 18px;
    display: block;
}

/* El slide activo resalta un poco más los botones */
.vpc-slide:not(.swiper-slide-active) .vpc-controls {
    opacity: 0.6;
}

/* En slides pequeños (móvil) reducir tamaño */
@media (max-width: 480px) {
    .vpc-ctrl {
        width: 30px;
        height: 30px;
    }
    .vpc-ico {
        width: 15px;
        height: 15px;
    }
}

/* Tarjeta de producto superpuesta (estilo mockup) */
.vpc-product {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 2;
}

.vpc-product-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,.96);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    transition: transform .2s ease, box-shadow .2s ease;
}

.vpc-product-card:hover,
.vpc-product-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.22);
    color: inherit;
    text-decoration: none;
}

.vpc-product-thumb {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f6f6;
}

.vpc-product-thumb img,
.vpc-product-thumb .vpc-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vpc-product-info {
    flex: 1;
    min-width: 0;
}

.vpc-product-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #111;
}

.vpc-product-price {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin-top: 2px;
}

.vpc-product-price del {
    opacity: .6;
    font-weight: 500;
    margin-right: 4px;
}

.vpc-product-cta {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
    font-weight: 400;
}

/* Forzar layout horizontal (evitar temas que rompan la fila) */
.vpc-wrapper .swiper-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
}

.vpc-wrapper .swiper-slide {
    flex-shrink: 0 !important;
    height: auto;
    opacity: 1 !important;
}

/* Coverflow: destacar slide central solo con escala (sin opacidad) */
.vpc-wrapper.vpc-coverflow .vpc-slide {
    transform: scale(.92);
    transition: transform .35s ease;
}

.vpc-wrapper.vpc-coverflow .vpc-slide.swiper-slide-active,
.vpc-wrapper.vpc-coverflow .vpc-slide.swiper-slide-duplicate-active {
    transform: scale(1);
    z-index: 3;
}

/* Navegación */
.vpc-wrapper .swiper-button-prev,
.vpc-wrapper .swiper-button-next {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: #111;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    top: 50%;
    margin-top: 0;
    transform: translateY(-50%);
}

.vpc-wrapper .swiper-button-prev:after,
.vpc-wrapper .swiper-button-next:after {
    font-size: 14px;
    font-weight: 800;
}

/* Paginación */
.vpc-wrapper .swiper-pagination-bullet {
    background: #111;
    opacity: .25;
}

.vpc-wrapper .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .vpc-wrapper .vpc-slide {
        width: 200px;
    }
    .vpc-product-card {
        padding: 6px 8px;
        gap: 8px;
    }
    .vpc-product-thumb {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
    }
    .vpc-product-name {
        font-size: 12px;
    }
    .vpc-product-price {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .vpc-wrapper .vpc-slide {
        width: 170px;
    }
    .vpc-wrapper .swiper-button-prev,
    .vpc-wrapper .swiper-button-next {
        display: none;
    }
}
