/*
Theme Name: Blocksy Child
Template: blocksy
Author: Tu Nombre
Description: Tema hijo de Blocksy
Version: 1.0
*/
/* ===== ESCRITORIO (1025px y superior) ===== */
@media (min-width: 1025px) {
    /* Elimina margen inferior del encabezado */
    header {
        margin-bottom: 10 !important;
    }
    
    /* Establece margen superior para el contenido principal en páginas de WooCommerce */
    .woocommerce-page .site-main {
        margin-top: 10px !important;
    }
    
    /* Establece margen superior para el área de contenido en páginas de WooCommerce */
    .woocommerce-page .content-area {
        margin-top: 0px !important;
    }
}

/* ===== TABLET (768px a 1024px) ===== */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Elimina margen inferior del encabezado en tablets */
    header {
        margin-bottom: 0 !important;
    }
    
    /* Ajusta margen superior para el contenido principal en páginas de WooCommerce en tablets */
    .woocommerce-page .site-main {
        margin-top:0px !important;
    }
    
    /* Ajusta margen superior para el área de contenido en páginas de WooCommerce en tablets */
    .woocommerce-page .content-area {
        margin-top: 26px !important;
    }
    
}

/* ===== MÓVIL (máximo 767px) - ESPACIADO HEADER ===== */
@media (max-width: 767px) {
 
    /* Configuraciones adicionales que puedes personalizar */
    
    /* Espaciado para páginas de producto individual */
    body:not(.home):not(.front-page).single-product .site-main {
        margin-top: -80px !important;
        padding-top: 0px !important;
    }
    
    /* Espaciado para páginas de categoría */
    body:not(.home):not(.front-page).woocommerce-shop .site-main {
        margin-top: -60px !important;
    }
    
        /* Espaciado para páginas de tienda */
    body:not(.home):not(.front-page).tax-product_cat .site-main {
        margin-top: -27px !important;
    }
    
    /* Espaciado para páginas de checkout */
    body:not(.home):not(.front-page).woocommerce-checkout .site-main {
        margin-top: -60px !important;
    }
     /* Espaciado para páginas de carrito */
    body:not(.home):not(.front-page).woocommerce-cart .site-main {
        margin-top: -75px !important;
    }
    /* Todas las páginas EXCEPTO: home, front-page, single-product, woocommerce-shop, tax-product_cat, woocommerce-checkout, woocommerce-cart */
    body:not(.home):not(.front-page):not(.single-product):not(.woocommerce-shop):not(.tax-product_cat):not(.woocommerce-checkout):not(.woocommerce-cart) .site-main {
        margin-top: -75px !important; /* Ajusta este valor según necesites */
    }
}


/* ===== BOTONES DE PRODUCTOS WOOCOMMERCE - RESPONSIVE ===== */

/* MOBILE FIRST: Estilos base para dispositivos móviles (0-600px) */
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .button {
    width: 100% !important;
    max-width: 100% !important;
    height: 45px !important;
    line-height: 43px !important;
    font-size: 14px !important;
    font-weight: bold !important; 
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 5px !important;
}


/* TABLETS: 601px en adelante */
@media screen and (min-width: 601px) and (max-width: 1024px) {
    .woocommerce ul.products li.product a.button,
    .woocommerce ul.products li.product .button {
        width: 100% !important;
        max-width: 250px !important;
        height: 45px !important;
        line-height: 43px !important;
        font-size: 15px !important;
    }
}

/* ESCRITORIO: 1025px en adelante */
@media screen and (min-width: 1025px) {
    .woocommerce ul.products li.product a.button,
    .woocommerce ul.products li.product .button {
        width: 100% !important;
        max-width: 280px !important;
        height: 48px !important;
        line-height: 46px !important;
        font-size: 16px !important;
    }
}

/* ===== MÓVIL PEQUEÑO (máximo 479.98px) ===== */
@media (max-width: 479.98px) {
    /* Ajusta el ancho de las miniaturas en la galería de productos */
    div.woocommerce-product-gallery li {
        --thumbs-width: 18% !important;
    }
    
    /* Configura el tamaño y espaciado para miniaturas de navegación en carruseles */
    .flexy-pills ol li,
    .flex-control-nav li {
        flex: 0 0 var(--thumbs-width, 20%) !important;
        width: var(--thumbs-width, 20%) !important;
        padding: 1px !important;
    }
    
    /* Reduce el espaciado entre miniaturas en el navegador flexy-pills */
    .flexy-pills {
        --thumbs-spacing: 2px !important;
    }
}

/* ===== ESTILOS DE PRODUCTO INDIVIDUAL ===== */
/* Reduce el margen inferior del formulario de carrito en páginas de producto */
.single-product form.cart {
    margin-bottom: 20px !important;
}
/* Estilos base del carrito para asegurar comportamiento consistente */
.ct-header-cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    transform: none !important;
    transition: none !important;
}

