/* ==========================================================================
   ESTILOS ESTRUCTURALES DE TIENDA - GOOLS
   Hereda colores y fuentes desde :root en Apariencia -> CSS adicional
   ========================================================================== */

/* Tipografía base en toda la tienda, carruseles y checkout */
body, button, input, select, textarea,
.gools-cat-title, .gools-prod-title, .gools-prod-price {
    font-family: var(--gools-font-body, 'DM Sans', sans-serif) !important;
}

/* Títulos principales */
h1, h2, h3, .elementor-heading-title {
    font-family: var(--gools-font-heading, 'Tenor Sans', sans-serif) !important;
    font-weight: 400 !important;
    letter-spacing: 1.5px;
}

/* ==========================================================================
   1. GLOBALES: ANIMACIONES
   ========================================================================== */
.anuncio-parpadeo {
    animation: destello-suave 3s ease-in-out infinite;
}
@keyframes destello-suave {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* ==========================================================================
   2. TIENDA, CATEGORÍAS Y CATÁLOGO BASE
   ========================================================================== */
.woocommerce ul.products li.product-category .woocommerce-loop-category__title {
    text-align: center !important;
    font-family: var(--gools-font-body, 'DM Sans', sans-serif) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--gools-primary) !important;
    letter-spacing: 0.5px !important;
}
.woocommerce ul.products li.product-category mark.count {
    display: none !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    font-family: var(--gools-font-body, 'DM Sans', sans-serif) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--gools-primary) !important;
    line-height: 1.35 !important;
}
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price .amount {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    color: #111111 !important;
    font-family: var(--gools-font-body, 'DM Sans', sans-serif) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
}
.woocommerce ul.products li.product .button {
    display: none !important;
}
.woocommerce ul.products li.product a img {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background-color: #ffffff !important;
    padding: 8px;
}

/* ==========================================================================
   3. PÁGINA DE PRODUCTO INDIVIDUAL Y RELACIONADOS
   ========================================================================== */
.woocommerce.single-product .site-main {
    margin-top: 20px !important;
}
.woocommerce div.product .woocommerce-tabs {
    display: none !important;
}
.woocommerce div.product .summary p.price,
.woocommerce div.product .summary span.price {
    font-size: 24px !important;
    color: #000000 !important;
    font-weight: 500 !important;
}
.woocommerce div.product p.stock,
.woocommerce div.product .stock.in-stock {
    color: #777777 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

/* Variaciones */
.woocommerce div.product form.cart table.variations,
.woocommerce div.product form.cart table.variations tbody,
.woocommerce div.product form.cart table.variations tr,
.woocommerce div.product form.cart table.variations th,
.woocommerce div.product form.cart table.variations td {
    display: block !important;
    width: 100% !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}
.woocommerce div.product form.cart .variations th.label,
.woocommerce div.product form.cart .variations td.label,
.woocommerce div.product form.cart .variations .label label,
.woocommerce div.product form.cart .variations label {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    color: #333333 !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
}
.woocommerce div.product form.cart table.variations td.value {
    margin-bottom: 25px !important;
    display: block !important;
}

/* Contenedor de compra y botón Añadir al carrito */
.woocommerce div.product form.cart .single_variation_wrap .woocommerce-variation-add-to-cart,
.woocommerce div.product form.cart .cart {
    display: flex !important;
    align-items: stretch !important;
    margin-top: 20px !important;
    gap: 12px !important;
}
.woocommerce div.product form.cart .button {
    height: 48px !important;
    padding: 0 32px !important;
    background-color: var(--gools-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    letter-spacing: 0.4px !important;
    text-transform: none !important;
    transition: background-color 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}
.woocommerce div.product form.cart .button:hover {
    background-color: var(--gools-secondary) !important;
}

/* Foto principal cuadrada 1:1 sin recortar */
.woocommerce div.product div.images .woocommerce-product-gallery__image img {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background-color: #ffffff !important;
}

/* Selector de variaciones estilo Vista Rápida Gools */
.woocommerce div.product form.cart table.variations select {
    width: 100% !important;
    height: 46px !important;
    padding: 0 14px !important;
    border: 1px solid var(--gools-primary) !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    color: #222222 !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Botón Añadir al carrito desactivado */
.woocommerce div.product form.cart .button.disabled,
.woocommerce div.product form.cart .button.wc-variation-selection-needed {
    background-color: var(--gools-soft-bg) !important;
    color: var(--gools-secondary) !important;
    border: 1px solid var(--gools-secondary) !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

/* Productos relacionados */
.woocommerce div.product .related.products {
    clear: both !important;
    width: 100% !important;
    float: none !important;
    padding-top: 40px !important;
    margin-top: 40px !important;
    border-top: 1px solid #eeeeee !important;
}
.woocommerce div.product .related.products ul.products li.product {
    text-align: center !important;
}
.woocommerce div.product .related.products p.price,
.woocommerce div.product .related.products span.price {
    font-size: 18px !important;
    color: #000000 !important;
    font-weight: 400 !important;
}

/* ==========================================================================
   4. CHECKOUT: ESTRUCTURA MAESTRA Y FORMULARIOS
   ========================================================================== */
.woocommerce-checkout .entry-title,
.woocommerce-checkout h1.page-title {
    visibility: hidden !important;
    height: 0 !important;
    margin-bottom: 50px !important;
}
@media (min-width: 992px) {
    .woocommerce-checkout form.checkout {
        display: grid !important;
        grid-template-columns: 55% 40% !important;
        justify-content: space-between !important;
        align-items: start !important;
    }
    .woocommerce-checkout #customer_details {
        grid-column: 1 !important;
        grid-row: 1 / 3 !important;
        width: 100% !important;
        margin: 0 !important;
    }
    .woocommerce-checkout #order_review_heading {
        grid-column: 2 !important;
        grid-row: 1 !important;
        width: 100% !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 30px !important;
    }
    .woocommerce-checkout #order_review {
        grid-column: 2 !important;
        grid-row: 2 !important;
        width: 100% !important;
        clear: none !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        width: 100% !important;
        float: none !important;
    }
}
.woocommerce-checkout .form-row {
    width: 100% !important;
    float: none !important;
    margin-bottom: 15px !important;
}
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    background-color: #ffffff !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 4px !important;
    padding: 12px 15px !important;
    color: #333333 !important;
    box-shadow: none !important;
}
.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row select:focus {
    border-color: var(--gools-primary) !important;
    outline: none !important;
}
.woocommerce-checkout .form-row label {
    font-weight: 600 !important;
    color: #111111 !important;
    margin-bottom: 5px !important;
}
.woocommerce form .form-row .optional,
.woocommerce-additional-fields > h3 {
    display: none !important;
}

