/* =========================================================
   SINGLE PRODUCT – SAMOM
   Estilo profesional
   =======================================================*/


/* Reset del layout viejo de WooCommerce para usar GRID */
.single-product .woocommerce-product-gallery,
.single-product .summary {
    float: none !important;
    width: 100% !important;
    margin: 0;
    padding: 0;
}


.single-product .samom-product-single {
    max-width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

/* 1) GALERÍA */
.single-product .woocommerce-product-gallery {
    position: relative;
}

.single-product .woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.single-product .flex-control-nav {
    display: flex !important;
    gap: 10px;
    margin-top: 15px !important;
}

.single-product .flex-control-nav img {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid transparent;
    transition: 0.2s ease;
}

.single-product .flex-control-nav li img.flex-active {
    border-color: #000;
}

/* MINIATURAS DE GALERÍA POR VARIACIÓN */
.single-product .samom-var-thumbs {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.single-product .samom-thumb {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
}

.single-product .samom-thumb img {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.single-product .samom-thumb:hover img {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}


/* Zoom */
.single-product .woocommerce-product-gallery__trigger {
    right: 10px !important;
    top: 10px !important;
}

/* 2) SUMMARY (Título, Precios y Botones) */
.single-product .summary.entry-summary {
    padding-top: 20px;
}

.single-product .product_title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* --- NUEVO ESTILO DE PRECIOS (Igual a Product Card) --- */

/* Contenedor del precio de WooCommerce */
.single-product .summary p.price {
    display: flex;
    flex-direction: column; /* Apila tachado y nuevo verticalmente */
    align-items: flex-start;
    margin-bottom: 8px;
    opacity: 1 !important;
    line-height: 1.2;
}

/* Precio Original (Tachado) - Si hay oferta */
.single-product .summary p.price del {
    font-size: 16px;
    color: #999;
    font-weight: 400;
    margin-bottom: 4px;
    text-decoration: line-through;
    opacity: 1;
    display: block;
}

/* Precio Actual (El Grande) */
.single-product .summary p.price ins, 
.single-product .summary p.price > .woocommerce-Price-amount {
    font-family: 'Arial', sans-serif; /* O tu fuente principal */
    font-size: 32px; /* Más grande que en la tarjeta para jerarquía */
    font-weight: 800;
    color: #000;
    text-decoration: none;
    margin: 0;
}

/* Limpieza de etiquetas internas de Woo */
.single-product .summary p.price bdi {
    font-style: normal;
}

/* --- PROMO TRANSFERENCIA (Debajo del precio) --- */
.single-product .samom-transfer-promo {
    display: block;
    margin-bottom: 20px; /* Espacio antes de la descripción o carrito */
    padding: 0;
    background: transparent;
    border: none;
}

.single-product .samom-transfer-promo .promo-tag,
.single-product .samom-transfer-promo .promo-final {
    display: block; /* Uno abajo del otro */
    font-size: 15px; /* Un poco más grande que en la tarjeta */
    font-weight: 600;
    color: #2e7d32; /* El mismo verde "banco" */
    line-height: 1.5;
}

/* Pequeño icono de rayo o texto destacado */
.single-product .samom-transfer-promo .promo-tag {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
    font-weight: 700;
}

/* --- FIN NUEVOS PRECIOS --- */


.single-product .woocommerce-product-details__short-description {
    margin: 20px 0;
    font-size: 16px;
    line-height: 1.6;
}

.single-product form.cart {
    margin-top: 20px;
}

.single-product .single_add_to_cart_button {
    background-color: #ff4081 !important;
    padding: 14px 26px;
    font-size: 16px !important;
    border-radius: 8px;
    transition: 0.2s;
}

.single-product .single_add_to_cart_button:hover {
    opacity: .85;
}

/* 3) TABS – convertimos en acordeón */
.single-product .woocommerce-tabs {
    margin-top: 50px;
}

.single-product .woocommerce-tabs .wc-tabs {
    display: none !important; /* oculto tabs viejo */
}

.single-product .wc-tab {
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 10px;
    background: #f6f6f6;
    cursor: pointer;
}

.single-product .wc-tab h2 {
    margin: 0;
    font-size: 18px;
}

/* contenido oculto */
.single-product .wc-tab .tab-content {
    margin-top: 10px;
    display: none;
    font-size: 15px;
    line-height: 1.6;
}

/* activo */
.single-product .wc-tab.active {
    background: #e9e9e9;
}

.single-product .wc-tab.active .tab-content {
    display: block;
}

/* 4) RELACIONADOS */
.single-product .related {
    margin-top: 60px;
}

.single-product .related h2 {
    font-size: 26px;
    margin-bottom: 20px;
}

/* 5) RESPONSIVE */
@media (max-width: 940px) {
    .single-product .samom-product-single {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .single-product .woocommerce-product-gallery__image img {
        border-radius: 6px;
    }
}


/* ======== GALERÍA LATERAL ======== */

.samom-gallery-wrapper {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 30px;
}

.samom-thumbs-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.samom-thumbs-left button {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.samom-thumbs-left img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
}

.samom-thumbs-left button.active img {
    border-color: #111;
}

.samom-main-image-area {
    position: relative;
}

.samom-main-image img {
    width: 100%;
    border-radius: 10px;
}

/* Flechas */
.samom-prev,
.samom-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,.2);
    cursor: pointer;
    font-size: 22px;
    text-align: center;
    line-height: 38px;
}

.samom-prev { left: 10px; }
.samom-next { right: 10px; }

/* Responsive */
@media(max-width: 768px){
    .samom-gallery-wrapper {
        grid-template-columns: 70px 1fr;
    }
    .samom-thumbs-left img {
        width: 70px;
        height: 70px;
    }
}


/* ======== LUPA (ZOOM) ======== */

.samom-main-image-area {
    position: relative;
}

.samom-zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 0 6px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 16px;
    line-height: 34px;
    text-align: center;
    padding: 0;
}

/* ======== MODAL / LIGHTBOX ======== */

.samom-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.samom-lightbox.is-open {
    display: flex;
}

.samom-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
}