.ct-header-cart .ct-cart-content {
    position: absolute !important;
    top: 100% !important;
    width: 280px !important;
    max-width: calc(100vw - 30px) !important;
    z-index: 999999 !important;
}
/* iPhone SE (4.7") */
@media only screen and (device-width: 375px) and (device-height: 667px),
       only screen and (width: 375px) and (height: 667px) {
    .ct-header-cart {
        margin-right: -10px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -2px !important;
        width: 265px !important;
    }
}

/* iPhone 12 Mini, iPhone 13 Mini (5.4") */
@media only screen and (device-width: 375px) and (device-height: 812px),
       only screen and (width: 375px) and (height: 812px) {
    .ct-header-cart {
        margin-right: 10px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -8px !important;
        width: 265px !important;
    }
}

/* Samsung Galaxy S9, S10e, Huawei P20 (5.8") */
@media only screen and (device-width: 360px) and (device-height: 740px),
       only screen and (width: 360px) and (height: 740px) {
    .ct-header-cart {
        margin-right: 10px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -10px !important;
        width: 265px !important;
    }
}

/* Samsung Galaxy A33, A53 (6.4") */
@media only screen and (device-width: 412px) and (device-height: 892px),
       only screen and (width: 412px) and (height: 892px) {
    .ct-header-cart {
        margin-right: 12px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -10px !important;
        width: 275px !important;
    }
}

/* Huawei P30 Pro (6.47") */
@media only screen and (device-width: 412px) and (device-height: 905px),
       only screen and (width: 412px) and (height: 905px) {
    .ct-header-cart {
        margin-right: 12px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -10px !important;
        width: 275px !important;
    }
}

/* Huawei Mate 20, Mate 30 Pro (6.53") */
@media only screen and (device-width: 412px) and (device-height: 914px),
       only screen and (width: 412px) and (height: 914px) {
    .ct-header-cart {
        margin-right: 12px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -10px !important;
        width: 275px !important;
    }
}

/* Huawei P40 Pro (6.58") */
@media only screen and (device-width: 412px) and (device-height: 919px),
       only screen and (width: 412px) and (height: 919px) {
    .ct-header-cart {
        margin-right: 12px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -10px !important;
        width: 275px !important;
    }
}

/* Huawei Mate 50 Pro (6.74") */
@media only screen and (device-width: 428px) and (device-height: 932px),
       only screen and (width: 428px) and (height: 932px) {
    .ct-header-cart {
        margin-right: 14px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -10px !important;
        width: 280px !important;
    }
}

/* Huawei Mate 40 Pro (6.76") */
@media only screen and (device-width: 428px) and (device-height: 935px),
       only screen and (width: 428px) and (height: 935px) {
    .ct-header-cart {
        margin-right: 14px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -10px !important;
        width: 280px !important;
    }
}

/* Xiaomi Mi 11 (6.81") */
@media only screen and (device-width: 428px) and (device-height: 942px),
       only screen and (width: 428px) and (height: 942px) {
    .ct-header-cart {
        margin-right: 14px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -10px !important;
        width: 280px !important;
    }
}

/* TABLETS */

/* iPad Mini (2021) (8.3") */
@media only screen and (device-width: 744px) and (device-height: 1133px),
       only screen and (width: 744px) and (height: 1133px) {
    .ct-header-cart {
        margin-right: 15px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: 0 !important;
        width: 300px !important;
    }
}

/* Samsung Galaxy Tab S6 Lite, Galaxy Tab A7 (10.4") */
@media only screen and (device-width: 768px) and (device-height: 1366px),
       only screen and (width: 768px) and (height: 1366px) {
    .ct-header-cart {
        margin-right: 18px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: 0 !important;
        width: 320px !important;
    }
}

/* Xiaomi Pad 6 (10.95") */
@media only screen and (device-width: 834px) and (device-height: 1396px),
       only screen and (width: 834px) and (height: 1396px) {
    .ct-header-cart {
        margin-right: 20px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: 0 !important;
        width: 320px !important;
    }
}

/* iPad Pro, iPad Air, Samsung Galaxy Tab S7/S8/S9 (11") */
@media only screen and (device-width: 834px) and (device-height: 1194px),
       only screen and (width: 834px) and (height: 1194px) {
    .ct-header-cart {
        margin-right: 20px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: 0 !important;
        width: 320px !important;
    }
}

/* Huawei MatePad 11.5 (11.2") */
@media only screen and (device-width: 834px) and (device-height: 1216px),
       only screen and (width: 834px) and (height: 1216px) {
    .ct-header-cart {
        margin-right: 20px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: 0 !important;
        width: 320px !important;
    }
}

/* Xiaomi Pad 6S Pro (11.5") */
@media only screen and (device-width: 834px) and (device-height: 1220px),
       only screen and (width: 834px) and (height: 1220px) {
    .ct-header-cart {
        margin-right: 20px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: 0 !important;
        width: 320px !important;
    }
}

/* Samsung Galaxy Tab S7+, S8+, S9+ (12.4") */
@media only screen and (device-width: 1024px) and (device-height: 1366px),
       only screen and (width: 1024px) and (height: 1366px) {
    .ct-header-cart {
        margin-right: 22px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: 0 !important;
        width: 330px !important;
    }
}

