/* ========================================
   GLAMOUR ATELIER 1978 — Product Card & Archive
   Consolidato v2.0 — Code Snippet + Child Theme
   ======================================== */

/* ========================================
   A · LAYOUT ARCHIVIO A SCHERMO INTERO
   ======================================== */
body.woocommerce.archive #content,
body.woocommerce.archive #primary,
body.woocommerce.archive .site-main,
body.woocommerce.archive .ast-container,
body.woocommerce.archive .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 auto !important;
}

.woocommerce-breadcrumb,
.ast-breadcrumbs-wrapper,
.elementor-widget-woocommerce-breadcrumb {
    display: none !important;
}

body.woocommerce.archive h1.woocommerce-products-header__title.page-title,
body.woocommerce.archive .woocommerce-products-header__title {
    text-align: center !important;
    font-family: 'Libre Caslon Text', 'Caslon', serif !important;
    font-style: italic !important;
    font-weight: 400 !important;
    font-size: 46px !important;
    letter-spacing: 0.5px !important;
    color: #060506 !important;
    margin: 80px 0 50px !important;
    width: 100% !important;
    display: block !important;
}

.woocommerce-products-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

/* ========================================
   B · GRIGLIA PRODOTTI
   ======================================== */
.woof_shortcode_output ul.products,
ul.products.columns-4,
.woocommerce ul.products,
#woof_products_shortcode ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 120px !important;
    float: none !important;
    width: 100% !important;
    grid-template-rows: auto !important;
}

.woof_shortcode_output ul.products li.product,
ul.products.columns-4 li.product {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woof_shortcode_output ul.products li.glamour-card:first-child {
    grid-column-start: 1 !important;
}

/* ========================================
   C · CARD BASE
   ======================================== */
.glamour-card {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: none !important;
}

/* Wrapper interno — necessario per layout flex delle card */
.glamour-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ========================================
   D · SLIDER IMMAGINI
   ======================================== */
.glamour-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 0 !important;
}

.glamour-slider-track {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5 !important;
    overflow: hidden;
    border-radius: 0 !important;
}

.glamour-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: block;
    text-decoration: none;
    pointer-events: none;
}

.glamour-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.glamour-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.glamour-lazy { background: #f0f0f0; }
.glamour-lazy[src] { background: transparent; }

/* ========================================
   E · FRECCE SLIDER — SVG
   ======================================== */
.glamour-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    border: none !important;
    background-color: rgba(255, 255, 255, 0.65) !important;
    font-size: 0 !important;
    color: transparent !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 18px 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    opacity: 1 !important;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    -webkit-appearance: none;
    appearance: none;
}

.glamour-arrow--prev {
    left: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23060506' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E") !important;
}

.glamour-arrow--next {
    right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23060506' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") !important;
}

.glamour-arrow:hover {
    background-color: rgba(255, 255, 255, 0.95) !important;
    transform: translateY(-50%) scale(1.05);
}

.glamour-slider[data-total="1"] .glamour-arrow { display: none !important; }

/* ========================================
   F · DOTS NAVIGAZIONE (PILL)
   ======================================== */
.glamour-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 0 12px;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
    z-index: 2;
}

.glamour-dot {
    width: 10px;
    height: 4px;
    border-radius: 50px !important;
    border: none !important;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5) !important;
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.glamour-dot:hover { background: rgba(255, 255, 255, 0.8) !important; }
.glamour-dot.active {
    background: #fff !important;
    width: 24px;
}

.glamour-slider[data-total="1"] .glamour-dots { display: none; }

/* ========================================
   G · INFO CARD — TITOLO + COLORI
   ======================================== */
.glamour-card-info {
    padding: 14px 2px 0;
    text-align: center;
}

.glamour-card-title,
body.woocommerce.archive ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    line-height: 1.4 !important;
    margin: 0 0 10px !important;
    text-align: center !important;
    color: #060506 !important;
}

.glamour-card-title a,
body.woocommerce.archive ul.products li.product .woocommerce-loop-product__title a {
    color: #060506 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.glamour-card-title a:hover,
body.woocommerce.archive ul.products li.product .woocommerce-loop-product__title a:hover {
    color: #888 !important;
}

.glamour-colors {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 2px 0 4px;
}

.glamour-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0,0,0,0.15);
    box-sizing: border-box;
    cursor: default !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glamour-swatch--light { border-color: rgba(0,0,0,0.25); }
.glamour-swatch:hover { transform: scale(1.15); box-shadow: 0 0 0 2px rgba(212,175,55,0.4); }

/* ========================================
   H · ELEMENTI WOOCOMMERCE NASCOSTI
   ======================================== */
.glamour-card .woocommerce-loop-product__title,
.glamour-card .price,
.glamour-card .star-rating,
.glamour-card .button,
.glamour-card .add_to_cart_button,
.glamour-card .onsale,
.woof_shortcode_output .woocommerce-result-count,
.woof_shortcode_output .woocommerce-ordering,
.woof_shortcode_output ul.products::before,
.woof_shortcode_output ul.products::after,
.woof_shortcode_output ul.products li.woocommerce-info {
    display: none !important;
}

/* ========================================
   I · OVERFLOW FIX CONTENITORI
   ======================================== */
.woof_shortcode_output,
.woof_shortcode_output ul.products,
.elementor-archive-products,
.e-con:has(.woof_shortcode_output),
.glamour-products-wrap {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
}

.glamour-products-wrap {
    display: block !important;
    flex: 0 1 auto !important;
}

/* ========================================
   J · FILTRI ATTIVI (TOP PANEL HUSKY)
   ======================================== */
body .woof_products_top_panel {
    margin: 0 0 30px !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
}

