/*
Theme Name: Blocksy Child
Theme URI: https://creativethemes.com/blocksy/
Description: Tema hijo de Blocksy
Author: Uriel Pandolfi
Author URI: https://tusitio.com
Template: blocksy
Version: 1.0
*/

/* Importa los estilos del tema padre */
@import url("../blocksy/style.css");

/* Cursor personalizado solo en la página de inicio */
body.cursor-home {
    cursor: url('images/Puntero.cur'), auto !important;
}

/* Simplificar carrito lateral - reducir ancho y optimizar */
.xoo-wsc-container {
    width: 200px !important;
    max-width: 280px !important;
    border-top-left-radius: 20px !important;
    border-bottom-left-radius: 20px !important;
    
}

.xoo-wsc-basket {
    right: 16px !important;
    bottom: 90px !important;
}

/* Header más compacto */
.xoo-wsc-header {
    padding: 10px 15px !important;
    min-height: auto !important;
    border-top-left-radius: 30px !important;
}

/* Selector más específico para el botón de checkout */
.xoo-wsc-subtotal-top .xoo-wsc-ft-btn-checkout,
.xoo-wsc-container .xoo-wsc-ft-btn-checkout,
.xoo-wsc-footer .xoo-wsc-ft-btn-checkout {
    background: #68A629 !important;
    color: white !important;
    padding: 12px !important;
    border-radius: 18px !important;
    font-size: 16px !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    text-decoration: none !important;
    font-weight: bold !important;
    margin-top: 10px !important;
    transition: background 0.2s !important;
    border: none !important;
    box-shadow: none !important;
}

.xoo-wsc-subtotal-top .xoo-wsc-ft-btn-checkout:hover,
.xoo-wsc-container .xoo-wsc-ft-btn-checkout:hover,
.xoo-wsc-footer .xoo-wsc-ft-btn-checkout:hover {
    background: #5a8f23 !important;
    color: white !important;
    text-decoration: none !important;
}

/* Selector ultra específico como último recurso */
.xoo-wsc-container .xoo-wsc-subtotal-top .xoo-wsc-ft-btn-checkout.xoo-wsc-btn {
    background: #68A629 !important;
    color: white !important;
    padding: 6px 15px !important;
    border-radius: 18px !important;
    font-size: 16px !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    text-decoration: none !important;
    font-weight: bold !important;
    margin-top: 10px !important;
    transition: background 0.2s !important;
    border: none !important;
    box-shadow: none !important;
}

.xoo-wsc-basket {
    display: none !important;
}

/* Subtotal arriba */
.xoo-wsc-subtotal-top {
    padding: 10px 15px !important;
    border-bottom: 1px solid #eee !important;
    background: #f9f9f9 !important;
    text-align: center !important;
}

.xoo-wsc-subtotal-top .xoo-wsc-ft-amt-label {
    font-weight: normal;
}
.xoo-wsc-subtotal-top .woocommerce-Price-amount {
    font-weight: 800;
    color: #68A629 !important;
}


/* Productos en disposición vertical (columna) */
.xoo-wsc-product {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 15px !important;
    border-bottom: 1px solid #eee !important;
}

/* Columna de imagen centrada arriba */
.xoo-wsc-img-col {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 10px !important;
}

.xoo-wsc-product img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
}

/* Columna de información abajo y centrada */
.xoo-wsc-sum-col{
    width: 100% !important;
    text-align: center !important;
    padding: 0 !important;
}

.xoo-wsc-sm-info, .xoo-wsc-priceBox {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    color: black !important;
    font-weight: 600 !important;
}

.xoo-wsc-sm-left,
.xoo-wsc-sm-right {
    width: 100% !important;
    text-align: center !important;
}

/* Footer minimalista */
.xoo-wsc-footer {
    padding: 10px 15px !important;
    min-height: auto !important;
    border-bottom-left-radius: 30px !important;
    display: none !important;
}

/* Ocultar elementos innecesarios */
.xoo-wsch-text,
.xoo-wsch-basket,
.xoo-wsc-footer-txt,
.xoo-wsc-smr-del,
.xoo-wsc-smr-ptotal,
.xoo-wsc-pname {
    display: none !important;
}

/* Ocultar el botón flotante del carrito */
.xoo-wsc-basket {
    display: none !important;
}

/* Desactivar el overlay oscuro */
.xoo-wsc-opac {
    display: none !important;
}

/* Arreglar el scroll cuando se abre el carrito - Solución robusta */
body.xoo-wsc-open,
body.xoo-wsc-cart-active,
html.xoo-wsc-open,
html.xoo-wsc-cart-active {
    overflow: auto !important;
    position: static !important;
    height: auto !important;
    width: auto !important;
}



/* Asegurar que el body y html no se bloqueen nunca */
body, html {
    overflow-x: visible !important;
    overflow-y: auto !important;
    position: static !important;
}