/* Huawei MatePad Pro 12.6 (12.6") */
@media only screen and (device-width: 1024px) and (device-height: 1410px),
       only screen and (width: 1024px) and (height: 1410px) {
    .ct-header-cart {
        margin-right: 22px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: 0 !important;
        width: 330px !important;
    }
}

/* iPad Pro 12.9" (12.9") */
@media only screen and (device-width: 1024px) and (device-height: 1366px),
       only screen and (width: 1024px) and (height: 1366px) {
    .ct-header-cart {
        margin-right: 22px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: 0 !important;
        width: 330px !important;
    }
}

/* Regla genérica para pantallas más pequeñas no especificadas */
@media only screen and (max-width: 359px) {
    .ct-header-cart {
        margin-right: 8px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -5px !important;
        width: 250px !important;
    }
}

/* Regla genérica para dispositivos entre los tamaños específicos */
@media only screen and (min-width: 429px) and (max-width: 767px) {
    .ct-header-cart {
        margin-right: 14px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -10px !important;
        width: 280px !important;
    }
}

/* Regla genérica para pantallas de escritorio */
@media only screen and (min-width: 1025px) {
    .ct-header-cart {
        margin-right: 22px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: 0 !important;
        width: 340px !important;
    }
}
/* SAMSUNG GALAXY S8+ (6.2") */
@media only screen and (device-width: 360px) and (device-height: 740px),
       only screen and (width: 360px) and (height: 740px) {
    .ct-header-cart {
        margin-right: -11px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -4px !important;
        width: 265px !important;
    }
}
/* Ajustes de espaciado para página de producto único */

/* Ajuste general del espaciado */
.single-product .product {
    --product-element-spacing: 15px;
}

/* Reduce el espacio entre la galería y los elementos del producto */
.single-product .product .entry-summary {
    padding-left: 35px !important;
    margin-top: 0 !important;
}

/* Ajusta el espaciado de la galería */
.single-product .woocommerce-product-gallery {
    margin-bottom: 20px !important;
}

/* Ajusta el contenedor principal del producto */
.single-product .product.type-product {
    gap: 20px;
}

/* Ajustes responsivos */
@media (max-width: 991px) {
    .single-product .product {
        --product-element-spacing: 10px;
    }
    
    .single-product .product .entry-summary {
        padding-left: 0 !important;
        margin-top: 20px !important;
    }
}

@media (max-width: 767px) {
    .single-product .product {
        --product-element-spacing: 8px;
    }
    
    /* Reduce aún más el espacio en móviles */
    .single-product .woocommerce-product-gallery {
        margin-bottom: -15px !important;
    }
    
    .single-product .product.type-product {
        gap: 15px;
    }
}

/* Optimiza el espaciado de elementos específicos del producto */
.single-product .product_title {
    margin-bottom: 15px !important;
}

.single-product .price {
    margin-bottom: 15px !important;
}

.single-product .woocommerce-product-details__short-description {
    margin-bottom: 15px !important;
}

/* Ajusta el espaciado de las variaciones si existen */
.single-product .variations_form {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

.single-product .variations {
    margin-bottom: 10px !important;
}

/* Optimiza el espaciado de los meta datos del producto */
.single-product .product_meta {
    margin-top: 15px !important;
    padding-top: 15px !important;
}
/* Estilos para los botones de cantidad en página de producto único */

/* Elimina el fondo gris y ajusta el color de los botones */
.single-product .quantity .ct-increase,
.single-product .quantity .ct-decrease {
    --quantity-button-initial-color: #000000 !important;
    --quantity-button-hover-color: #000000 !important;
    background: transparent !important;
}

/* Asegura que los íconos dentro de los botones sean negros */
.single-product .quantity .ct-increase svg,
.single-product .quantity .ct-decrease svg {
    fill: #000000 !important;
}

/* Estado hover de los íconos */
.single-product .quantity .ct-increase:hover svg,
.single-product .quantity .ct-decrease:hover svg {
    fill: #000000 !important;
}

/* Elimina cualquier fondo o borde no deseado */
.single-product .quantity[data-type="type-1"] {
    background: transparent !important;
    border: none !important;
}

/* Asegura que el input de cantidad mantenga su estilo */
.single-product .quantity .qty {
    border: 1px solid #e0e0e0 !important;
    background: #ffffff !important;
}

/* Ajustes para el modo oscuro si es necesario */
[data-theme="dark"] .single-product .quantity .ct-increase,
[data-theme="dark"] .single-product .quantity .ct-decrease {
    --quantity-button-initial-color: #ffffff !important;
    --quantity-button-hover-color: #cccccc !important;
}

[data-theme="dark"] .single-product .quantity .ct-increase svg,
[data-theme="dark"] .single-product .quantity .ct-decrease svg {
    fill: #ffffff !important;
}

[data-theme="dark"] .single-product .quantity .ct-increase:hover svg,
[data-theme="dark"] .single-product .quantity .ct-decrease:hover svg {
    fill: #cccccc !important;
}
/* Ocultar breadcrumb en móvil para páginas de producto */
@media (max-width: 767px) {
    .single-product .woocommerce-breadcrumb {
        display: none !important;
    }
    
    /* En caso de que el tema use una clase diferente para el contenedor del breadcrumb */
    .single-product .ct-breadcrumbs {
        display: none !important;
    }
}

/* Si necesitas ocultar también el espacio que ocupa */
@media (max-width: 767px) {
    .single-product .woocommerce-breadcrumb,
    .single-product .ct-breadcrumbs {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }
}
/* Ocultar el botón y su contenedor de forma agresiva */
button[type="submit"][name="update_cart"],
button.button[name="update_cart"],
button[value="Actualizar el carrito"],
.woocommerce button[name="update_cart"],
button[name="update_cart"] {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    clip: rect(0,0,0,0) !important;
    clip-path: inset(50%) !important;
}

/* También ocultar el nonce relacionado */
#woocommerce-cart-nonce {
    display: none !important;
}
/* ==== CORRECCIONES ESPECÍFICAS PARA DISPOSITIVOS ==== */