body .woof_products_top_panel ul.woof_products_top_panel_ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px 15px !important;
    align-items: center !important;
}

body .woof_products_top_panel ul.woof_products_top_panel_ul li {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    color: #888 !important;
    display: flex !important;
    align-items: center !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body .woof_products_top_panel a.woof_remove_ppi {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #060506 !important;
    background: #fff !important;
    border: 1px solid #EAEAEA !important;
    border-radius: 50px !important;
    padding: 6px 14px !important;
    margin-left: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03) !important;
    transition: border-color 0.3s ease, background-color 0.3s ease !important;
}

body .woof_products_top_panel a.woof_remove_ppi:hover {
    border-color: #060506 !important;
    background: #F9F9F9 !important;
}

body .woof_products_top_panel a.woof_remove_ppi img,
body .woof_products_top_panel .woof_remove_ppi img {
    display: none !important;
}

body .woof_products_top_panel a.woof_remove_ppi::after {
    content: '\2715' !important;
    font-size: 10px !important;
    margin-left: 8px !important;
    font-weight: 600 !important;
    color: #A0A0A0 !important;
    transition: color 0.3s ease !important;
    display: inline-block !important;
}

body .woof_products_top_panel a.woof_remove_ppi:hover::after {
    color: #060506 !important;
}

body .woof_products_top_panel .woof_reset_button_2 {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 0 0 10px !important;
    font-size: 0 !important;
    color: transparent !important;
    display: inline-block !important;
}

body .woof_products_top_panel .woof_reset_button_2::before {
    content: 'Cancella filtri' !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #888 !important;
    text-transform: none !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
    text-decoration-color: #CCC !important;
    transition: color 0.3s ease, text-decoration-color 0.3s ease !important;
    visibility: visible !important;
}

body .woof_products_top_panel .woof_reset_button_2:hover::before {
    color: #060506 !important;
    text-decoration-color: #060506 !important;
}

/* ========================================
   K · TASTO STICKY "PRENOTA UN APPUNTAMENTO"
   ======================================== */
.glamour-sticky-btn {
    display: none !important;
}

/* ========================================
   L · RESPONSIVE — TABLET (≤1024px)
   ======================================== */
@media (max-width: 1024px) {
    .woof_shortcode_output ul.products,
    ul.products.columns-4,
    .woocommerce ul.products,
    #woof_products_shortcode ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
        margin: 0 0 50px !important;
    }

    /* FORZA LA DISTANZA VERTICALE DELLE CARD SU TABLET */
    .woof_shortcode_output ul.products li.product,
    ul.products.columns-4 li.product,
    .woocommerce ul.products li.product,
    #woof_products_shortcode ul.products li.product {
        margin-bottom: 15px !important;
    }

    .glamour-card-title,
    body.woocommerce.archive ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px !important;
    }

    .glamour-swatch { width: 13px; height: 13px; }

    /* Sticky button — tablet+ mobile */
    .glamour-sticky-btn {
        display: inline-flex !important;
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%) scale(1);
        background-color: #060506 !important;
        color: #fff !important;
        padding: 14px 30px !important;
        border-radius: 50px !important;
        font-family: 'Inter', sans-serif !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
        z-index: 9999 !important;
        white-space: nowrap !important;
        align-items: center;
        justify-content: center;
        border: none !important;
        opacity: 1;
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                    opacity 0.3s ease,
                    background-color 0.2s ease !important;
    }

    .glamour-sticky-btn:active {
        transform: translateX(-50%) scale(0.94) !important;
        background-color: #333 !important;
        transition: transform 0.1s ease, background-color 0.1s !important;
    }

    .glamour-sticky-btn.hide-at-bottom {
        transform: translateX(-50%) scale(0.8) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* ========================================
   M · RESPONSIVE — MOBILE (≤768px)
   ======================================== */
@media (max-width: 768px) {
    /* Titolo pagina */
    body.woocommerce.archive h1.woocommerce-products-header__title.page-title {
        font-size: 34px !important;
        margin: 40px 0 30px !important;
    }

    body.woocommerce.archive #content,
    body.woocommerce.archive #primary {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Griglia */
    .woof_shortcode_output ul.products,
    ul.products.columns-4,
    .woocommerce ul.products,
    #woof_products_shortcode ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
        margin: 0 0 30px !important;
    }

    /* FORZA LA DISTANZA VERTICALE DELLE CARD SU MOBILE (15px) */
    .woof_shortcode_output ul.products li.product,
    ul.products.columns-4 li.product,
    .woocommerce ul.products li.product,
    #woof_products_shortcode ul.products li.product {
        margin-bottom: 15px !important;
    }

    .glamour-slider-track { aspect-ratio: 2 / 3 !important; }

    /* Frecce */
    .glamour-arrow {
        width: 34px !important;
        height: 34px !important;
        background-size: 16px 16px !important;
    }

    /* Titoli card */
    .glamour-card-title,
    body.woocommerce.archive ul.products li.product .woocommerce-loop-product__title {
        font-size: 13px !important;
        letter-spacing: 0.5px !important;
    }

    .glamour-swatch { width: 12px; height: 12px; }

    /* Filtri */
    body .woof_products_top_panel ul.woof_products_top_panel_ul li { font-size: 12px !important; }
    body .woof_products_top_panel a.woof_remove_ppi { padding: 5px 12px !important; font-size: 10px !important; }
    body .woof_products_top_panel .woof_reset_button_2::before { font-size: 12px !important; }

    /* Sticky btn */
    .glamour-sticky-btn {
        bottom: 20px;
        padding: 12px 24px !important;
        font-size: 15px !important;
    }
}