/* ============================================================
   PRODUCT-STYLE.CSS – Accademia Cranio Sacrale
   Pagina singolo prodotto / corso WooCommerce
   ============================================================
   INSTALLAZIONE:
   Copia questo file nella root del tuo tema WordPress:
     wp-content/themes/il-tuo-tema/product-style.css
   Poi aggiungi al functions.php il contenuto di functions-snippet.php
   ============================================================ */


/* ---- Notifica WooCommerce (aggiunto al carrello) ---- */
.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;
    width: 100%;
    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 !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    flex: 1 !important;
    width: 100% !important;
    list-style: none !important;
}
.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;
    color: #fff;
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}


/* ---- Breadcrumb ---- */
.shop-breadcrumb {
    background-color: #f4f4f4;
    border-bottom: 1px solid #e0e0e0;
}
.shop-breadcrumb-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 40px;
    font-size: 13px;
    color: #666;
}
.shop-breadcrumb-inner a {
    color: #002776;
    text-decoration: none;
}
.shop-breadcrumb-inner a:hover { text-decoration: underline; }
.shop-breadcrumb-inner span { margin: 0 6px; color: #999; }


/* ---- Product Wrapper ---- */
.product-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 50px 40px 80px;
}

/* Layout due colonne: immagine | summary */
.product-columns {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: start;
}


/* ---- SINISTRA: Immagine prodotto ---- */
.acs-product-main-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}


/* ---- DESTRA: Summary ---- */

/* Categoria tag */
.product-category-tag {
    display: inline-block;
    background-color: #6bb9a8;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    margin-bottom: 16px;
}

/* Titolo */
.product-title {
    font-size: 32px;
    font-weight: 700;
    color: #002776;
    line-height: 1.2;
    margin-bottom: 8px;
}

/* Sottotitolo */
.product-subtitle {
    font-size: 16px;
    color: #66877F;
    font-weight: 400;
    margin-bottom: 24px;
}

/* Separatore */
.product-separator {
    height: 2px;
    background: linear-gradient(to right, #002776, #6bb9a8);
    margin-bottom: 24px;
}

/* Descrizione breve */
.product-short-description {
    font-size: 15px;
    line-height: 1.8;
    color: #1E1E1E;
    margin-bottom: 32px;
}
.product-short-description p { margin-bottom: 10px; }

/* Meta info pills (durata, data, luogo, credenziale) */
.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}
.product-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f0f4ff;
    border: 1px solid #d0d9ef;
    padding: 8px 14px;
    font-size: 13px;
    color: #002776;
}
.product-meta-item-icon {
    width: 16px;
    height: 16px;
    background-color: #002776;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Prezzo */
.product-price-box {
    margin-bottom: 28px;
}
.product-price-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 4px;
}
/* Sovrascrive lo stile prezzo di WooCommerce */
.product-price .woocommerce-Price-amount,
.product-price .price,
.product-price .amount {
    font-size: 42px;
    font-weight: 700;
    color: #002776;
    line-height: 1;
}
.product-price-sub {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* Form WooCommerce: quantità e pulsante aggiungi al carrello */
.product-summary .cart {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.product-summary .quantity {
    display: flex;
    align-items: center;
    gap: 16px;
}
/* Input quantità */
.product-summary .qty {
    width: 60px;
    height: 36px;
    border: 1px solid #ccc;
    text-align: center;
    font-size: 16px;
    font-family: inherit;
    color: #1E1E1E;
    padding: 0 8px;
}

/* Pulsante Aggiungi al carrello (single_add_to_cart_button) */
.product-summary .single_add_to_cart_button,
.product-summary .button.alt {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background-color: #002776;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 0;
    box-shadow: none;
}
.product-summary .single_add_to_cart_button:hover,
.product-summary .button.alt:hover {
    background-color: #001a55;
    color: #fff;
}

/* Trust badges */
.product-trust {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}
.product-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}
.product-trust-icon {
    width: 18px;
    height: 18px;
    background-color: #6bb9a8;
    border-radius: 50%;
    flex-shrink: 0;
}


/* ---- Tabs: Descrizione / Programma / Dettagli ---- */
.product-tabs {
    margin-top: 60px;
    border-top: 3px solid #002776;
}
.product-tabs-nav {
    display: flex;
    gap: 0;
}
.product-tab-btn {
    padding: 14px 28px;
    background: #f0f4ff;
    border: none;
    border-right: 1px solid #ddd;
    font-size: 14px;
    font-weight: 700;
    color: #002776;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}
.product-tab-btn.active {
    background: #002776;
    color: #fff;
}
.product-tab-btn:hover:not(.active) { background: #dce6ff; }

.product-tab-content {
    display: none;
    padding: 40px 0;
}
.product-tab-content.active { display: block; }

.product-tab-content h3 {
    font-size: 20px;
    color: #002776;
    margin-bottom: 16px;
    font-weight: 700;
}
.product-tab-content p {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 16px;
}
.product-tab-content ul {
    list-style: disc;
    padding-left: 24px;
    font-size: 15px;
    line-height: 2;
    color: #333;
}

/* Tabella dettagli */
.product-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.product-details-table tr {
    border-bottom: 1px solid #e8e8e8;
}
.product-details-table th {
    text-align: left;
    padding: 12px 16px;
    background-color: #f0f4ff;
    color: #002776;
    font-weight: 700;
    width: 200px;
}
.product-details-table td {
    padding: 12px 16px;
    color: #333;
}


/* ---- Prodotti correlati (WooCommerce) ---- */
.related-products-wrapper .related.products {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px 80px;
}
.related-products-wrapper .related.products h2 {
    font-size: 24px;
    font-weight: 700;
    color: #002776;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 4px solid #FF8831;
    padding-left: 16px;
}
.related-products-wrapper ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.related-products-wrapper ul.products li.product {
    border: 1px solid #e8e8e8;
    transition: box-shadow 0.3s;
    padding: 0;
    background: #fff;
}
.related-products-wrapper ul.products li.product:hover {
    box-shadow: 0 4px 20px rgba(0,39,118,0.12);
}
.related-products-wrapper ul.products li.product a img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.related-products-wrapper ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: 700;
    color: #002776;
    padding: 18px 18px 8px;
    margin: 0;
}
.related-products-wrapper ul.products li.product .price {
    font-size: 22px;
    font-weight: 700;
    color: #002776;
    padding: 0 18px 14px;
    display: block;
}
.related-products-wrapper ul.products li.product .button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #002776;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0;
}
.related-products-wrapper ul.products li.product .button:hover {
    background-color: #001a55;
    color: #fff;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .product-columns {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .product-title { font-size: 26px; }
    .related-products-wrapper ul.products {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 600px) {
    .product-page { padding: 30px 20px 60px; }
    .shop-breadcrumb-inner { padding: 10px 20px; }
    .related-products-wrapper .related.products { padding: 0 20px 60px; }
    .related-products-wrapper ul.products { grid-template-columns: 1fr; }
    .product-meta { flex-direction: column; }
}