/* iPhone X/XS (5.8") */
@media only screen and (device-width: 375px) and (device-height: 812px),
only screen and (width: 375px) and (height: 812px) {
    .ct-header-cart {
        margin-right: -12px !important;
        --icon-size: 15px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -6px !important;
        width: 265px !important;
        max-height: calc(100vh - 200px) !important;
    }
}

/* iPad Mini Corrección */
@media only screen and (device-width: 768px) and (device-height: 1024px),
only screen and (width: 768px) and (height: 1024px) {
    .ct-header-cart {
        margin-right: -36px !important;
        --icon-size: 17px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -8px !important;
        width: 290px !important;
    }
}

/* iPad Air y Pro Corrección */
@media only screen and (device-width: 820px) and (device-height: 1180px),
only screen and (width: 820px) and (height: 1180px) {
    .ct-header-cart {
        margin-right: -20px !important;
        --icon-size: 17px !important;
    }
    .ct-header-cart .ct-cart-content {
        right: -25px !important;
        width: 300px !important;
    }
}

/* Mejoras generales del carrito */
.ct-header-cart .ct-cart-content {
    z-index: 999999 !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.ct-header-cart .ct-icon {
    opacity: 1 !important;
    stroke-width: 1.5 !important;
}

.ct-header-cart .ct-cart-item {
    --icon-hover-color: var(--icon-color) !important;
}
/* Ocultar carrito en iPhone 5/SE (320x568) */
@media only screen and (device-width: 320px) and (device-height: 568px),
only screen and (width: 320px) and (height: 568px) {
    .ct-header-cart {
        display: none !important;
    }
}

/* Ocultar carrito en dispositivos muy pequeños (menor a 360px) */
@media only screen and (max-width: 359px) {
    .ct-header-cart {
        display: none !important;
    }
}

/* Ocultar carrito en Galaxy Z Fold cuando está plegado */
@media only screen and (device-width: 280px) and (device-height: 653px),
only screen and (width: 280px) and (height: 653px) {
    .ct-header-cart {
        display: none !important;
    }
}

/* Ajuste específico para Galaxy Z Fold 5 plegado (344x882) */
@media only screen and (device-width: 344px) and (device-height: 882px),
only screen and (width: 344px) and (height: 882px) {
    .ct-header-cart {
        display: none !important;
    }
}

/* Mejor soporte para otras resoluciones plegables */
@media only screen and (min-width: 260px) and (max-width: 350px) and (min-height: 650px) and (max-height: 900px) {
    .ct-header-cart {
        display: none !important;
    }
}

/* Ajustes específicos para tablet */
@media (min-width: 768px) and (max-width: 1336px) {
  .woocommerce-cart .entry-header {
    margin-bottom: -25px !important;
  }
  
  .woocommerce-cart .woocommerce {
    margin-top: 0 !important;
  }
}

/* Ajustes específicos para móvil */
@media (max-width: 767px) {
  .woocommerce-cart .entry-header {
    margin-bottom: -80px !important;
  }
  
  .woocommerce-cart .woocommerce {
    margin-top: -0 !important;
  }
  
  /* Eliminar cualquier padding adicional */
  .woocommerce-cart .entry-content {
    padding-top: 0 !important;
  }
  
  /* Ajustar espacio para el título */
  .woocommerce-cart .page-title {
    margin-bottom: 5px !important;
  }
}
/* Reducir tamaño del título de producto en dispositivos móviles */
@media (max-width: 767px) {
    /* Selector para el título del producto en WooCommerce */
    .product_title.entry-title,
    .woocommerce div.product .product_title,
    .single-product .product .product_title {
        font-size: 1.2rem !important; /* Puedes ajustar este valor según necesites */
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
        font-weight: 600 !important;
    }
}
/* Ajustes específicos para dispositivos móviles */
@media (max-width: 767px) {
    /* Reducir espacio en pestañas de producto */
    .single-product .woocommerce-tabs,
    .single-product .ct-tabs-container {
        margin-top: -25px !important;
        margin-bottom: -45px !important;
    }
    
    /* Reducir padding interno en contenido de pestañas */
    .single-product .woocommerce-Tabs-panel,
    .single-product .ct-tab-panel > * {
        padding: 15px !important;
    }
  
    /* Reducir tamaño de título de productos relacionados */
    .single-product .related.products > h2,
    .single-product .related.products .ct-section-title {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1px !important;
        padding-bottom: 10px !important;
    }
    /* Compactar pestañas */
    .single-product .woocommerce-tabs .wc-tabs li a,
    .single-product .ct-tabs .ct-tabs-nav button {
        padding: 10px 15px !important;
        font-size: 0.9rem !important;
    }
}
/* Resaltar checkbox de términos y condiciones */
#terms {
  width: 24px !important;
  height: 24px !important;
  border: 2px solid #ff7700 !important; /* Color naranja que coincide con tu sitio */
  border-radius: 4px !important;
  box-shadow: 0 0 5px rgba(255, 119, 0, 0.5) !important; /* Sombra sutil */
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  background-color: white !important;
  outline: none !important;
}

