/* Modal tarjeta de producto (una sola instancia; datos desde el DOM de cada .product-card-kov) */

.product-card-kov {
    cursor: pointer;
}

.kov-prmod {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
        max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

.kov-prmod[hidden] {
    display: none !important;
}

.kov-prmod__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 15, 0.55);
    backdrop-filter: blur(3px);
}

.kov-prmod__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(96vw, 720px);
    max-height: min(92vh, 900px);
    overflow: auto;
    margin: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    padding: 20px 20px 22px;
    box-sizing: border-box;
}

.kov-prmod__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #f2f2f2;
    color: #222;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.kov-prmod__close:hover,
.kov-prmod__close:focus {
    background: #e6e6e6;
    outline: 2px solid #333;
    outline-offset: 2px;
}

.kov-prmod__media {
    position: relative;
    margin: -4px -4px 12px;
    border-radius: 14px;
    overflow: hidden;
    background: #f7f7f7;
}

.kov-prmod__img-wrap {
    aspect-ratio: 4 / 3;
    max-height: min(70vh, 560px);
    min-height: 220px;
}

.kov-prmod__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.kov-prmod__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #222;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.kov-prmod__nav:hover,
.kov-prmod__nav:focus {
    background: #fff;
    outline: 2px solid #333;
    outline-offset: 2px;
}

.kov-prmod__nav--prev {
    left: 8px;
}

.kov-prmod__nav--next {
    right: 8px;
}

.kov-prmod__nav[hidden] {
    display: none !important;
}

.kov-prmod__dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 0 14px;
    min-height: 12px;
}

.kov-prmod__dots[hidden] {
    display: none !important;
}

.kov-prmod__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
}

.kov-prmod__dot.is-active {
    background: #222;
}

.kov-prmod__title {
    margin: 0 0 6px;
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.25;
    color: #111;
    padding-right: 36px;
}

.kov-prmod__wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    max-width: 100%;
    margin: 10px 0 0;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(37, 211, 102, 0.45);
    background: rgba(37, 211, 102, 0.08);
    color: #128c3a !important;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    text-align: center;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.kov-prmod__wa-txt {
    line-height: 1.2;
}

.kov-prmod__wa-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.kov-prmod__wa:hover,
.kov-prmod__wa:focus {
    background: rgba(37, 211, 102, 0.14);
    border-color: rgba(18, 140, 58, 0.55);
    color: #0d6e36 !important;
    outline: none;
}

body.kov-prmod-open {
    overflow: hidden;
}

/* Tarjetas con doble vista (sillas): hover suave entre foto 1 y 2 — solo en dispositivos con hover real */
.product-card-kov-peek {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: inherit;
    background: #ececec;
}

.product-card-kov-media .product-card-kov-peek__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.product-card-kov-peek__img--a {
    opacity: 1;
    z-index: 1;
    transform: scale(1);
}

.product-card-kov-peek__img--b {
    opacity: 0;
    z-index: 2;
    transform: scale(1.02);
}

@media (hover: hover) and (pointer: fine) {
    .product-card-kov:hover .product-card-kov-peek__img--a {
        opacity: 0;
        transform: scale(1.02);
    }

    .product-card-kov:hover .product-card-kov-peek__img--b {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-card-kov-media .product-card-kov-peek__img {
        transition: none;
    }

    .product-card-kov-slides {
        transition: none;
    }
}

/* Respaldo: ocultar códigos si quedara algún bloque en HTML */
.product-card-kov-code {
    display: none !important;
}

/* Carrusel en tarjeta: transición suave al usar flechas (modal usa galería aparte) */
.product-card-kov-slides {
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Catálogo: mismas dimensiones peek / 1 foto / 3+ fotos (slider) ----- */
.product-catalog-grid {
    align-items: stretch;
    grid-auto-rows: minmax(0, 1fr);
}

.product-card-kov {
    height: 100%;
    box-sizing: border-box;
}

.product-card-kov-media {
    flex: 0 0 auto;
    width: 100%;
}

/* Igual que .product-card-kov-peek: caja 4×3 fija (sobre kov-extra.css del sitio) */
.product-card-kov-slider-viewport {
    aspect-ratio: 4 / 3 !important;
    max-height: none !important;
    width: 100%;
    background: #ececec;
}

.product-card-kov-slide img {
    object-fit: contain !important;
    object-position: center;
    background: #ececec;
}

.product-card-kov-body {
    flex: 1 1 auto;
    justify-content: center;
    gap: 0 !important;
    min-height: 3.15rem;
}

.product-card-kov-body > p:empty {
    display: none !important;
}

.product-card-kov-body p {
    margin: 0;
}

/* Subtítulos de línea (refuerzo si el CDN no está actualizado) */
.kov-line-group:not(:first-child) {
    margin-top: clamp(2rem, 5vw, 3.25rem);
    padding-top: clamp(1.25rem, 3vw, 2rem);
}

.kov-line-group__title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: clamp(0.82rem, 1.9vw, 1rem);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #4a3720;
    margin: 0 0 clamp(1.15rem, 3vw, 1.65rem);
    padding: 0.55rem 0 0.55rem 1rem;
    border-left: 4px solid #c7933a;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(105deg, rgba(221, 164, 77, 0.14) 0%, rgba(255, 255, 255, 0) min(72%, 420px));
    line-height: 1.45;
}

.kov-line-group {
    margin-bottom: clamp(2rem, 4.5vw, 3rem);
}
