/*
Theme Name: Agrícola Triviño
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

/* Estilos para las estrellas encima de la categoría */
.box-text-products .title-wrapper .star-rating,
.woocommerce-product-rating>.woocommerce-review-link>.star-rating {
    margin-bottom: 8px;
    font-size: 16px;
    width: 132px;
}

.box-text-products .title-wrapper .star-rating--inline {
    display: block;
    margin-bottom: 8px;
}

/* Ajustar el espaciado */
.box-text-products .category {
    margin-top: 0;
}

/* Añadir separación entre estrellas */
.star-rating:before,
.woocommerce-page .star-rating:before {
    letter-spacing: 12px;
    /* Ajusta este valor según la separación que quieras */
}

/* También para el span que contiene las estrellas activas */
.star-rating span:before {
    letter-spacing: 12px;
    /* Mantener la misma separación */
}

.badge-container {
    margin: 10px 0 0;
}

.badge {
    backface-visibility: hidden;
    display: table;
    height: 30px !important;
    pointer-events: none;
    width: 60px !important;
    z-index: 20;
    font-size: 0.9rem !important;
    border-radius: 10px !important;
    margin-left: 10px !important;
}

.badge-circle+.badge {
    margin-top: 3px;
}

.product-small .box-image {
    height: auto;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.box-image img {
    margin: 0 auto;
    max-width: 100%;
    height: 250px;
    width: auto;
    object-fit: cover;
}

.grid-col.col .col-inner {
    border-radius: 12px;
    overflow: hidden;
}

.text-box-content .dgwt-wcas-search-wrapp {
    border-radius: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    padding: 10px;
    background-color: #00855433;
    overflow: hidden;
}

.text-box-content .dgwt-wcas-search-wrapp input {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Cambiar color del placeholder - versión más específica */
.text-box-content .dgwt-wcas-search-wrapp input::placeholder {
    color: #333333 !important;
    opacity: 1 !important;
}

/* Para navegadores WebKit (Chrome, Safari) */
.text-box-content .dgwt-wcas-search-wrapp input::-webkit-input-placeholder {
    color: #333333 !important;
}

/* Para Firefox */
.text-box-content .dgwt-wcas-search-wrapp input::-moz-placeholder {
    color: #333333 !important;
    opacity: 1 !important;
}

/* Para Internet Explorer 10-11 */
.text-box-content .dgwt-wcas-search-wrapp input:-ms-input-placeholder {
    color: #333333 !important;
}

/* Para Microsoft Edge */
.text-box-content .dgwt-wcas-search-wrapp input::-ms-input-placeholder {
    color: #333333 !important;
}

/* Selector más específico para el input del buscador */
.header .text-box-content .dgwt-wcas-search-wrapp input::placeholder,
form.dgwt-wcas-search-form input[type="search"]::placeholder {
    color: #333333 !important;
    opacity: 1 !important;
}

.text-box-content form.dgwt-wcas-search-form input[type="search"]::-webkit-input-placeholder {
    color: #333333 !important;
}

.text-box-content form.dgwt-wcas-search-form input[type="search"]::-moz-placeholder {
    color: #333333 !important;
    opacity: 1 !important;
}

/* Selector más específico si es necesario */
.text-box-content .dgwt-wcas-preloader svg path,
.dgwt-wcas-close svg path {
    fill: #008554 !important;
}

.button.btn-negro {
    background-color: black !important;
    color: white;
}

.col-testimonios .col.imagen-testimonio {}

.col-testimonios .col.imagen-testimonio .col-inner {
    width: 50px;
    height: 50px;
    overflow: hidden;
}

.footer-secondary {
    padding: 0;
}

.grid-col .banner,
.grid-col .box,
.grid-col .box-image,
.grid-col .box-image img,
.grid-col .col-inner>.img,
.grid-col .flickity-slider>.img,
.grid-col .image-cover,
.grid-col .image-cover img,
.grid-col .slider,
.grid-col .slider-wrapper,
.grid-col .slider:not(.flickity-enabled),
.grid-col .slider>.img,
.grid-col>.col-inner>.img,
.grid-col>.col-inner>.img .img-inner>img,
.grid-col>.col-inner>.img div {
    left: 0 !important;
}

.woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
}

.product-thumbnails .flickity-slider .col a {
    border-radius: 12px;
    overflow: hidden;
}

.dgwt-wcas-pd-addtc-form .button.product_type_simple.add_to_cart_button.ajax_add_to_cart a {
    padding: 10px !important;
    line-height: 1.35rem !important;
}

p.name.product-title.woocommerce-loop-product__title a {
    color: #222222;
}

div.add-to-cart-button a {
    width: 100%;
}

.product-small.box .box-text.box-text-products {
    padding-top: 0;
}

.dgwt-wcas-pd-addtc-form .button.product_type_simple.add_to_cart_button.ajax_add_to_cart a {
    padding: 10px !important;
    line-height: 1.35rem !important;
}

.has-equal-box-heights .box-image img {

    object-fit: contain;
    border: 1px solid #9999;
    border-radius: 12px;
    padding: 10px !important;
}

.quantity .trivino-qty-minus {
    border-bottom-right-radius: 0 !important;
    border-right: 0 !important;
    border-top-right-radius: 0 !important;
    margin-right: 0 !important;
    
}
.quantity .trivino-qty-plus {
    border-bottom-left-radius: 0 !important;
    border-left: 0 !important;
    border-top-left-radius: 0 !important;
}
.quantity .trivino-qty-minus, .quantity .trivino-qty-plus {
    padding-left: .4em !important;
    padding-right: .4em !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    color: #666;
    font-weight: 400;
    overflow: hidden;
    position: relative;
    text-shadow: 1px 1px 1px #fff;
    text-transform: none;
    margin-bottom: 0 !important;
}
.quantity input[type=number] {
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
    border-radius: 0 !important;
    font-size: 1em;
    max-width: 2.5em;
    text-align: center;
    width: 2.5em;
}
@media only screen and (max-width: 48em) {

    /*************** ADD MOBILE ONLY CSS HERE  ***************/
    .box-image img {
        margin: 0 auto;
        max-width: 100%;
        height: 250px;
        width: auto;
        object-fit: cover;
    }

    /* En móvil puedes usar menos separación si es necesario */
    .star-rating:before,
    .woocommerce-page .star-rating:before,
    .star-rating span:before {}
}
/* ============================================================
 * MOBILE UX FIXES — 2026-02-14
 * Targeted fixes for 3 critical mobile issues.
 * Rollback: restore from /root/security_backup_20260214/style.css.bak
 * ============================================================ */

/* --- FIX 1: Restore WooCommerce notices (were hidden globally with display:none) --- */
.woocommerce-notices-wrapper,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    display: block !important;
    visibility: visible !important;
}

