/* =========================================
   SINGLE PRODUCT
========================================= */

.sp-product {

    width: 100%;

}

.sp-product__columns {

    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;

}


/* =========================================
   COLUMNAS
========================================= */

.sp-product__gallery,
.sp-product__summary {

    min-width: 0;

}

/* =========================================
   GALERÍA DEL PRODUCTO
========================================= */

.sp-product__gallery .woocommerce-product-gallery {

    position: relative;
    width: 100%;

}


/* Imagen principal */
.sp-product__gallery
.woocommerce-product-gallery__image > a {

    display: block;
    overflow: hidden;

}

.sp-product__gallery
.woocommerce-product-gallery__image > a > img {

    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.35s ease;

}


/* zoom en hover */
.sp-product__gallery
.woocommerce-product-gallery__image > a:hover > img {

    transform: scale(1.09);

}


/* Lupa de zoom */
.sp-product__gallery
.woocommerce-product-gallery__trigger {

    position: absolute;
    top: 15px;
    right: 15px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background);
    border-radius: 50%;
    z-index: 20;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);

}


/* Ocultamos el emoji que genera WordPress */
.sp-product__gallery
.woocommerce-product-gallery__trigger img {

    display: none;

}


/* Dibujamos nuestra propia lupa */
.sp-product__gallery
.woocommerce-product-gallery__trigger span {

    position: relative;
    display: block;
    width: 16px;
    height: 16px;

}

/* =========================================
   MINIATURAS
========================================= */
.sp-product__gallery
.flex-control-thumbs {

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;

}


/* Cada miniatura */
.sp-product__gallery
.flex-control-thumbs li {

    flex: 0 0 calc(25% - 8px);
    width: calc(25% - 8px);
    margin: 0;
    padding: 0;
    list-style: none;

}

/* Imagen de miniatura */
.sp-product__gallery
.flex-control-thumbs li img {

    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0;
    cursor: pointer;
    border-radius: 6px;
    opacity: 0.65;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;

}

/* Miniatura activa */
.sp-product__gallery
.flex-control-thumbs li img.flex-active {

    opacity: 1;

}

/* Hover miniatura */
.sp-product__gallery
.flex-control-thumbs li img:hover {

    opacity: 1;
    transform: translateY(-2px);

}

/* =========================================
   TITULO DEL PRODUCTO
========================================= */


/* =========================================
   DESCRIPCIÓN LARGA DEL PRODUCTO
========================================= */

.sp-description {
    margin: 0 0 12px;
    color: var(--color-text);
}

p.caracteristicas-del-producto{
    font-size: 20px;
    color: var(--color-text);
    font-weight: 600;
    margin: 15px 0;
}

/* Lista de características */
.sp-description ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Cada característica */
.sp-description ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 9px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--color-text);
}

/* Check verde */
.sp-description ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-green);
    font-size: 16px;
    font-weight: 700;
}

/* Texto destacado */
.sp-description ul li strong {
    color: var(--color-text);
    font-weight: 600;
}

/* =========================================
  Contenedor gris - info venta
========================================= */
.informacion-compra{

    background-color: #F0F2F5;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;

}

/* =========================================
   Precio del producto
========================================= */
.precio, p.precio-por-cantidad{

    font-size:28px;
    color:var(--color-red);
    font-weight: 700;
    margin: 0;

}


/*
==========================================
BTN AGREGAR AL CARRITO
==========================================
*/

div.agregar-al-carrito button.single_add_to_cart_button.button.alt{

    background-color: var(--color-green);
    border-color: var(--button-border);
    color: var(--button-text);
    padding: 10px 16px;
    font-size: 18px;
    line-height: 1.3333333;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;

}

/* BOTÓN AGREGAR AL CARRITO DESHABILITADO */
div.agregar-al-carrito button.single_add_to_cart_button.button.alt.disabled {

    background-color: #e0e0e0;
    border-color: #e0e0e0;
    color: #888;

}

/*============================================
    Que el input y el botón estén en la misma línea, en el btn del producto sin variacion y con variaciones
    * tienen diferentes clases.
==============================================*/
div.agregar-al-carrito div.woocommerce-variation-add-to-cart{
    display: flex; 
    gap: 6px;

}
/* estilo de la cajita quantity */
div.quantity input.input-text{

    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 8px 12px;
    background-color: #ffffff84;
    margin-bottom: 5px;

}
/* =========================================
   ATRIBUTOS DEL PRODUCTO
========================================= */
/* Ocultamos el label y el select */
.variations select#pa_color,
.variations select#pa_talles,
table.variations th.label {

    display: none;

} 

table,
td,
th {
    border: 1px solid transparent;
    margin: 0;
}

/* COLOR: circulos de opcion  */
.color-swatches {

    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;

}

.color-swatch {

    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    border: 2px solid #d5d5d5;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
    box-sizing: border-box;

}

.color-swatch:hover {

    transform: scale(1.05);

}

.color-swatch.active {

    border-color: #1a1a1a;
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 4px #1a1a1a;

}
/* TALLES: cajitas */
.size-swatches {

    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;

}

.size-swatch {

    min-width: 44px;
    height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;

}

.size-swatch:hover {

    border-color: #1a1a1a;

}

.size-swatch.active {

    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;

}

/* div info comercial donde los datos de venta se consumen desde la api */
.info-comercial {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-comercial-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Iconos SVG */
.info-comercial-item svg, div.stock-permanente svg {
    width: 20px;
    height: 20px;
    flex: 0 0 24px;
}

/* Logo Mercado Pago */
.info-comercial-item img {
    width: 42px;
    height: 30px;
    object-fit: contain;
    flex: 0 0 24px;
}

/* Texto */
.info-comercial-item span {
    display: block;
}

/* Tamaño general de los iconos */
.info-comercial-item svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

/* Stock permanente */
.stock-permanente .info-comercial-item svg {
    color: var(--color-green);
}

/* Sucursal */
.info-comercial .info-comercial-item:nth-child(1) svg {
    color: var(--color-yellow);
}

/* Envío */
.info-comercial .info-comercial-item:nth-child(2) svg {
    color: var(--color-azul);
}

/* Tarjetas */
.info-comercial .info-comercial-item:nth-child(4) svg,
.info-comercial .info-comercial-item:nth-child(5) svg {
    color: var(--color-primary);
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .sp-product__gallery
    .flex-control-thumbs {

        gap: 8px;

    }

    .sp-product__gallery
    .flex-control-thumbs li {

        flex: 0 0 calc(25% - 6px);
        width: calc(25% - 6px);
    
    }

}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .sp-product__columns {

        grid-template-columns: 1fr;
        gap: 30px;
    
    }

}