/* ============================================================
   Glovesa Product Carousel — Estilos
   ============================================================ */

.gpc-wrapper {
    position: relative;
    padding: 0 44px;
    box-sizing: border-box;
}

/* ── Track externo ─────────────────────────────────────────── */
.gpc-track-outer {
    overflow: hidden;
    width: 100%;
}

/* ── Track interno ─────────────────────────────────────────── */
.gpc-track {
    display: flex;
    align-items: stretch;
    transition: transform 0.45s ease;
    will-change: transform;
}

/* ── Slide: ancho por atributo data-items ──────────────────── */
.gpc-wrapper[data-items="1"] .gpc-slide { width: 100%; }
.gpc-wrapper[data-items="3"] .gpc-slide { width: 33.333%; }

.gpc-slide {
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 6px;
}

/* ── Tarjeta ───────────────────────────────────────────────── */
.gpc-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.gpc-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
    transform: translateY(-3px);
}

/* ── Imagen: altura fija definida desde PHP via style inline ── */
.gpc-card__img-wrap {
    width: 100%;
    /* height viene como style="height:Xpx" desde PHP */
    overflow: hidden;
    background: #f0f0f0;
    display: block;
}

.gpc-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.gpc-card:hover .gpc-card__img {
    transform: scale(1.05);
}

.gpc-card__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

/* ── Footer (título separado de la imagen) ─────────────────── */
.gpc-card__footer {
    padding: 14px 16px 18px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
}

.gpc-card__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    text-align: center;
}

/* ── Flechas ───────────────────────────────────────────────── */
.gpc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-70%); /* sube un poco para compensar el footer */
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #333;
    background: #fff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
    padding: 0;
    color: #333;
}

.gpc-arrow:hover {
    background: #333;
    color: #fff;
}

.gpc-arrow--prev { left: 0; }
.gpc-arrow--next { right: 0; }

.gpc-arrow:disabled {
    opacity: 0.25;
    cursor: default;
}

/* ── Dots ──────────────────────────────────────────────────── */
.gpc-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.gpc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.gpc-dot.is-active {
    background: #333;
    transform: scale(1.35);
}

/* ── Barra de progreso del autoplay ───────────────────────── */
.gpc-progress {
    height: 2px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.gpc-progress__bar {
    height: 100%;
    width: 0%;
    background: #333;
    transition: width linear;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 767px) {
    .gpc-wrapper[data-items="3"] .gpc-slide {
        width: 100%;
    }
    .gpc-wrapper {
        padding: 0 38px;
    }
}