/* Estilo cuando el checkbox está marcado */
#terms:checked {
  background-color: #ff7700 !important;
  border-color: #ff7700 !important;
}

/* Añadir icono de marca de verificación cuando está seleccionado */
#terms:checked::after {
  content: '✓' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  font-size: 16px !important;
  color: white !important;
  font-weight: bold !important;
}

/* Efecto de hover para indicar interactividad */
#terms:hover {
  border-color: #ff7700 !important;
  box-shadow: 0 0 8px rgba(255, 119, 0, 0.7) !important;
}

/* Animación sutil cuando cambia de estado */
#terms, #terms::after {
  transition: all 0.2s ease-in-out !important;
}

/* Mejora responsiva para móviles */
@media (max-width: 990px) {
  #terms {
    width: 18px !important; /* Ligeramente más grande en móviles */
    height: 18px !important;
  }
  
  .woocommerce-terms-and-conditions-wrapper {
    padding: 12px !important;
  } 
}
body .xoo-wsc-sc-bki,
header .xoo-wsc-sc-bki,
.site-header .xoo-wsc-sc-bki {
    color: #000000;
}
/* Ajustar específicamente el texto legal en el formulario de registro */
.woocommerce-privacy-policy-text p {
    font-size: 11px !important;
    color: #888 !important;
    line-height: 1.4 !important;
    margin: 10px 0 15px !important;
    text-align: center !important;
    font-style: italic !important; /* Opcional: para darle un aspecto de texto legal */
}

/* Si hay enlaces en el texto legal */
.woocommerce-privacy-policy-text p a {
    color: #666 !important;
    text-decoration: underline !important;
    font-size: inherit !important;
}

.woocommerce-privacy-policy-text p a:hover {
    color: #ff9800 !important;
}

/* ===== CORTAR TÍTULOS SOLO EN MÓVIL Y SOLO EN HOME/CATÁLOGO ===== */

/* Solo aplicar en la home y páginas de catálogo en móvil */
@media screen and (max-width: 600px) {
    
        /* Para home y catálogo principal */
    .home .woocommerce-loop-product__title a,
    .woocommerce-shop .woocommerce-loop-product__title a,
    .tax-product_cat .woocommerce-loop-product__title a,
    .post-type-archive-product .woocommerce-loop-product__title a {
        
        /* Limitar a exactamente 34 caracteres + "..." */
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        
        /* Ancho calculado para 34 caracteres aproximadamente */
        max-width: 280px !important; /* Ajusta según tu fuente */
        
        /* Altura fija para uniformidad */
        height: 2.5em !important;
        line-height: 2,5 !important;
    }
}
/* Ocultar controles de WooCommerce SOLO en productos simples y SOLO en móvil */
@media screen and (max-width: 767px) {
    /* Solo para productos que tienen la clase 'simple-product-only' */
    body.simple-product-only .ct-cart-actions {
        display: none !important;
    }
    
    /* Asegurar que los productos variables SIEMPRE muestren los controles */
    body.variable-product-only .ct-cart-actions,
    body.has-multiple-variations .ct-cart-actions {
        display: block !important;
    }
}
/* Alinear controles en línea horizontal SOLO en productos variables */
@media (max-width: 767px) {
    body.variable-product-only .ct-cart-actions,
    body.product-type-variable .ct-cart-actions {
        display: flex !important;
        align-items: center;
        gap: 10px;
    }

    body.variable-product-only .ct-cart-actions .quantity,
    body.product-type-variable .ct-cart-actions .quantity {
        flex: 0 0 25%;
        height: 50px;
        margin: 0;
        padding: 0;
        transform: translateY(3px);
    }

    body.variable-product-only .ct-cart-actions .single_add_to_cart_button,
    body.product-type-variable .ct-cart-actions .single_add_to_cart_button {
        flex: 1;
        height: 50px;
        margin: 0;
        padding: 0;
        line-height: 50px;
    }
}
/* Ocultar controles en productos simples - VERSIÓN SEGURA */
@media (max-width: 767px) {
    /* Ocultar por defecto */
    .single-product form.cart:not(.variations_form) .ct-cart-actions {
        display: none !important;
    }
    
    /* Mostrar y alinear solo cuando hay variaciones */
    .single-product form.variations_form .ct-cart-actions {
        display: flex !important;
        align-items: center;
        gap: 10px;
    }

    .single-product form.variations_form .ct-cart-actions .quantity {
        flex: 0 0 25%;
        height: 50px;
        margin: 0;
        padding: 0;
        transform: translateY(2px);
    }

    .single-product form.variations_form .ct-cart-actions .single_add_to_cart_button {
        flex: 1;
        height: 50px;
        margin: 0;
        padding: 0;
        line-height: 50px;
    }
}
/* Espacio RATING PRODUCTO INDIVIDUAL*/
.single-product .woocommerce-product-rating {
    margin-top: 22px !important;
}
/* Espacio sale price */
.single-product .sale-price {
    margin-top: 5px !important;
}