/* Forzar scroll en todos los contenedores principales */
body.xoo-wsc-open .site,
body.xoo-wsc-open .wp-site-blocks,
body.xoo-wsc-open main,
body.xoo-wsc-open .entry-content,
body.xoo-wsc-cart-active .site,
body.xoo-wsc-cart-active .wp-site-blocks,
body.xoo-wsc-cart-active main,
body.xoo-wsc-cart-active .entry-content {
    overflow: visible !important;
    position: static !important;
}

/* Asegurar que el overlay no bloquee nunca el scroll */
.xoo-wsc-opac {
    display: none !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

/* Asegurar que el carrito lateral no interfiera con el scroll */
.xoo-wsc-container {
    z-index: 999999 !important;
    position: fixed !important;
}

/* Desactivar cualquier bloqueo de scroll en elementos del carrito */
.xoo-wsc-modal,
.xoo-wsc-container,
.xoo-wsc-header,
.xoo-wsc-body,
.xoo-wsc-footer {
    overflow: visible !important;
}

/* Mostrar solo el botón de checkout */
.xoo-wsc-ft-buttons-cont {
    display: block !important;
}

.xoo-wsc-ft-buttons-cont a:not(.xoo-wsc-ft-btn-checkout) {
    display: none !important;
}

.xoo-wsc-ft-btn-checkout {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    background: #007cba !important;
    color: white !important;
    padding: 12px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-weight: bold !important;
}

/* Hacer el botón X más visible */
.xoo-wsch-close {
    font-size: 18px !important;
    color: #666 !important;
}

/* Estilos para el botón "Comprar" de WooCommerce */
.add_to_cart_button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.add_to_cart_button i.fas.fa-shopping-cart {
    color: #FCF8ED !important;
    font-size: 16px !important;
    margin-right: 8px !important;
}

body, button, input, select, textarea {
    font-family: 'Josefin Sans', sans-serif !important;
  }  

/* Estilos para el módulo de último producto agregado */
.ultimo-producto-modulo {
    max-width: 600px;
    margin: 20px auto;
    background: white;
    border: 2px solid #68A629;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.ultimo-producto-container {
    display: flex;
    min-height: 300px;
}

/* Columna izquierda - Imagen del producto */
.ultimo-producto-imagen {
    flex: 0 0 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
}

.ultimo-producto-imagen img {
    max-width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #68A629;
}

/* Columna derecha - Información */
.ultimo-producto-info {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Sección de producto agregado */
.producto-agregado h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    font-family: 'Josefin Sans', sans-serif;
}

.nombre-producto {
    color: #555;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    font-family: 'Josefin Sans', sans-serif;
}

/* Complementos agregados */
.complementos-agregados {
    margin: 20px 0;
}

.complementos-agregados h4 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    font-family: 'Josefin Sans', sans-serif;
}

.complementos-imagenes {
    display: flex;
    gap: 4px;
    width: 200px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.complementos-imagenes::-webkit-scrollbar {
    display: none;
}

.complementos-imagenes {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.complemento-item {
    width: 64px;
    min-width: 64px;
    height: 64px;
    flex-shrink: 0;
    border: 2px solid #68A629;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.complemento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Totales del carrito */
.totales-carrito {
    margin-top: auto;
}

.total-linea {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-family: 'Josefin Sans', sans-serif;
}

.total-linea:last-child {
    border-bottom: none;
}

.total-linea span:first-child {
    color: #555;
    font-size: 14px;
}

.total-linea span:last-child {
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.total-final {
    border-top: 2px solid #68A629;
    margin-top: 10px;
    padding-top: 15px;
}

.total-final span {
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

/* Botón de checkout */
.boton-checkout {
    display: block;
    width: 100%;
    background: white;
    color: #68A629;
    border: 2px solid #68A629;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    margin-top: 15px;
    transition: all 0.3s ease;
    font-family: 'Josefin Sans', sans-serif;
}

.boton-checkout:hover {
    background: #68A629;
    color: white;
    text-decoration: none;
}

/* Estado vacío */
.ultimo-producto-vacio {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    font-family: 'Josefin Sans', sans-serif;
}

.woocommerce-product-gallery{
    opacity: 1 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .ultimo-producto-container {
        flex-direction: column;
    }
    
    .ultimo-producto-imagen {
        flex: none;
        padding: 15px;
    }
    
    .ultimo-producto-imagen img {
        max-height: 200px;
    }
    
    .ultimo-producto-info {
        padding: 20px;
    }
    
    .complementos-imagenes {
        justify-content: center;
    }
}


/* Forzar WooCommerce a usar ancho completo dentro de Blocksy */
.single-product .wp-block-post-content,
.single-product .woocommerce,
.single-product .wp-site-blocks {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

/* Arreglar la disposición de la galería e info */
.single-product div.product {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.single-product div.product .woocommerce-product-gallery,
.single-product div.product .summary {
  flex: 1 1 45%;
  min-width: 320px;
}

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

/* Evitar que los bloques de Blocksy limiten el ancho */
.single-product .wp-block-template-part,
.single-product .wp-block-group {
  max-width: 100% !important;
  padding: 0 !important;
}

/* Eliminar padding del body en single product */
body.wp-singular.single.single-product,
body.single-product,
.single-product body {
  padding: 0 !important;
  margin: 0 !important;
}