/* ============================================================
   SHOP-STYLE.CSS – Accademia Cranio Sacrale
   Pagina archivio prodotti / shop WooCommerce
============================================================ */

/* ---- Nasconde roba inutile di WooCommerce ---- */
.shop-main .woocommerce-result-count { display: none; }

/* ---- Contenitore principale ---- */
.shop-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 48px 40px 80px;
}

/* ---- Griglia prodotti ---- */
.shop-main ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 28px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 48px !important;
    float: none !important;
    width: 100% !important;
    text-align: left !important;
    justify-items: stretch;
}

/* ---- Card prodotto ---- */
.shop-main ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e0e6f0;
    background: #fff;
    display: flex !important;
    flex-direction: column;
    transition: box-shadow 0.25s, transform 0.2s;
}
.shop-main ul.products li.product:hover {
    box-shadow: 0 6px 28px rgba(0,39,118,0.12);
    transform: translateY(-3px);
}

/* Immagine */
.shop-main ul.products li.product a img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background-color: #f0f0f0;
    display: block;
}
.shop-main ul.products li.product .woocommerce-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    display: block;
    background-color: #eef0f8;
    padding: 24px;
    box-sizing: border-box;
}

/* Titolo */
.shop-main ul.products li.product .woocommerce-loop-product__title {
    font-size: 17px;
    font-weight: 700;
    color: #002776;
    line-height: 1.3;
    padding: 18px 18px 8px;
    margin: 0;
    flex-grow: 1;
}

/* Prezzo */
.shop-main ul.products li.product .price {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #002776;
    padding: 4px 18px 16px;
    margin: 0;
}
.shop-main ul.products li.product .price ins {
    text-decoration: none;
}
.shop-main ul.products li.product .price del {
    color: #aaa;
    font-size: 16px;
    font-weight: 400;
    margin-right: 6px;
}

/* Pulsante aggiungi al carrello */
.shop-main ul.products li.product .button {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: #002776;
    color: #fff !important;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 0;
    box-sizing: border-box;
    margin-top: auto;
}
.shop-main ul.products li.product .button:hover {
    background-color: #001a55;
    color: #fff !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .shop-main ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 600px) {
    .shop-main { padding: 28px 20px 60px; }
    .shop-main ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* ---- Notifica WooCommerce (aggiunto al carrello) – shop archive ---- */
.woocommerce-notices-wrapper {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    pointer-events: none;
}
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 100%;
    margin: 0;
    padding: 18px 40px;
    background-color: #002776;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    list-style: none;
    border: none;
    border-radius: 0;
    pointer-events: all;
    animation: slideUp 0.3s ease;
}
.woocommerce-notices-wrapper .woocommerce-message::before,
.woocommerce-notices-wrapper .woocommerce-message li::before { display: none; }
.woocommerce-notices-wrapper .woocommerce-message li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    list-style: none;
}
.woocommerce-notices-wrapper .woocommerce-message a.button,
.woocommerce-notices-wrapper .woocommerce-message .button {
    background-color: #FF8831;
    color: #fff;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 0;
}
.woocommerce-notices-wrapper .woocommerce-message a.button:hover { background-color: #e07020; }
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ===== Compass Additional Checkout Fields – nascosti finché non è selezionato ===== */
/*
 * WC Blocks renderizza i campi "order" in una sezione con più possibili classi wrapper.
 * :has() è supportato da tutti i browser moderni (Chrome 105+, Firefox 121+, Safari 15.4+).
 * Se necessario aggiustare il selettore dopo verifica in DevTools.
 */
.wc-block-checkout__additional-fields:has([data-compass-field]),
.wc-block-checkout__additional-fields-block:has([data-compass-field]),
.wp-block-woocommerce-checkout-order-information-block:has([data-compass-field]) {
    display: none;
}
body.acs-compass-active .wc-block-checkout__additional-fields:has([data-compass-field]),
body.acs-compass-active .wc-block-checkout__additional-fields-block:has([data-compass-field]),
body.acs-compass-active .wp-block-woocommerce-checkout-order-information-block:has([data-compass-field]) {
    display: block;
}

/* ===== Compass fields – checkout Blocks ===== */
.acs-compass-fields { margin-top: 16px; }
.acs-compass-desc   { margin-bottom: 12px; font-size: 14px; color: #444; }
.acs-compass-field  { margin-bottom: 14px; }
.acs-compass-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #002776;
}
.acs-compass-field input.input-text,
.acs-compass-field textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 10px 12px;
    font-size: 14px;
    box-sizing: border-box;
}
.acs-compass-field input.input-text:focus,
.acs-compass-field textarea:focus {
    border-color: #002776;
    outline: none;
}
