/*
Theme Name: Styler Child
Template: styler
Version: 1.0
Text Domain: styler-child
*/

/* ─────────────────────────────────────────────
   TARJETAS DE PRODUCTO — clases reales de Styler
   ───────────────────────────────────────────── */

/* Contenedor principal de cada tarjeta */
.woocommerce .styler-product,
ul.products li.product {
    border: 1px solid #e8e5e0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #fff !important;
    padding: 0 !important;
}

/* Imagen: altura fija, cubre bien */
.styler-thumb-wrapper,
.woocommerce .styler-product .styler-thumb-wrapper {
    overflow: hidden !important;
    border-radius: 0 !important;
}

.styler-thumb-wrapper img,
.woocommerce .styler-product .styler-thumb-wrapper img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
    transition: none !important;
}

@media (max-width: 767px) {
    .styler-thumb-wrapper img,
    .woocommerce .styler-product .styler-thumb-wrapper img {
        height: 170px !important;
    }
}

/* Zona de texto debajo de la imagen */
.woocommerce .styler-product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    color: #1a1a1a !important;
    padding: 9px 10px 2px !important;
    margin: 0 !important;
}

/* Precio principal */
.woocommerce .styler-product .price,
.woocommerce ul.products li.product .price {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    padding: 0 10px 2px !important;
    margin: 0 !important;
    display: block !important;
}

.woocommerce .styler-product .price del,
.woocommerce ul.products li.product .price del {
    font-size: 11px !important;
    color: #bbb !important;
    font-weight: 400 !important;
}

.woocommerce .styler-product .price ins,
.woocommerce ul.products li.product .price ins {
    text-decoration: none !important;
    font-weight: 500 !important;
}

/* Precios extra (cuotas + transferencia) */
.woocommerce .styler-product .amuleto-precios-extra,
.amuleto-precios-extra {
    padding: 0 10px 8px !important;
}

/* Botón agregar al carrito — siempre visible, full width */
.woocommerce .styler-product .add_to_cart_button,
.woocommerce .styler-product a.button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product a.button {
    display: block !important;
    width: 100% !important;
    margin: 4px 0 0 !important;
    padding: 11px 10px !important;
    background: #1a1a1a !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-align: center !important;
    border-radius: 0 !important;
    border: none !important;
    letter-spacing: .04em !important;
    cursor: pointer !important;
    text-transform: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    transform: none !important;
}

.woocommerce .styler-product .add_to_cart_button:hover,
.woocommerce ul.products li.product a.button:hover {
    background: #333 !important;
    color: #fff !important;
}

/* Ocultar overlay/hover que Styler pone encima de la imagen */
.woocommerce .styler-product .styler-product-buttons,
.woocommerce .styler-product .button-wrapper-hover {
    display: none !important;
}

/* Badge de oferta */
.woocommerce .styler-product .styler-product-labels,
.woocommerce ul.products li.product .onsale {
    top: 8px !important;
    left: 8px !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    padding: 3px 7px !important;
    border-radius: 3px !important;
    background: #1a1a1a !important;
    color: #fff !important;
}

/* ─────────────────────────────────────────────
   GRILLA — 2 columnas en mobile, 3 en desktop
   ───────────────────────────────────────────── */

@media (max-width: 767px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        padding: 0 !important;
    }

    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        width: 100% !important;
        margin: 0 !important;
        float: none !important;
    }
}

@media (min-width: 768px) {
    .woocommerce ul.products.columns-3,
    .woocommerce-page ul.products.columns-3 {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px !important;
    }

    .woocommerce ul.products.columns-4,
    .woocommerce-page ul.products.columns-4 {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 16px !important;
    }
}

/* ─────────────────────────────────────────────
   BARRA DE ENVÍO GRATIS — no tapar nav de Styler
   ───────────────────────────────────────────── */

/* El nav inferior de Styler usa estas clases — lo ponemos encima */
.styler-mobile-nav,
.styler-sticky-nav,
.styler-bottom-bar,
[class*="styler-nav"],
[class*="mobile-bar"] {
    z-index: 9995 !important;
}