/* --- FIX 2: Mega-dropdown overflow on mobile (min-width:900px causes horizontal scroll) --- */
@media only screen and (max-width: 1024px) {
    .nav-dropdown,
    .mega-menu,
    .sub-menu {
        min-width: unset !important;
        max-width: 100vw !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        overflow-x: hidden !important;
    }
    /* Hide custom mega-menu on touch devices — let Flatsome mobile nav handle it */
    .header-nav .nav > li > .nav-dropdown {
        position: static !important;
    }
}

/* --- FIX 3: Logo proportions in mobile header --- */
@media only screen and (max-width: 849px) {
    .header-logo img,
    .logo img {
        max-width: 160px !important;
        max-height: 55px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain;
    }
    .header-main {
        min-height: 60px !important;
    }
    /* Prevent search inputs from triggering iOS zoom */
    .trivino-v12-input,
    .search-field,
    input[type="search"],
    .dgwt-wcas-search-input {
        font-size: 16px !important;
    }
}

/* ============================================================
 * MOBILE UX MEJORAS AVANZADAS — 2026-02-14
 * Añadido al child theme agricola-trivino
 * Rollback: cp /root/backups_mobile_ux/style.css.bak [path]/style.css
 * ============================================================ */

/* ---- MEGA-MENÚ CUSTOM: ocultar en móvil y arreglar overflow ---- */
/* En móvil (<768px) Flatsome ya muestra su hamburger menu — ocultar el custom */
@media (max-width: 767px) {
    .megamenu-woo {
        display: none !important;
    }
}

