/* =========================================================
   SEF CATALOG HOVER IMAGE 1.4.2
   FOTO COMPLETA + TALLAS + SIN BOTÓN "SELECCIONAR OPCIONES"
   ========================================================= */

body.woocommerce-shop [data-block-name="woocommerce/product-image"],
body.post-type-archive-product [data-block-name="woocommerce/product-image"],
body.woocommerce-shop .wp-block-woocommerce-product-image,
body.post-type-archive-product .wp-block-woocommerce-product-image,
body.woocommerce-shop .wc-block-components-product-image,
body.post-type-archive-product .wc-block-components-product-image{
    position:relative !important;
}

/* SEGUNDA IMAGEN */
body.woocommerce-shop .sef-product-hover-image,
body.post-type-archive-product .sef-product-hover-image{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
    object-position:center bottom !important;
    margin:0 !important;
    padding:0 !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    z-index:5 !important;
    transition:opacity .32s ease,visibility .32s ease,transform .45s cubic-bezier(.22,.61,.36,1) !important;
}

body.woocommerce-shop .sef-hover-image-ready > img:not(.sef-product-hover-image),
body.post-type-archive-product .sef-hover-image-ready > img:not(.sef-product-hover-image){
    position:relative !important;
    z-index:2 !important;
    transition:opacity .32s ease,transform .45s cubic-bezier(.22,.61,.36,1) !important;
}

/* EN HOVER LA PRIMERA DESAPARECE COMPLETAMENTE */
body.woocommerce-shop .sef-hover-active > img:not(.sef-product-hover-image),
body.post-type-archive-product .sef-hover-active > img:not(.sef-product-hover-image){
    opacity:0 !important;
}

body.woocommerce-shop .sef-hover-active .sef-product-hover-image,
body.post-type-archive-product .sef-hover-active .sef-product-hover-image{
    opacity:1 !important;
    visibility:visible !important;
    transform:scale(1.035) !important;
}

/* BARRA DE TALLAS */
body.woocommerce-shop .sef-catalog-sizes,
body.post-type-archive-product .sef-catalog-sizes{
    position:absolute !important;
    left:14px !important;
    right:14px !important;
    bottom:14px !important;
    z-index:12 !important;
    min-height:44px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:12px !important;
    box-sizing:border-box !important;
    padding:8px 12px !important;
    background:rgba(248,245,240,.97) !important;
    box-shadow:0 4px 16px rgba(0,0,0,.07) !important;
    opacity:0 !important;
    visibility:hidden !important;
    transform:translateY(8px) !important;
    transition:opacity .28s ease,visibility .28s ease,transform .28s ease !important;
    pointer-events:auto !important;
}

body.woocommerce-shop .sef-hover-active .sef-catalog-sizes,
body.post-type-archive-product .sef-hover-active .sef-catalog-sizes{
    opacity:1 !important;
    visibility:visible !important;
    transform:translateY(0) !important;
}

body.woocommerce-shop .sef-catalog-sizes-title,
body.post-type-archive-product .sef-catalog-sizes-title{
    flex:0 0 auto !important;
    font-size:9px !important;
    font-weight:600 !important;
    letter-spacing:.08em !important;
    color:#555 !important;
}

body.woocommerce-shop .sef-catalog-sizes-list,
body.post-type-archive-product .sef-catalog-sizes-list{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex-wrap:wrap !important;
    gap:5px !important;
}

body.woocommerce-shop .sef-catalog-size,
body.post-type-archive-product .sef-catalog-size{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:28px !important;
    height:28px !important;
    padding:0 5px !important;
    box-sizing:border-box !important;
    border:1px solid rgba(20,20,20,.15) !important;
    background:#fff !important;
    color:#111 !important;
    font-size:11px !important;
    font-weight:500 !important;
    line-height:1 !important;
    text-decoration:none !important;
    transition:background .22s ease,color .22s ease,border-color .22s ease,transform .22s ease,box-shadow .22s ease !important;
}

@media (hover:hover) and (pointer:fine){
    body.woocommerce-shop .sef-catalog-size.is-available:hover,
    body.post-type-archive-product .sef-catalog-size.is-available:hover{
        background:#111 !important;
        color:#fff !important;
        border-color:#111 !important;
        transform:translateY(-2px) !important;
        box-shadow:0 3px 8px rgba(0,0,0,.12) !important;
    }
}

body.woocommerce-shop .sef-catalog-size.is-disabled,
body.post-type-archive-product .sef-catalog-size.is-disabled{
    color:#aaa !important;
    background:rgba(255,255,255,.45) !important;
    border-color:rgba(20,20,20,.08) !important;
    opacity:.6 !important;
    cursor:not-allowed !important;
    text-decoration:line-through !important;
    pointer-events:none !important;
}

/* =========================================================
   OCULTAR BOTÓN "SELECCIONAR OPCIONES" SOLO EN VARIABLE
   ========================================================= */

body.woocommerce-shop
.wp-block-woocommerce-product-template > li.product-type-variable
.wp-block-woocommerce-product-button,

body.post-type-archive-product
.wp-block-woocommerce-product-template > li.product-type-variable
.wp-block-woocommerce-product-button,

body.woocommerce-shop
li.product-type-variable
.wc-block-components-product-button,

body.post-type-archive-product
li.product-type-variable
.wc-block-components-product-button{
    display:none !important;
}

/* Fallback por enlace WooCommerce de variable */
body.woocommerce-shop a[href*="product"][class*="wp-block-button"]:has(span),
body.post-type-archive-product a[href*="product"][class*="wp-block-button"]:has(span){
}

/* MÓVIL */
@media (hover:none),(pointer:coarse){
    .sef-product-hover-image,
    .sef-catalog-sizes{
        display:none !important;
    }
}


/* =========================================================
   1.4.3 — CATÁLOGO LIMPIO ESTILO STUDIO F
   Quitar botones debajo de las tarjetas
   ========================================================= */

/* Oculta "Añadir al carrito" y "Seleccionar opciones" */
body.woocommerce-shop
.wp-block-woocommerce-product-template > li
.wp-block-woocommerce-product-button,

body.post-type-archive-product
.wp-block-woocommerce-product-template > li
.wp-block-woocommerce-product-button,

body.woocommerce-shop
.wp-block-woocommerce-product-template > li
.wc-block-components-product-button,

body.post-type-archive-product
.wp-block-woocommerce-product-template > li
.wc-block-components-product-button{
    display:none !important;
}


/* Compactar el espacio inferior de cada tarjeta */
body.woocommerce-shop
.wp-block-woocommerce-product-template > li,

body.post-type-archive-product
.wp-block-woocommerce-product-template > li{
    row-gap:4px !important;
}


/* Nombre más cerca de la imagen */
body.woocommerce-shop
.wp-block-woocommerce-product-template > li
.wp-block-post-title,

body.post-type-archive-product
.wp-block-woocommerce-product-template > li
.wp-block-post-title{
    margin-top:6px !important;
    margin-bottom:2px !important;
}


/* Precio pegado al nombre */
body.woocommerce-shop
.wp-block-woocommerce-product-template > li
.wp-block-woocommerce-product-price,

body.post-type-archive-product
.wp-block-woocommerce-product-template > li
.wp-block-woocommerce-product-price,

body.woocommerce-shop
.wp-block-woocommerce-product-template > li
.wc-block-components-product-price,

body.post-type-archive-product
.wp-block-woocommerce-product-template > li
.wc-block-components-product-price{
    margin-top:0 !important;
    margin-bottom:8px !important;
}