/* Boton añadir al carrito producto individual Cambiar color a naranja y hacerlo menos redondo */
.single-product .woocommerce-variation-add-to-cart .single_add_to_cart_button.button.alt,
body.single-product .ct-cart-actions .single_add_to_cart_button.button.alt {
    background-color: #ff7700 !important;
    border-color: #ff7700 !important;
    border-radius: 6px !important;
}

/* Hover */
.single-product .woocommerce-variation-add-to-cart .single_add_to_cart_button.button.alt:hover,
body.single-product .ct-cart-actions .single_add_to_cart_button.button.alt:hover {
    background-color: #e66600 !important;
    border-color: #e66600 !important;
}
/* ===== ESTILOS PARA PRODUCTOS PERSONALIZADOS ===== */
/* Contenedor principal - margen superior reducido */
.productos-personalizados-container {
    margin-top: 20px !important; /* Reducido de 40px a 20px */
}

/* Header con contador y ordenación - margen superior reducido */
.productos-personalizados-container .woo-listing-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 15px !important; /* Reducido de 30px a 15px (menos de la mitad) */
    flex-wrap: wrap;
}

/* ===== REDUCIR ESPACIOS IMAGEN-TÍTULO SOLO EN CONTAINER PERSONALIZADO ===== */
/* AQUI - Agregado selector más específico para imágenes dentro del enlace */
.productos-personalizados-container .products li.product .woocommerce-loop-product__link img,
.productos-personalizados-container .products li.product a img,
.productos-personalizados-container .products li.product img {
    margin-bottom: 2px !important;
}

