/* ============================================================
   css/index.css
   Estilos de index.html
   (movidos desde su <style> en línea el 2026-10-18).
   ============================================================ */

/* ── estilos en línea (style="...") movidos a clases ── */
.est-color-var-t3 { color:var(--t3) }

/* ============================================================
   SECCIÓN "DESTACADOS" — carrusel de productos aleatorios
   (agregado el 2026-10-19; reemplaza "Más vendidos")
   Usa las variables de index_style.css (--green, --orange,
   --card, --text, etc.): misma paleta y tipografía del sitio.
   ============================================================ */
.destacados-section {
    padding: 4.5rem 3rem 4rem;
}

/* ── Encabezado (mismo espíritu de .ps-tag/.ps-title del sitio) ── */
.dest-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    margin-bottom: 2.25rem;
}

.dest-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--orange);
}

.dest-tag-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--orange);
    animation: destDotBlink 1.4s ease-in-out infinite;
}

@keyframes destDotBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.25;
    }
}

.dest-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    color: var(--text);
    margin: 0;
}

.dest-title span {
    color: var(--green);
}

.dest-subtitle {
    font-size: 0.95rem;
    color: var(--dim);
    font-weight: 400;
    margin: 0.25rem 0 0;
}

/* ── Carrusel ── */
.dest-carrusel {
    position: relative;
    max-width: 1360px;
    margin: 0 auto;
}

.dest-viewport {
    overflow: hidden;
    /* margen interno para que la tarjeta no se recorte al elevarse */
    padding: 10px 2px 22px;
}

.dest-track {
    --por-vista: 1;
    --gap: 14px;
    position: relative;
    display: flex;
    gap: var(--gap);
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

@media (min-width: 576px) {
    .dest-track {
        --por-vista: 2;
    }
}

@media (min-width: 768px) {
    .dest-track {
        --por-vista: 3;
    }
}

@media (min-width: 992px) {
    .dest-track {
        --por-vista: 4;
        --gap: 20px;
    }
}

/* ── Tarjeta ── */
.dest-card {
    flex: 0 0 auto;
    width: calc((100% - (var(--por-vista) - 1) * var(--gap)) / var(--por-vista));
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    text-decoration: none;
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

@media (hover: hover) {

    .dest-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
        border-color: var(--border2);
    }

    .dest-card:hover .dest-img {
        transform: scale(1.06);
    }
}

.dest-img-caja {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--card2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: hidden;
}

.dest-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.45s ease;
}

/* cinta "NUEVO" en la esquina */
.dest-ribbon {
    position: absolute;
    top: 14px;
    left: -34px;
    transform: rotate(-45deg);
    width: 130px;
    text-align: center;
    padding: 4px 0;
    background: linear-gradient(135deg, var(--green), var(--green2));
    color: #062b12;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.dest-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 18px;
}

.dest-nombre {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.dest-precio {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--green);
}

/* ── Botones anterior/siguiente ── */
.dest-nav {
    position: absolute;
    top: calc(50% - 6px);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border2);
    background: rgba(12, 24, 16, 0.85);
    color: var(--green);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 3;
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.dest-nav:hover {
    background: var(--green);
    color: #000;
    transform: translateY(-50%) scale(1.08);
}

.dest-nav:active {
    transform: translateY(-50%) scale(0.94);
}

.dest-nav-ant {
    left: 4px;
}

.dest-nav-sig {
    right: 4px;
}

@media (max-width: 575px) {
    .dest-nav {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
    }
}

/* ── Puntos indicadores ── */
.dest-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 0.25rem;
}

.dest-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--border2);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.dest-dot.activo {
    width: 26px;
    background: var(--green);
}

/* ── Botón "Ver catálogo completo" ── */
.dest-acciones {
    display: flex;
    justify-content: center;
    margin-top: 2.25rem;
}

.dest-btn-catalogo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    min-height: 48px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-decoration: none;
    color: #062b12;
    background: linear-gradient(135deg, var(--green), var(--green2));
    box-shadow: 0 10px 26px rgba(46, 204, 113, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.dest-btn-catalogo:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 14px 32px rgba(46, 204, 113, 0.35);
}

.dest-btn-catalogo:active {
    transform: translateY(0);
}

/* ── Estados ── */
.dest-carrusel.sin-controles .dest-nav,
.dest-carrusel.sin-controles + .dest-dots {
    display: none;
}

.dest-vacio {
    width: 100%;
    text-align: center;
    color: var(--dim);
    padding: 2.5rem 1rem;
    margin: 0;
}

/* ── Aparición gradual al hacer scroll (la agrega JS) ── */
.dest-reveal-pending {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.dest-reveal-pending.dest-reveal-in {
    opacity: 1;
    transform: none;
}

/* ── Responsive: espaciados ── */
@media (max-width: 767px) {
    .destacados-section {
        padding: 3.5rem 1rem 3rem;
    }
}

@media (max-width: 480px) {
    .dest-title {
        letter-spacing: -1px;
    }

    .dest-btn-catalogo {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
}

/* ── Tema claro (mismo patrón que index_style.css) ── */
[data-theme="light"] .dest-title {
    color: #1a1a1a;
}

[data-theme="light"] .dest-subtitle {
    color: #4a6b52;
}

[data-theme="light"] .dest-card {
    background: #fff;
    border-color: rgba(46, 125, 50, 0.14);
}

[data-theme="light"] .dest-img-caja {
    background: #f3f9f5;
}

[data-theme="light"] .dest-nombre {
    color: #1a1a1a;
}

[data-theme="light"] .dest-precio {
    color: #1b5e20;
}

[data-theme="light"] .dest-nav {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(46, 125, 50, 0.3);
    color: #2e7d32;
}

[data-theme="light"] .dest-dot {
    background: rgba(46, 125, 50, 0.3);
}

[data-theme="light"] .dest-dot.activo {
    background: #2e7d32;
}

[data-theme="light"] .dest-btn-catalogo {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: #fff;
}

/* ── Respeta "reducir movimiento" del sistema ── */
@media (prefers-reduced-motion: reduce) {

    .dest-track,
    .dest-card,
    .dest-img,
    .dest-nav,
    .dest-dot,
    .dest-btn-catalogo,
    .dest-reveal-pending {
        transition: none !important;
    }

    .dest-tag-dot {
        animation: none;
    }

    .dest-reveal-pending {
        opacity: 1 !important;
        transform: none !important;
    }
}