/* En tablet y móvil: mega-dropdown no puede ser 900px de ancho */
@media (max-width: 1200px) {
    .megamenu-dropdown {
        min-width: min(900px, 95vw) !important;
        max-width: 95vw !important;
    }
    /* Centrar el dropdown para que no desborde */
    li.megamenu-item:hover .megamenu-dropdown {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* ---- TOUCH TARGETS: Mínimo 44px (WCAG 2.5.5) ---- */
@media (max-width: 768px) {
    /* Hamburger, carrito, búsqueda en header */
    .header-main .icon,
    .header-main .nav-row .icon,
    .header-main a.icon,
    .header-main button {
        min-width: 44px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Menú móvil Flatsome: items más altos */
    .mobile-sidebar-levels-2 .nav > li > a,
    .nav-sidebar .nav > li > a {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Flechas de submenú: área táctil */
    .nav > li > .nav-dropdown-toggle,
    .mega-toggle-open,
    .mega-toggle-close {
        min-width: 44px !important;
        min-height: 44px !important;
    }
}

/* ---- PRODUCT GALLERY: full-width en móvil ---- */
@media (max-width: 768px) {
    .product-gallery .product-gallery-slider .woocommerce-product-gallery__image img {
        max-width: 100% !important;
        max-height: 320px !important;
    }

    .product-gallery .flickity-viewport {
        max-height: 360px !important;
    }

    /* Thumbnails: más grandes para touch */
    .product-thumbnails img {
        max-width: 70px !important;
        max-height: 70px !important;
        min-width: 60px !important;
        min-height: 60px !important;
    }
}

/* ---- PÁGINA PRODUCTO: botones full-width en móvil ---- */
@media (max-width: 549px) {
    /* Título */
    .product_title.entry-title {
        font-size: 1.4em !important;
        line-height: 1.3 !important;
    }

    /* Precio */
    .price-wrapper .price span.woocommerce-Price-amount {
        font-size: 1.6em !important;
    }

    /* Botón añadir al carrito: full-width */
    .single_add_to_cart_button.button {
        width: 100% !important;
        min-height: 50px !important;
        font-size: 16px !important;
        margin-top: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Selector de cantidad */
    .quantity input[type="number"],
    .quantity input.qty {
        height: 44px !important;
        font-size: 16px !important;
    }

    /* Tabs de descripción: scroll horizontal */
    .woocommerce-tabs ul.tabs {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        display: flex !important;
        gap: 4px !important;
        padding-bottom: 4px !important;
    }
    .woocommerce-tabs ul.tabs li {
        flex-shrink: 0 !important;
    }
}

/* ---- CARRITO Y CHECKOUT ---- */
@media (max-width: 768px) {
    /* Tabla carrito: scroll horizontal */
    .woocommerce-cart-form .shop_table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Botones carrito full-width */
    .wc-proceed-to-checkout .checkout-button {
        width: 100% !important;
        min-height: 50px !important;
        font-size: 16px !important;
        text-align: center !important;
    }

    /* Inputs checkout: evitar zoom iOS (font-size >= 16px) */
    .woocommerce-checkout input[type="text"],
    .woocommerce-checkout input[type="email"],
    .woocommerce-checkout input[type="tel"],
    .woocommerce-checkout input[type="number"],
    .woocommerce-checkout textarea,
    .woocommerce-checkout select {
        font-size: 16px !important;
        height: 48px !important;
        border-radius: 8px !important;
    }
    .woocommerce-checkout textarea {
        height: auto !important;
        min-height: 80px !important;
    }

    /* Botón pagar */
    #place_order {
        width: 100% !important;
        min-height: 54px !important;
        font-size: 17px !important;
    }
}

/* ---- MINI-CART DRAWER ---- */
@media (max-width: 768px) {
    /* Botones del mini-cart */
    .widget_shopping_cart .buttons .button {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 8px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Espaciado items */
    .widget_shopping_cart .cart_list li {
        padding: 12px 0 !important;
    }
}

/* ---- TIPOGRAFÍA FLUIDA MÓVIL ---- */
@media (max-width: 768px) {
    body {
        line-height: 1.65 !important;
    }
    h1 { font-size: clamp(1.4rem, 5vw, 2.2rem) !important; }
    h2 { font-size: clamp(1.2rem, 4vw, 1.8rem) !important; }
    h3 { font-size: clamp(1.05rem, 3.5vw, 1.4rem) !important; }
}

/* ---- SAFE AREA: soporte notch iPhone X+ ---- */
@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .absolute-footer,
        footer#footer {
            padding-bottom: max(env(safe-area-inset-bottom), 12px) !important;
        }
    }
}

/* ---- SCROLL PERFORMANCE en listas de productos ---- */
@media (max-width: 1024px) {
    .meili-sidebar,
    .widget_shopping_cart .cart_list,
    .woocommerce-tabs {
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
    }
}

/* ---- RESULTADOS MEILISEARCH EN MÓVIL ---- */
@media (max-width: 549px) {
    /* 1 columna en móvil pequeño */
    .ais-InfiniteHits-list {
        grid-template-columns: 1fr !important;
    }

    /* Live results más fáciles de tocar */
    .live-item-link {
        padding: 14px 16px !important;
        min-height: 72px !important;
    }
}

/* ---- BARRA ENVÍO GRATUITO: compacta en móvil ---- */
@media (max-width: 549px) {
    .devnet-fsl-free-shipping,
    .at-premium-wrapper {
        padding: 14px !important;
    }
    .devnet-fsl-free-shipping .fsl-title,
    .at-header {
        font-size: 13px !important;
    }
}

/* ============================================================
 * MOBILE UX MEJORAS AVANZADAS — 2026-02-14
 * Child theme: agricola-trivino
 * Rollback: cp /root/backups_mobile_ux/style.css.bak [path]/style.css
 * ============================================================ */

/* MEGA-MENU: ocultar en movil, Flatsome hamburger lo reemplaza */
@media (max-width: 767px) {
    .megamenu-woo {
        display: none !important;
    }
}

/* MEGA-DROPDOWN: prevenir desbordamiento horizontal en tablets */
@media (max-width: 1200px) {
    .megamenu-dropdown {
        min-width: min(900px, 95vw) !important;
        max-width: 95vw !important;
    }
    li.megamenu-item:hover .megamenu-dropdown {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* TOUCH TARGETS: minimo 44px (WCAG 2.5.5) */
@media (max-width: 768px) {
    .header-main .icon,
    .header-main .nav-row .icon,
    .header-main a.icon,
    .header-main button {
        min-width: 44px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .mobile-sidebar-levels-2 .nav > li > a,
    .nav-sidebar .nav > li > a {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
    }
    .nav > li > .nav-dropdown-toggle,
    .mega-toggle-open,
    .mega-toggle-close {
        min-width: 44px !important;
        min-height: 44px !important;
    }
}

/* PRODUCT GALLERY: full-width en movil */
@media (max-width: 768px) {
    .product-gallery .product-gallery-slider .woocommerce-product-gallery__image img {
        max-width: 100% !important;
        max-height: 320px !important;
    }
    .product-gallery .flickity-viewport {
        max-height: 360px !important;
    }
    .product-thumbnails img {
        max-width: 70px !important;
        max-height: 70px !important;
        min-width: 60px !important;
        min-height: 60px !important;
    }
}

/* PAGINA PRODUCTO: boton full-width en movil */
@media (max-width: 549px) {
    .product_title.entry-title {
        font-size: 1.4em !important;
        line-height: 1.3 !important;
    }
    .price-wrapper .price span.woocommerce-Price-amount {
        font-size: 1.6em !important;
    }
    .single_add_to_cart_button.button {
        width: 100% !important;
        min-height: 50px !important;
        font-size: 16px !important;
        margin-top: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .quantity input[type="number"],
    .quantity input.qty {
        height: 44px !important;
        font-size: 16px !important;
    }
    .woocommerce-tabs ul.tabs {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        display: flex !important;
        gap: 4px !important;
        padding-bottom: 4px !important;
    }
    .woocommerce-tabs ul.tabs li {
        flex-shrink: 0 !important;
    }
}

/* CARRITO Y CHECKOUT */
@media (max-width: 768px) {
    .woocommerce-cart-form .shop_table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .wc-proceed-to-checkout .checkout-button {
        width: 100% !important;
        min-height: 50px !important;
        font-size: 16px !important;
        text-align: center !important;
    }
    .woocommerce-checkout input[type="text"],
    .woocommerce-checkout input[type="email"],
    .woocommerce-checkout input[type="tel"],
    .woocommerce-checkout input[type="number"],
    .woocommerce-checkout textarea,
    .woocommerce-checkout select {
        font-size: 16px !important;
        height: 48px !important;
        border-radius: 8px !important;
    }
    .woocommerce-checkout textarea {
        height: auto !important;
        min-height: 80px !important;
    }
    #place_order {
        width: 100% !important;
        min-height: 54px !important;
        font-size: 17px !important;
    }
}

/* MINI-CART DRAWER */
@media (max-width: 768px) {
    .widget_shopping_cart .buttons .button {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 8px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .widget_shopping_cart .cart_list li {
        padding: 12px 0 !important;
    }
}

/* TIPOGRAFIA FLUIDA */
@media (max-width: 768px) {
    body { line-height: 1.65 !important; }
    h1 { font-size: clamp(1.4rem, 5vw, 2.2rem) !important; }
    h2 { font-size: clamp(1.2rem, 4vw, 1.8rem) !important; }
    h3 { font-size: clamp(1.05rem, 3.5vw, 1.4rem) !important; }
}

/* SAFE AREA: soporte notch iPhone X+ */
@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .absolute-footer,
        footer#footer {
            padding-bottom: max(env(safe-area-inset-bottom), 12px) !important;
        }
    }
}

/* MEILISEARCH EN MOVIL: 1 columna */
@media (max-width: 549px) {
    .ais-InfiniteHits-list {
        grid-template-columns: 1fr !important;
    }
    .live-item-link {
        padding: 14px 16px !important;
        min-height: 72px !important;
    }
}

/* BARRA ENVIO GRATUITO */
@media (max-width: 549px) {
    .devnet-fsl-free-shipping,
    .at-premium-wrapper {
        padding: 14px !important;
    }
    .devnet-fsl-free-shipping .fsl-title,
    .at-header {
        font-size: 13px !important;
    }
}





/* ---- GOOGLE LOGIN: Official Branding — FIXED 2026-02-17 ---- */

/* 1. HIDE ALL LEGACY AND REDUNDANT BUTTONS */
.nsl-container-embedded, 
.nsl-container-free, 
.nsl-container-floating,
.nsl-container-inline,
#nsl-custom-login-form-main,
.nsl-container-below-separator .nsl-container-inline {
    display: none !important;
}

/* 2. STYLE THE CORRECT CONTAINER (BELOW SEPARATOR) */
.nsl-container-below-separator {
    display: block !important;
    margin: 35px 0 25px 0 !important;
    padding: 0 5% !important;
    clear: both !important;
}

.nsl-container-separator {
    margin-bottom: 25px !important;
    color: #555 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nsl-container-separator:before, 
.nsl-container-separator:after {
    content: "" !important;
    flex: 1 !important;
    height: 1px !important;
    background: linear-gradient(to right, transparent, #008554, transparent) !important;
    margin: 0 15px !important;
    opacity: 0.3 !important;
}

/* 3. PREMIUM GOOGLE BUTTON AESTHETICS */
.nsl-button-google {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 46px !important;
    background-color: #ffffff !important;
    border: 1px solid #dadce0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.nsl-button-google:hover {
    background-color: #f8f9fa !important;
    border-color: #d2e3fc !important;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.30), 0 1px 3px 1px rgba(60,64,67,0.15) !important;
}

.nsl-button-google .nsl-button-svg-container {
    margin-right: 12px !important;
    display: flex !important;
    align-items: center !important;
}

.nsl-button-google .nsl-button-label-container {
    color: #3c4043 !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    font-family: 'Roboto', 'Inter', sans-serif !important;
}

/* Specific fix for that top orange button if it persists via ID */
div[id*="nsl-container"] {
    max-width: 100% !important;
}


/* ============================================================
 * CODEX PAGESPEED FIX - Logo aspect ratio (global, todas las pantallas)
 * Flatsome customizer puede establecer height fijo en .header-logo img
 * Si solo se fija height sin width:auto, el logo se estira horizontalmente.
 * Este bloque asegura que la proporcion se mantenga en TODOS los dispositivos.
 * Fecha: 2026-02-18
 * ============================================================ */
.header-logo img,
.logo img {
    /* Preservar aspect ratio - Flatsome puede inyectar height fijo via customizer */
    height: auto !important;
    width: auto !important;
    object-fit: contain;
    /* Dimensiones maximas razonables en desktop */
    max-height: 80px;
    max-width: 220px;
}

/* ============================================================
 * MOBILE UX FIX — 2026-04-22
 * 1. Sticky header en mobile tapa el contenido al scroll porque incluye
 *    logo row (70px) + search bar row (60px) = 130px. Ocultamos la search
 *    bar cuando el header esta stuck: solo 70px sticky, mas area util.
 * 2. scroll-padding-top para que los saltos de ancla no queden ocultos.
 * 3. Tipografia legible en tiles de productos y contadores de categoria.
 * ============================================================ */
@media (max-width: 849px) {
    /* 1. Hide search bar row while header is stuck — search bar sigue disponible al subir */
    .header-wrapper.stuck .header-bottom,
    .header-wrapper.stuck #wide-nav {
        display: none !important;
    }
    /* Shrink bg overlay to match the visible logo row so no transparent strip queda */
    .header-wrapper.stuck .header-bg-container {
        height: 70px !important;
    }
    /* Forzar bg solido en la logo row para evitar que el texto de la pagina se vea al trasluz */
    .header-wrapper.stuck .header-main,
    .header-wrapper.stuck #masthead {
        background-color: #ffffff !important;
    }
}

/* 2. Anclas (scroll a fragmento) no quedan ocultas bajo el header */
html {
    scroll-padding-top: 80px;
}

/* 3. Legibilidad en mobile */
@media (max-width: 549px) {
    /* Botones "Añadir al carrito" en tiles de home */
    .product-small .button.add_to_cart_button,
    .product-small a.add_to_cart_button,
    .product .button.add_to_cart_button {
        font-size: 13px !important;
        padding: 8px 10px !important;
    }
    /* Nombre de categoria en tiles */
    .product-small .name.product-title,
    .product-small .category-title,
    .category-small p,
    .col-inner .name.product-title {
        font-size: 12.5px !important;
    }
    /* Contadores "X productos" en cards de categoria */
    .category-page-title .count,
    .product-category p,
    .product-category .count,
    .category-item p.count,
    .shop-container .count {
        font-size: 12px !important;
    }
    /* Subtitulo de categoria en home tiles que aparece a 10.2px */
    .box-category .box-text p,
    .box-category .box-text .is-smaller {
        font-size: 12.5px !important;
        line-height: 1.3 !important;
    }
}