/* AQUI - Selector más específico para el título después de la imagen */
.productos-personalizados-container .products li.product .woocommerce-loop-product__title,
.productos-personalizados-container .products li.product h2,
.productos-personalizados-container .products li.product .product-title {
    margin-top: 2px !important;
    margin-bottom: 8px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* AQUI - Espaciado entre enlace de imagen y título en todas las resoluciones */
.productos-personalizados-container .products li.product .woocommerce-loop-product__link {
    margin-bottom: 2px !important;
    display: block !important;
}

/* Móvil (hasta 600px) */
@media screen and (max-width: 600px) {
    .productos-personalizados-container .products li.product .woocommerce-loop-product__title {
        margin-bottom: 5px !important;
    }
    
    /* Títulos de productos - mantener funcionalidad pero ajustar espacios */
    .productos-personalizados-container .woocommerce-loop-product__title a {
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 280px !important;
        height: 2.5em !important;
        line-height: 2.5 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Tablet (601px a 1024px) */
@media screen and (min-width: 601px) and (max-width: 1024px) {
    .productos-personalizados-container .products li.product .woocommerce-loop-product__title {
        margin-bottom: 8px !important;
    }
}

/* Escritorio (1025px en adelante) */
@media screen and (min-width: 1025px) {
    .productos-personalizados-container .products li.product .woocommerce-loop-product__title {
        margin-bottom: 10px !important;
    }
}

/* ===== RATING NUMÉRICO PARA CONTAINER PERSONALIZADO Y ARCHIVO DE PRODUCTOS ===== */
.productos-personalizados-container .star-rating,
.woocommerce-page .star-rating {
    display: inline-block !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
}

.productos-personalizados-container .rating-number,
.woocommerce-page .rating-number {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #666 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-left: -2px !important; /* AQUI - Cambiado de 0 a -2px para acercar 2px más */
}

/* Responsive para rating */
@media screen and (max-width: 600px) {
    .productos-personalizados-container .rating-number,
    .woocommerce-page .rating-number {
        font-size: 12px !important;
    }
}

/* ===== AMPLIAR FILTRO DE ORDENACIÓN SOLO EN CONTAINER PERSONALIZADO ===== */
/* AQUI - Eliminado el selector .woocommerce-page para que solo afecte al container personalizado */
.productos-personalizados-container .woocommerce-ordering select {
    min-width: 280px !important;
    width: auto !important;
    padding-right: 40px !important;
}

@media screen and (max-width: 600px) {
    .productos-personalizados-container .woocommerce-ordering select {
        min-width: 280px !important;
        width: 280px !important;
        font-size: 14px !important;
    }
    
    .productos-personalizados-container .woo-listing-top {
        justify-content: center !important;
    }
    
    .productos-personalizados-container .woocommerce-ordering {
        width: 100% !important;
        max-width: 280px !important;
    }
}

/* ===== BOTONES DE PRODUCTOS - RESPONSIVE (CORREGIDO PARA TABLETS) ===== */
/* MOBILE FIRST: Estilos base para dispositivos móviles (0-600px) */
.productos-personalizados-container .woocommerce ul.products li.product a.button,
.productos-personalizados-container .woocommerce ul.products li.product .button,
.productos-personalizados-container ul.products li.product a.button,
.productos-personalizados-container ul.products li.product .button {
    width: 100% !important;
    max-width: 100% !important;
    height: 45px !important;
    line-height: 43px !important;
    font-size: 14px !important;
    font-weight: bold !important; 
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 5px !important;
}

/* TABLETS: 601px a 1024px - CORREGIDO PARA OCUPAR TODO EL ESPACIO */
@media screen and (min-width: 601px) and (max-width: 1024px) {
    .productos-personalizados-container .woocommerce ul.products li.product a.button,
    .productos-personalizados-container .woocommerce ul.products li.product .button,
    .productos-personalizados-container ul.products li.product a.button,
    .productos-personalizados-container ul.products li.product .button {
        width: 100% !important;
        max-width: 100% !important; /* Cambiado de 250px a 100% */
        height: 45px !important;
        line-height: 43px !important;
        font-size: 15px !important;
        display: block !important;
        text-align: center !important;
    }
}

/* ESCRITORIO: 1025px en adelante */
@media screen and (min-width: 1025px) {
    .productos-personalizados-container .woocommerce ul.products li.product a.button,
    .productos-personalizados-container .woocommerce ul.products li.product .button,
    .productos-personalizados-container ul.products li.product a.button,
    .productos-personalizados-container ul.products li.product .button {
        width: 100% !important;
        max-width: 100% !important; /* Cambiado de 280px a 100% para consistencia */
        height: 48px !important;
        line-height: 46px !important;
        font-size: 16px !important;
    }
}

/* ===== BOTÓN "CARGAR MÁS" - RESPONSIVE ===== */
.productos-personalizados-container .ct-load-more-helper {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 60px;
}

/* Botón Cargar Más - Base (Mobile First) */
.productos-personalizados-container #cargar-mas-productos {
    /* Tamaño para móviles pequeños como iPhone SE */
    width: 118px !important;
    height: 40px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: inline-block !important;
    text-align: center !important;
    line-height: 38px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

/* Tamaños responsive para el botón Cargar Más */
@media screen and (min-width: 376px) and (max-width: 600px) {
    .productos-personalizados-container #cargar-mas-productos {
        width: 140px !important;
        height: 42px !important;
        font-size: 15px !important;
        line-height: 40px !important;
    }
}

@media screen and (min-width: 601px) and (max-width: 1024px) {
    .productos-personalizados-container #cargar-mas-productos {
        width: 160px !important;
        height: 45px !important;
        font-size: 16px !important;
        line-height: 43px !important;
    }
}

@media screen and (min-width: 1025px) {
    .productos-personalizados-container #cargar-mas-productos {
        width: 180px !important;
        height: 48px !important;
        font-size: 16px !important;
        line-height: 46px !important;
    }
}

/* Estados del botón Cargar Más */
.productos-personalizados-container #cargar-mas-productos:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.productos-personalizados-container #cargar-mas-productos:hover:not(:disabled) {
    transform: translateY(-1px) !important;
    transition: transform 0.2s ease !important;
}

/* ===== GRID DE PRODUCTOS - MEJORADO (MÓVIL 2 COLUMNAS) ===== */
.productos-personalizados-container .products {
    display: grid !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 10px !important; /* Padding lateral para móvil */
    list-style: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    
    /* 4 columnas en desktop por defecto */
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Elementos del producto - asegurar que no se rompan */
.productos-personalizados-container .products li.product {
    width: 100% !important;
    min-width: 0 !important; /* Permite que se reduzca */
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Responsive para el grid - CORREGIDO PARA 2 COLUMNAS EN MÓVIL */
@media screen and (max-width: 1200px) {
    .productos-personalizados-container .products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 18px !important;
        padding: 0 8px !important;
    }
}

@media screen and (max-width: 900px) {
    .productos-personalizados-container .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 0 5px !important;
    }
}

@media screen and (max-width: 600px) {
    .productos-personalizados-container .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 5px !important;
    }
}

/* Solo en pantallas MUY pequeñas (menor a 360px) usar 1 columna */
@media screen and (max-width: 360px) {
    .productos-personalizados-container .products {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 0 10px !important;
    }
}

/* ===== FILTRO/ORDENACIÓN PERSONALIZADO - COMPACTO ===== */
/* Contenedor del filtro - ajustado para alineación perfecta */
.productos-personalizados-container .woocommerce-ordering {
    position: relative;
    width: auto !important;
    min-width: auto !important; /* Eliminamos ancho mínimo fijo */
    max-width: none !important; /* Eliminamos ancho máximo fijo */
    margin-left: auto !important;
    margin-right: 23px !important; /* Margen consistente de 8px */
    padding-right: 23px !important; /* Añadimos padding adicional por si acaso */
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important; /* Evita que se comprima */
    box-sizing: border-box !important; /* Asegura el box-sizing */
}

