/*
 * CÉFIRO SHOP — AJUSTES VISUALES
 * 1. Encabezado compacto en celular.
 * 2. Tarjetas de categorías más altas en escritorio.
 * 3. Imágenes completas, sin recorte ni deformación.
 */

:root {
    --cefiro-product-image-bg: #f3eee6;
}

.cefiro-option--color,
.cefiro-option--color-fabric i,
.cefiro-loop-swatches [data-color] {
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: cover !important;
}

/* Tarjetas Mujer / Hombre / Accesorios — escritorio */
@media (min-width: 761px) {
    .cefiro-shop-categories .cefiro-category-card {
        min-height: 370px !important;
    }

    .cefiro-category-card--women {
        background-position: center 30% !important;
    }

    .cefiro-category-card--men {
        background-position: center 29% !important;
    }

    .cefiro-category-card--accessories {
        background-position: center 54% !important;
    }
}

/* Miniaturas del catálogo: mismo marco, imagen completa */
.cefiro-shop-shell .woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 5 !important;
    object-fit: contain !important;
    object-position: center center !important;
    background-color: var(--cefiro-product-image-bg) !important;
}

/* Galería de la página individual: evita saltos, cortes y estiramientos */
.single-product .woocommerce-product-gallery__wrapper {
    background-color: var(--cefiro-product-image-bg);
}

.single-product .woocommerce-product-gallery__image {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: var(--cefiro-product-image-bg);
}

.single-product .woocommerce-product-gallery__image > a {
    display: flex !important;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.single-product .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs img {
    width: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: contain !important;
    background-color: var(--cefiro-product-image-bg);
}

/* Galería personalizada del tema Céfiro.
 * Mantiene un marco vertical uniforme aun cuando la foto original sea
 * cuadrada, horizontal o vertical. La imagen se muestra completa. */
.single-product .cefiro-product-shell .cefiro-gallery-ready .cefiro-gallery-stage {
    display: flex !important;
    width: 100% !important;
    aspect-ratio: 4 / 5 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    background-color: var(--cefiro-product-image-bg) !important;
}

.single-product .cefiro-product-shell .cefiro-gallery-ready .cefiro-gallery-stage > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    background-color: var(--cefiro-product-image-bg) !important;
}

.single-product .cefiro-product-shell .cefiro-gallery-ready .cefiro-gallery-thumbs img,
.single-product .cefiro-product-shell .cefiro-gallery-ready .cefiro-color-card img {
    width: 100% !important;
    aspect-ratio: 4 / 5 !important;
    object-fit: contain !important;
    object-position: center center !important;
    background-color: var(--cefiro-product-image-bg) !important;
}

/* Celular: el encabezado deja de ocupar la primera pantalla completa */
@media (max-width: 760px) {
    .cefiro-shop-categories .cefiro-category-card,
    .cefiro-shop-categories .cefiro-category-card:visited,
    .cefiro-shop-categories .cefiro-category-card:hover,
    .cefiro-shop-categories .cefiro-category-card:focus,
    .cefiro-shop-categories .cefiro-category-card span {
        color: #f7f3ec !important;
        opacity: 1 !important;
    }

    .cefiro-shop-categories .cefiro-category-card span {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
    }

    body.woocommerce-shop .shop-hero,
    body.tax-product_cat .shop-hero,
    body.cefiro-woocommerce .shop-hero {
        min-height: 0 !important;
        height: auto !important;
        padding: 24px 22px 18px !important;
        background: #f7f3ec !important;
    }

    body.woocommerce-shop .shop-hero h1,
    body.tax-product_cat .shop-hero h1,
    body.cefiro-woocommerce .shop-hero h1 {
        margin: 0 !important;
        font-size: 2.5rem !important;
        line-height: 1.05 !important;
    }

    body.woocommerce-shop .shop-hero .cefiro-title-rule,
    body.tax-product_cat .shop-hero .cefiro-title-rule,
    body.cefiro-woocommerce .shop-hero .cefiro-title-rule {
        margin-top: 14px !important;
    }
}

/* Sustituye la paginación tradicional por un botón progresivo. */
.cefiro-load-more-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 52px 0 18px;
}

.cefiro-load-more-button {
    min-width: 230px;
    padding: 17px 28px;
    border: 1px solid #393630;
    color: #f7f3ec;
    background: #393630;
    font: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.cefiro-load-more-button:hover,
.cefiro-load-more-button:focus {
    background: #575148;
}

.cefiro-load-more-button:disabled {
    opacity: 0.58;
    cursor: wait;
}

@media (max-width: 760px) {
    .cefiro-load-more-wrap {
        margin-top: 38px;
    }

    .cefiro-load-more-button {
        width: calc(100% - 44px);
    }
}