/* ==========================================================================
   5. CHECKOUT: TABLA "TU PEDIDO", ENVÍOS, TOTALES Y TASA BCV
   ========================================================================== */
.woocommerce-checkout #order_review table.shop_table {
    border: 1px solid #e0e0e0 !important;
    border-collapse: collapse !important;
    border-radius: 0 !important;
    padding: 20px !important;
    display: block !important;
    background-color: transparent !important;
}
.woocommerce-checkout #order_review table.shop_table th,
.woocommerce-checkout #order_review table.shop_table td {
    border: none !important;
    background-color: transparent !important;
    padding: 15px 20px !important;
}
.woocommerce-checkout #order_review table.shop_table thead th {
    border-bottom: 1px solid #d1d1d1 !important;
    padding-bottom: 15px !important;
    font-family: inherit !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #111111 !important;
    text-transform: none !important;
}
.woocommerce-checkout #order_review table.shop_table thead th:last-child,
.woocommerce-checkout #order_review table.shop_table tbody td.product-total,
.woocommerce-checkout #order_review table.shop_table tfoot tr.cart-subtotal td,
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total td,
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total-bs td,
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-tasa-bcv td {
    text-align: right !important;
}
.woocommerce-checkout #order_review table.shop_table tbody td.product-name {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 99% !important;
    padding-right: 5px !important;
    font-size: 14px !important;
    color: #555555 !important;
}
.woocommerce-checkout #order_review table.shop_table tbody td.product-total {
    width: 1% !important;
    padding-left: 0 !important;
}
.woocommerce-checkout #order_review table.shop_table .product-quantity {
    display: inline-block !important;
    white-space: nowrap !important;
    margin-left: 8px !important;
    color: #777777 !important;
    font-weight: normal !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.cart-subtotal th,
.woocommerce-checkout #order_review table.shop_table tfoot tr.cart-subtotal td,
.woocommerce-checkout #order_review table.shop_table tfoot tr.cart-subtotal td .amount,
.woocommerce-checkout #order_review table.shop_table tfoot tr.cart-subtotal td .woocommerce-Price-amount {
    font-family: inherit !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #111111 !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.cart-subtotal th,
