/***************************************************************/
/*  SINGLE PRODUCT - HERO SECTION
/***************************************************************/

/* LAYOUT DE DOS COLUMNAS - CONTENEDOR PRINCIPAL */
body.woocommerce .kpn-product-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 40px;
    align-items: stretch !important; /* Cambiado de flex-start a stretch para igualar alturas */
    margin-bottom: 40px;
}

body.woocommerce .kpn-product-container .kpn-product-gallery {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Sin altura fija - deja que el contenido determine la altura */
}

body.woocommerce .kpn-product-container .summary {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* GALERÍA DE PRODUCTOS ESTILO MANGO/H&M */
body.woocommerce .kpn-product-gallery .kpn-main-image-container,
body.woocommerce .kpn-product-gallery .kpn-thumbnails-container {
    width: 100%;
}

body.woocommerce .kpn-main-image-container {
    position: relative;
    width: 100%;
    /*aspect-ratio: 1;*/
    overflow: hidden;
    border-radius: 8px;
    background-color: #f8f8f8;
}

body.woocommerce .kpn-main-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

body.woocommerce .kpn-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

body.woocommerce .kpn-main-image:hover {
    transform: scale(1.05);
}

.kpn-main-image-btn,
.kpn-thumbnail-btn{
    padding: 0;
    border: none;
    background-color: unset;
}

/*body.woocommerce .kpn-zoom-icon {*/
/*    position: absolute;*/
/*    top: 16px;*/
/*    right: 16px;*/
/*    background: rgba(255, 255, 255, 0.9);*/
/*    border-radius: 50%;*/
/*    width: 40px;*/
/*    height: 40px;*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    opacity: 0;*/
/*    transition: opacity 0.3s ease;*/
/*    pointer-events: none;*/
/*}*/

/*body.woocommerce .kpn-main-image-container:hover .kpn-zoom-icon {*/
/*    opacity: 1;*/
/*}*/

/* CURSOR PERSONALIZADO PARA GALERÍA */
body.woocommerce .kpn-product-gallery,
body.woocommerce .kpn-product-gallery *,
body.woocommerce .kpn-main-image-container,
body.woocommerce .kpn-main-image-container *,
body.woocommerce .kpn-main-image-btn,
body.woocommerce .kpn-thumbnail-btn {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><circle cx="16" cy="16" r="14" fill="%23666666" fill-opacity="0.8"/><path d="M16 8V24M8 16H24" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') 16 16, auto !important;
}

/*body.woocommerce .kpn-zoom-icon svg {*/
/*    color: #333;*/
/*}*/

/* THUMBNAILS - MISMO TAMAÑO QUE IMAGEN PRINCIPAL */
body.woocommerce .kpn-thumbnails-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

body.woocommerce .kpn-thumbnail-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

/*body.woocommerce .kpn-thumbnail-item.active {*/
/*    border-color: #000;*/
/*}*/

body.woocommerce .kpn-thumbnail-btn {
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: block;
    position: relative;
}

body.woocommerce .kpn-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

body.woocommerce .kpn-thumbnail-btn:hover .kpn-thumbnail-image {
    transform: scale(1.02);
}

body.woocommerce .kpn-thumbnail-btn:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Estilo de scroll personalizado */
body.woocommerce .kpn-product-gallery::-webkit-scrollbar {
    width: 8px;
}

body.woocommerce .kpn-product-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

body.woocommerce .kpn-product-gallery::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

body.woocommerce .kpn-product-gallery::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* RESPONSIVE - OCULTAR/MOSTRAR VERSIONES */
@media (max-width: 1023px) {
    /* Layout de una sola columna para mobile */
    body.woocommerce .kpn-product-container {
        flex-direction: column !important;
        gap: 24px !important;
    }

    /* Galería mobile ocupa 100% */
    body.woocommerce .kpn-product-gallery.kpn-mobile-gallery {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    /* Summary mobile ocupa 100% */
    body.woocommerce .kpn-product-container .summary {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        position: static !important; /* Remover sticky en mobile */
        align-self: auto !important;
    }

    /* Ocultar versión desktop */
    body.woocommerce .kpn-desktop-gallery {
        display: none !important;
    }

    /* Mostrar versión mobile */
    body.woocommerce .kpn-mobile-gallery {
        display: block;
    }
}

@media (min-width: 1024px) {
    /* Layout de dos columnas para desktop */
    body.woocommerce .kpn-product-container {
        flex-direction: row !important;
        gap: 40px !important;
    }

    /* Galería desktop ocupa 50% */
    body.woocommerce .kpn-product-gallery.kpn-desktop-gallery {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    /* Summary desktop ocupa 50% con sticky */
    body.woocommerce .kpn-product-container .summary {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        position: sticky !important;
        top: 20px !important;
        align-self: flex-start !important;
    }

    /* Mostrar versión desktop */
    body.woocommerce .kpn-desktop-gallery {
        display: flex;
    }

    /* Ocultar versión mobile */
    body.woocommerce .kpn-mobile-gallery {
        display: none !important;
    }
}

/* ESTILOS CARRUSEL MOBILE */
body.woocommerce .kpn-mobile-gallery {
    display: none; /* Oculto por defecto, se muestra en mobile */
    margin-bottom: 24px;
}

body.woocommerce .kpn-product-swiper {
    position: relative;
    width: 100%;
}

body.woocommerce .kpn-mobile-slide {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f8f8f8;
}

body.woocommerce .kpn-mobile-slide-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
}

body.woocommerce .kpn-mobile-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

body.woocommerce .kpn-mobile-slide-btn:hover .kpn-mobile-slide-image {
    transform: scale(1.02);
}

/* Navegación del carrusel */
body.woocommerce .kpn-swiper-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    padding: 0 20px;
}

body.woocommerce .kpn-swiper-prev,
body.woocommerce .kpn-swiper-next {
    width: 24px;
    height: 24px;
    aspect-ratio: 1/1;
    background: unset;
    border: unset;
}

body.woocommerce .kpn-swiper-prev:hover,
body.woocommerce .kpn-swiper-next:hover {
    /*background: var(--gray-300);*/
    transform: scale(1.05);
}

body.woocommerce .kpn-swiper-prev.swiper-button-disabled,
body.woocommerce .kpn-swiper-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

body.woocommerce .kpn-swiper-prev.swiper-button-disabled:hover,
body.woocommerce .kpn-swiper-next.swiper-button-disabled:hover {
    transform: none;
}

body.woocommerce .kpn-swiper-prev svg,
body.woocommerce .kpn-swiper-next svg {
    color: #333;
    width: 24px;
    height: 24px;
}

/* Ocultar paginación de Swiper (no queremos paginación) */
body.woocommerce .kpn-product-swiper .swiper-pagination {
    display: none !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    body.woocommerce .kpn-thumbnails-container {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 6px;
    }

    /*body.woocommerce .kpn-zoom-icon {*/
    /*    top: 12px;*/
    /*    right: 12px;*/
    /*    width: 32px;*/
    /*    height: 32px;*/
    /*}*/

    body.woocommerce .kpn-swiper-navigation {
        gap: 16px;
        margin-top: 12px;
        padding: 0 16px;
    }

    body.woocommerce .kpn-swiper-prev,
    body.woocommerce .kpn-swiper-next {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    body.woocommerce .kpn-product-gallery {
        gap: 12px;
        margin-bottom: 24px;
    }

    body.woocommerce .kpn-thumbnails-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }

    body.woocommerce .kpn-swiper-navigation {
        gap: 12px;
        margin-top: 8px;
        padding: 0 12px;
    }

    body.woocommerce .kpn-swiper-prev,
    body.woocommerce .kpn-swiper-next {
        width: 36px;
        height: 36px;
    }

    body.woocommerce .kpn-swiper-prev svg,
    body.woocommerce .kpn-swiper-next svg {
        width: 20px;
        height: 20px;
    }
}

/* OCULTAR GALERÍA WOOCOMMERCE POR DEFECTO */
body.woocommerce .woocommerce-product-gallery,
body.woocommerce .woocommerce-product-gallery__wrapper,
body.woocommerce .woocommerce-product-gallery__image,
body.woocommerce .woocommerce-product-gallery__trigger {
    display: none !important;
}

body.woocommerce .product .images,
body.woocommerce .single-product div.images {
    display: none !important;
}

/* BARRA DE SCROLL VISIBLE EN LA GALERÍA */
body.woocommerce .kpn-product-gallery::-webkit-scrollbar {
    width: 8px;
}

body.woocommerce .kpn-product-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

body.woocommerce .kpn-product-gallery::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

body.woocommerce .kpn-product-gallery::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Forzar layout de contenido completo */
body.single-product .site-content,
body.single-product .content-area,
body.single-product #primary,
body.woocommerce.single-product .site-content,
body.woocommerce.single-product .content-area,
body.woocommerce.single-product #primary {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

/* LIGHTBOX ESTILOS */
body.woocommerce .kpn-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.woocommerce .kpn-lightbox[style*="flex"] {
    opacity: 1;
}

body.woocommerce .kpn-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.woocommerce .kpn-lightbox-image-container {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.woocommerce .kpn-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

/* Botones de navegación */
body.woocommerce .kpn-lightbox-close,
body.woocommerce .kpn-lightbox-prev,
body.woocommerce .kpn-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 16px;
    color: var(--black);
}

body.woocommerce .kpn-lightbox-close:hover,
body.woocommerce .kpn-lightbox-prev:hover,
body.woocommerce .kpn-lightbox-next:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

body.woocommerce .kpn-lightbox-close {
    top: 20px;
    right: 20px;
}

body.woocommerce .kpn-lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

body.woocommerce .kpn-lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

body.woocommerce .kpn-lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

body.woocommerce .kpn-lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Contador de imágenes */
body.woocommerce .kpn-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Responsive para lightbox */
@media (max-width: 768px) {
    body.woocommerce .kpn-lightbox-close,
    body.woocommerce .kpn-lightbox-prev,
    body.woocommerce .kpn-lightbox-next {
        width: 40px;
        height: 40px;
    }

    body.woocommerce .kpn-lightbox-close {
        top: 10px;
        right: 10px;
    }

    body.woocommerce .kpn-lightbox-prev {
        left: 10px;
    }

    body.woocommerce .kpn-lightbox-next {
        right: 10px;
    }

    body.woocommerce .kpn-lightbox-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

body.woocommerce .woocommerce-breadcrumb {
    display: none;
}

body.woocommerce .single-product-catalog .woocommerce-breadcrumb {
    display: block;
}


/****************************************************************/
/*  ESTILOS PARA EL SUMMARY SECTION DE PRODUCTOS
/****************************************************************/

body.woocommerce .summary .kpn-bc {
    display: block;
}

body.woocommerce .kpn-product-container .summary {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

body.woocommerce .summary .product-price,
body.woocommerce .summary .product-price .price{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

body.woocommerce .summary .product-price ins .amount {
    color: #090909;
    /* Desktop/Heading/H3 */
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: 30px; /* 125% */
    letter-spacing: 1px;
}
body.woocommerce .summary .product-price del {
    color: #919191;
    text-align: right;

    /* Desktop/Text/body-small */
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.5px;
    text-decoration-line: line-through;
}

body.woocommerce .summary .product-inner__title {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

body.woocommerce .summary .product-price span.text-caption {
    display: none;
}
body.woocommerce .summary form.variations_form.cart {
    margin-bottom: 0;
}
body.woocommerce .summary form .variations tbody tr {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

body.woocommerce .summary form.variations_form .variations tbody tr th {
    padding: 0;
}

body.woocommerce .summary form.variations_form .variations tbody tr th label {
    color: #2B2B2B;

    /* Desktop/Text/body-small */
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.5px;
}

body.woocommerce .summary form .variations tbody tr td.value,
body.woocommerce .summary form .variations tbody tr td.value select {
    width: 100%;
}

body.woocommerce .summary form .variations tbody tr td.value select {
    border-color: var(--gray-700);
}
body.woocommerce .summary form.cart {
    display: flex;
    flex-direction: column;
}
body.woocommerce .summary form .quantity {
    flex: 1;
    display: none;
}

body.woocommerce .summary form button[type="submit"] {
    color: var(--white);
    background-color: var(--primary);
    flex: 2;
}

body.woocommerce .summary form button[type="submit"]:hover {
    color: #ffffff;
    background-color: var(--gray-900);
    text-decoration: underline;
}

/* ACF - ESTILOS EN SUMMARY */
.product-available-shipping-note p.text-body{

/* Desktop/Text/Body */
    font-style: normal;
    font-weight: 700;
    line-height: 26px; /* 162.5% */
    letter-spacing: 0.5px;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

body.woocommerce .summary .product-installments {
    color: #006C8B;
    border-radius: 8px;
    border-left: 5px solid;
    max-width: fit-content;
    padding: 10px;
    background: linear-gradient(0deg, rgba(0, 108, 139, 0.10) 0%, rgba(0, 108, 139, 0.10) 100%), #FFF;
}

/*body.woocommerce .summary .product-installments p {*/
/*    color: var(--gray-700);*/
/*}*/

@media (max-width: 768px) {
    body.woocommerce .kpn-bc.bc-before-gallery {
        padding-bottom: 16px;
    }

    body.woocommerce .sp-hero.sp-hero--split {
        padding: 16px 0;
    }

    body.woocommerce .summary .product-inner__title {
        gap: 20px;
    }
}

@media (max-width: 480px) {


    body.woocommerce .sp-hero.sp-hero--split {
        flex-direction: column;
        padding: 16px 0;
    }

    body.woocommerce .summary .product-price del {
        font-size: 12px;
    }

    body.product-template-default .woocommerce-breadcrumb {
        display: block;
    }

    body.woocommerce .summary .kpn-bc {
        display: none;
    }

    body.woocommerce .summary .product-inner__title {
        gap: 8px;
    }
}


/****************************************************************/
/*  SINGLE PRODUCT CARACTERISTICAS  -  ESTILOS GENERALES
/****************************************************************/

body.woocommerce .kpn-features {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 56px auto 0;
    width: 100%;
}

body.woocommerce .kpn-features .kpn-features__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 40px;
}

body.woocommerce .kpn-features .kpn-features__grid .kpn-feature {
    display: flex;
    width: 100%;
    max-width: 556px;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

body.woocommerce .kpn-features .kpn-features__grid .kpn-feature .kpn-feature__media {
    display: flex;
    flex: 1 0 auto;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    max-width: 270px;
    max-height: 270px;
}

body.woocommerce .kpn-features .kpn-features__grid .kpn-feature .kpn-feature__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    flex: 1 0 0;
}

body.woocommerce .kpn-features .kpn-features__grid .kpn-feature .kpn-feature__media .kpn-feature__img {
    width: 100%;
    height: 100%;
}

@media (max-width: 1024px){
    body.woocommerce .kpn-features .kpn-features__grid .kpn-feature {
        flex-direction: column;
        gap: 20px;
    }
}
@media (max-width: 768px) {
    body.woocommerce .kpn-features .kpn-features__grid {
        grid-template-columns: 1fr 1fr;
    }

    body.woocommerce .kpn-features .kpn-features__grid .kpn-feature .kpn-feature__media {
        max-width: 100%;
        max-height: 160px;
    }

    body.woocommerce .kpn-features .kpn-features__grid .kpn-feature .kpn-feature__media .kpn-feature__img {
        object-fit: cover;
    }
}


@media (max-width: 480px) {
    body.woocommerce .kpn-features.carousel-container {
        overflow: hidden;
    }

    body.woocommerce .kpn-features .kpn-features__grid {
        gap: 0;
    }

    body.woocommerce .kpn-features .kpn-features__grid.carousel-wrapper {
        display: flex;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    body.woocommerce .kpn-features .kpn-features__grid .kpn-feature.carousel-slide {
        flex-shrink: 0;
        width: 100%;
        box-sizing: border-box;
    }
}

/**
    PRODUCT SUMMARY TABS - ESTILOS
 */


body.woocommerce .product-tabs-container .product-tabs-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 0;
    gap: 0;
    transition: all 200ms ease-in-out;
}

body.woocommerce .product-tabs-container .product-tabs-item .product-tabs-title {
    padding: 16px 0;
}

body.woocommerce .product-tabs-container .product-tabs-item.active {
    padding: 16px 0;
    gap: 16px
}

body.woocommerce .product-tabs-container .product-tabs-item.active .product-tabs-title {
    padding: 0;
}


body.woocommerce .product-tabs-container .product-tabs-item:not(:last-child) {
    border-bottom: 1px solid #E4E4E4;
}

body.woocommerce .product-tabs-container .product-tabs-item .product-tabs-title {
    text-transform: uppercase;
    position: relative;
}

body.woocommerce .product-tabs-container .product-tabs-item .product-tabs-title::before {
    content: "+";
    position: absolute;
    top: 40%;
    right: 0;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
}

body.woocommerce .product-tabs-container .product-tabs-item.active .product-tabs-title::before {
    content: "-";
}

body.woocommerce .product-tabs-container .product-tabs-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

body.woocommerce .product-tabs-container .product-tabs-item[aria-expanded="true"].active .product-tabs-content {
    opacity: 1;
}

@media (max-width: 768px) {

}

@media (max-width: 540px) {
    body.woocommerce .product-tabs-container {
        margin-top: 24px;
    }
}