/* Select del filtro - ajustado al contenido */
.productos-personalizados-container .woocommerce-ordering select {
    width: auto !important; /* Ancho automático basado en contenido */
    min-width: fit-content !important; /* Se ajusta al contenido */
    min-height: 40px !important;
    padding: 8px 28px 8px 12px !important; /* Padding balanceado */
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    background-color: #fff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    cursor: pointer !important;
    white-space: nowrap !important; /* Evita salto de línea */
    
    /* Flecha personalizada */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 14px !important;
    
    /* Remover estilos nativos */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    
    /* Transición suave */
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Responsive - mantener ajuste automático */
@media screen and (max-width: 768px) {
    .productos-personalizados-container .woocommerce-ordering {
        margin-right: 8px !important; /* Margen consistente */
    }
    
    .productos-personalizados-container .woocommerce-ordering select {
        font-size: 12px !important; /* Texto más pequeño en móvil */
        padding: 6px 24px 6px 10px !important;
    }
}
/* Estados del select */
.productos-personalizados-container .woocommerce-ordering select:hover {
    border-color: #007cba !important;
}

.productos-personalizados-container .woocommerce-ordering select:focus {
    outline: none !important;
    border-color: #007cba !important;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1) !important;
}

/* Estilos específicos para desktop */
@media screen and (min-width: 1025px) {
    .productos-personalizados-container .woocommerce-ordering select {
        min-height: 42px !important;
        font-size: 15px !important;
    }
}

/* ===== ELEMENTOS AUXILIARES ===== */
/* Loader */
.productos-personalizados-container .ct-ajax-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    vertical-align: middle;
}

/* Mensaje de fin */
.productos-personalizados-container .ct-last-page-text {
    color: #666;
    font-style: italic;
    margin-top: 15px;
    text-align: center;
}

/* Mensaje sin productos */
.productos-personalizados-container .no-products {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    padding: 40px 20px !important;
    color: #666 !important;
    font-style: italic !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
    margin: 20px 0 !important;
}

/* ===== OCULTAR ELEMENTOS EN RESPONSIVE ===== */
@media screen and (max-width: 640px) {
    .productos-personalizados-container .ct-hidden-sm {
        display: none !important;
    }
}

/* ===== MEJORAS ADICIONALES ===== */
/* Espaciado entre elementos del producto */
.productos-personalizados-container .products li.product {
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* Imágenes de productos responsive */
.productos-personalizados-container .products li.product img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    border-radius: 4px !important;
}

/* Contenido del producto */
.productos-personalizados-container .products li.product .woocommerce-loop-product__title {
    margin: 8px 0 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
}

/* Precios */
.productos-personalizados-container .products li.product .price {
    margin-bottom: 8px !important;
    font-weight: bold !important;
}

/* Contador de resultados */
.productos-personalizados-container .woocommerce-result-count {
    font-size: 14px !important;
    color: #666 !important;
    margin: 0 !important;
    flex-grow: 1 !important; /* Ocupa el espacio disponible */
}

/* Responsive para el header woo-listing-top - MEJORADO */
@media screen and (max-width: 600px) {
    .productos-personalizados-container .woo-listing-top {
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 5px !important;
    }
    
    .productos-personalizados-container .woocommerce-result-count {
        flex-grow: 1 !important;
        text-align: left !important;
        font-size: 13px !important;
        min-width: 0 !important;
    }
    
    .productos-personalizados-container .woocommerce-ordering {
        width: auto !important;
        min-width: 140px !important;
        max-width: 160px !important;
        flex-shrink: 0 !important;
    }
    
    .productos-personalizados-container .woocommerce-ordering select {
        font-size: 12px !important;
        min-height: 36px !important;
        padding: 6px 25px 6px 8px !important;
        background-size: 14px !important;
        background-position: right 6px center !important;
    }
}

/* ===== ESPACIADO MEJORADO - 1.5x MÁS ESPACIO ===== */
.productos-personalizados-container .products {
    margin-top: 10px !important; /* Aumentado 1.5x desde 20px */
}

@media screen and (max-width: 900px) {
    .productos-personalizados-container .products {
        gap: 22px !important; /* Aumentado 1.5x desde 15px */
    }
}

@media screen and (max-width: 600px) {
    .productos-personalizados-container .products {
        gap: 18px !important; /* Aumentado 1.5x desde 12px */
    }
}
/* Estilos para opciones del desplegable */
.productos-personalizados-container .woocommerce-ordering select option {
    padding: 8px 12px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    background-color: #fff !important;
    color: #333 !important;
}

.productos-personalizados-container .woocommerce-ordering select option:last-child {
    border-bottom: none !important;
}

/* Mejorar responsive para grid cortado */
@media screen and (max-width: 600px) {
    .productos-personalizados-container .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 0 3px !important;
    }
    
    .productos-personalizados-container .products li.product {
        min-width: 0 !important;
        width: 100% !important;
    }
}