.woocommerce-checkout #order_review table.shop_table tfoot tr.cart-subtotal td {
    border-bottom: 1px solid #d1d1d1 !important;
    padding-bottom: 15px !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.shipping {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.shipping th {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    font-size: 0 !important;
    color: transparent !important;
    padding-top: 30px !important;
    padding-bottom: 30px !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.shipping th::before {
    content: "Envío" !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #111111 !important;
    display: block !important;
    text-transform: none !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.shipping td {
    display: block !important;
    width: 100% !important;
    padding: 0 0 15px 0 !important;
}
ul#shipping_method {
    list-style: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
ul#shipping_method li {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin-bottom: 25px !important;
    width: 100% !important;
}
.woocommerce-checkout #order_review ul#shipping_method li label {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    color: #333333 !important;
}
ul#shipping_method input[type="radio"] {
    margin-right: 10px !important;
    margin-top: 0 !important;
}
ul#shipping_method label .woocommerce-Price-amount {
    margin-left: 5px !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total th,
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total td {
    border-top: 1px solid #d1d1d1 !important;
    padding-top: 20px !important;
    padding-bottom: 5px !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total th,
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total td strong,
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total td .amount {
    font-family: inherit !important;
    font-size: 21px !important;
    font-weight: 600 !important;
    color: #111111 !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total-bs th,
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total-bs td {
    border-top: 1px solid #d1d1d1 !important;
    padding-top: 15px !important;
    padding-bottom: 4px !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #555555 !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total-bs td {
    white-space: nowrap !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total-bs td strong {
    font-weight: 600 !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-tasa-bcv th,
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-tasa-bcv td {
    padding-top: 0 !important;
    padding-bottom: 10px !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #777777 !important;
}
.woocommerce-checkout #order_review table.shop_table tfoot tr.order-tasa-bcv td {
    white-space: nowrap !important;
}

/* ==========================================================================
   6. CHECKOUT: MÉTODOS DE PAGO, REFERENCIA Y BOTÓN FINAL
   ========================================================================== */
.woocommerce-checkout #payment {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-top: 20px !important;
}
.woocommerce-checkout #payment ul.payment_methods {
    border: 1px solid #e0e0e0 !important;
    border-bottom: none !important;
    padding: 0 !important;
}
.woocommerce-checkout #payment ul.payment_methods li {
    background: transparent !important;
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 15px !important;
    margin: 0 !important;
}
.woocommerce-checkout #payment div.payment_box::before {
    display: none !important;
}
.woocommerce-checkout #payment div.payment_box {
    background-color: #fafafa !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-top: 10px !important;
    color: #333333 !important;
}
.woocommerce-checkout #payment .payment_box fieldset,
.woocommerce-checkout #payment .payment_box .form-row,
.woocommerce-checkout #payment .payment_box .custom-payment-fields {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
}
.woocommerce-checkout #payment .payment_box textarea {
    height: 35px !important;
    min-height: 35px !important;
    width: 100% !important;
    padding: 5px !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 14px !important;
    color: #333333 !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 4px !important;
    resize: none !important;
    background-color: #ffffff !important;
    margin-top: 5px !important;
}
.woocommerce-checkout #payment .payment_box textarea:focus {
    outline: none !important;
    border-color: var(--gools-primary) !important;
    box-shadow: none !important;
}
.woocommerce-checkout input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 16px !important;
    height: 16px !important;
    border: 1px solid #999999 !important;
    border-radius: 50% !important;
    outline: none !important;
    cursor: pointer;
    position: relative;
    top: 3px;
    margin-right: 10px !important;
    background-color: #ffffff;
}
.woocommerce-checkout input[type="radio"]:checked {
    border: 5px solid var(--gools-primary) !important;
    background-color: #ffffff !important;
}
.woocommerce-checkout #place_order {
    background-color: var(--gools-primary) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 18px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    width: 100% !important;
    border: none !important;
    transition: background-color 0.25s ease !important;
}
.woocommerce-checkout #place_order:hover {
    background-color: var(--gools-secondary) !important;
}

/* ==========================================================================
   7. PÁGINA DE GRACIAS: OCULTAR BLOQUES NATIVOS DE WOOCOMMERCE
   ========================================================================== */
.woocommerce-order-received .woocommerce-thankyou-order-received,
.woocommerce-order-received ul.woocommerce-thankyou-order-details,
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received .woocommerce-customer-details,
.woocommerce-order-received .woocommerce-order > p:not(.gools-gracias-subtitulo),
.woocommerce-order-received .woocommerce-order > section,
.woocommerce-order-received .woocommerce-order > table {
    display: none !important;
}
@media (min-width: 769px) {
    .woocommerce-order-received .woocommerce-order {
        min-height: calc(100vh - 160px) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }
}