.samom-lightbox-inner {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.samom-lightbox-inner img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

/* botones del modal */
.samom-lightbox-close,
.samom-lightbox-prev,
.samom-lightbox-next {
    position: absolute;
    border: none;
    background: rgba(255,255,255,0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 22px;
    line-height: 40px;
    text-align: center;
}

.samom-lightbox-close {
    top: -50px;
    right: 0;
}

.samom-lightbox-prev {
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
}

.samom-lightbox-next {
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .samom-lightbox-prev {
        left: 5px;
    }
    .samom-lightbox-next {
        right: 5px;
    }
    .samom-lightbox-close {
        top: 10px;
        right: 10px;
    }
}


/* --- Ocultamos los selects originales, pero siguen en el DOM --- */
.single-product select.samom-hidden-select {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* --- COLORES CON IMAGEN --- */
.single-product .samom-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.single-product .samom-color-swatch {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
}

.single-product .samom-color-swatch img {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: cover;
}

.single-product .samom-color-swatch.is-active {
    border-color: #111;
}

/* --- TALLES EN CUADRADOS --- */
.single-product .samom-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.single-product .samom-size-option {
    min-width: 46px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgb(238,47,96);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
}

.single-product .samom-size-option.is-active{
    background: rgb(238,47,96);         
    color: #fff;
    border-color: rgb(238,47,96);

    transform: translateY(-1px);
    font-weight: 600;
}


.single-product .samom-size-option.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}



/* =========================================================
   5) PRODUCTOS RELACIONADOS
   =======================================================*/

.single-product .related {
    max-width: 1200px;
    margin: 60px auto 40px;
    padding: 0 20px;
}

.single-product .related > h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 22px;
}

/* Grilla */
.single-product .related ul.products {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}


/* Card del producto */
.single-product .related ul.products li.product {

    /* RESET de Woo */
    float: none !important;
    width: auto !important;
    margin: 0 !important;


    background: #fff;
    border-radius: 14px;
    padding: 14px 14px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.single-product .related ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.10);
}

/* Imagen */
.single-product .related ul.products li.product a.woocommerce-LoopProduct-link img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.single-product .related ul.products li.product:hover a.woocommerce-LoopProduct-link img {
    transform: scale(1.02);
}

/* Título */
.single-product .related ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px;
    font-weight: 500;
    margin: 6px 0 4px;
}

/* Precio */
.single-product .related ul.products li.product .price {
    font-size: 15px;
    font-weight: 600;
    color: #b5aa00;
    margin-bottom: 10px;
}

/* Botón */
.single-product .related ul.products li.product a.button {
    margin-top: auto;
    align-self: flex-start;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 999px;
    background: #ff4081;
    color: #fff;
    border: none;
    text-decoration: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.single-product .related ul.products li.product a.button:hover {
    opacity: .9;
    transform: translateY(-1px);
}

/* Relacionados a lo ancho de las 2 columnas del grid */
.single-product .samom-product-single .related {
    grid-column: 1 / -1;   /* ocupa de la col 1 hasta la última */
    max-width: none;
    margin: 60px 0 40px;
    padding: 0;
}

/* Quitar el pseudo-elemento vacío que deja el hueco */
.single-product .related ul.products::before,
.single-product .related ul.products::after {
    content: none !important;
    display: none !important;
}



/* Responsive */
@media (max-width: 1024px) {
    .single-product .related ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .single-product .related ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 520px) {
    .single-product .related ul.products {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   6) ACORDEÓN INFO EXTRA (debajo del botón)
   =======================================================*/

.single-product .samom-extra-info {
    margin-top: 24px;
    border-top: 1px solid #e5e5e5;
}

.single-product .samom-extra-item {
    border-bottom: 1px solid #e5e5e5;
}

/* Cabecera de cada fila */
.single-product .samom-extra-header {
    width: 100%;
    padding: 10px 0;
    background: transparent;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Iconito de flecha */
.single-product .samom-extra-icon::before {
    content: "▾";          /* flechita hacia abajo */
    display: inline-block;
    transition: transform 0.15s ease;
    font-size: 14px;
}

.single-product .samom-extra-item.is-open .samom-extra-icon::before {
    transform: rotate(180deg);   /* flechita hacia arriba */
}

/* Cuerpo de la fila */
.single-product .samom-extra-body {
    padding: 0 0 12px;
    font-size: 14px;
    line-height: 1.7;
}

.single-product .samom-size-option.is-disabled{
    display: none;
}