/* La barra de envío va justo encima del nav inferior de Styler */
#amuleto-ship-bar-fixed {
    bottom: 56px !important;
    z-index: 9990 !important;
}

/* Padding al body para que el contenido no quede tapado */
@media (max-width: 767px) {
    body {
        padding-bottom: 108px !important;
    }
}

@media (min-width: 768px) {
    #amuleto-ship-bar-fixed {
        bottom: 0 !important;
    }

    body {
        padding-bottom: 52px !important;
    }
}

/* ─────────────────────────────────────────────
   ANNOUNCEMENT BAR
   ───────────────────────────────────────────── */

.amuleto-announce {
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    text-align: center;
    padding: 7px 12px;
    letter-spacing: .03em;
    width: 100%;
}

@media (max-width: 480px) {
    .amuleto-announce {
        font-size: 10px;
        padding: 6px 10px;
    }
}
/* Ocultar botones circulares y overlay de Styler */
.woocommerce .styler-product .woocommerce.flex,
.styler-product .woocommerce.flex,
.styler-add-buttons,
.styler-product-buttons,
.product-buttons-wrapper,
.styler-thumb-buttons,
.styler-product .loading-wrapper {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
/* ─────────────────────────────────────────────
   BOTÓN AGREGAR — transformar de círculo a barra
   ───────────────────────────────────────────── */

/* Ocultar el ícono SVG del carrito dentro del botón */
a.styler-btn-small svg,
a.styler-btn-small .styler-svg-icon {
    display: none !important;
}

/* Ocultar el botón de Vista Rápida */
.styler-quickview-btn,
.styler-product-button {
    display: none !important;
}

/* Mostrar el texto "Agregar" que ya está en data-label */
a.styler-btn-small::after {
    content: attr(data-label) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: .04em !important;
}

/* Convertir el botón circular en barra full width */
a.styler-btn-small.add_to_cart_button {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 40px !important;
    padding: 11px 10px !important;
    background: #1a1a1a !important;
    color: #fff !important;
    border-radius: 0 !important;
    border: none !important;
    text-align: center !important;
    box-shadow: none !important;
    margin: 6px 0 0 !important;
    position: static !important;
    transform: none !important;
    /* Quitar estilos de círculo del tema */
    clip-path: none !important;
    aspect-ratio: auto !important;
}

a.styler-btn-small.add_to_cart_button:hover {
    background: #333 !important;
    color: #fff !important;
}

/* El contenedor de los botones — quitarle el flex circular */
.woocommerce .styler-product .woocommerce.flex {
    display: block !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: none !important;
}
/* Forzar el contenedor de botones a comportarse como bloque normal */
.woocommerce .styler-product .woocommerce.flex,
.styler-product > .woocommerce {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    padding: 0 !important;
    margin: 0 !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    overflow: visible !important;
}

/* Ocultar el ícono SVG y mostrar solo el texto */
a.styler-btn-small svg {
    display: none !important;
}

a.styler-btn-small.add_to_cart_button::after {
    content: "Agregar" !important;
    display: block !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: .04em !important;
    color: #fff !important;
}

/* Ocultar quickview definitivamente */
.styler-quickview-btn,
.styler-product-button:not(.add_to_cart_button) {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
/* Ocultar todos los botones propios de Styler */
.styler-btn-small,
.styler-quickview-btn,
.styler-product-button,
.styler-add-to-cart,
.woocommerce .styler-product .woocommerce.flex {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Nuestro botón */
.amuleto-btn-agregar {
    display: block !important;
    width: 100% !important;
    padding: 11px 10px !important;
    background: #1a1a1a !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-align: center !important;
    letter-spacing: .04em !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    margin-top: 8px !important;
    border-radius: 0 !important;
}

.amuleto-btn-agregar:hover {
    background: #333 !important;
    color: #fff !important;
}