/* ═══════════════════════════════════════════════════════════════════════════
   Azione Cristiana — WooCommerce Theme Override
   Palette: navy / gold / cream  (coerente con il tema Aurora V3.1)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Griglia prodotti custom (negozio-solidale) ────────────────────────── */
/* HTML completamente indipendente da WooCommerce — nessun conflitto CSS   */

.ac-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0 32px;
}

.ac-shop-card {
    background: #ffffff;
    border: 1px solid rgba(14,34,52,.12);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}

.ac-shop-card:hover {
    box-shadow: 0 8px 28px rgba(6,23,42,.10);
    transform: translateY(-2px);
}

.ac-shop-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.ac-shop-card__thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0ece4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ac-shop-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ac-shop-card__placeholder {
    font-size: 42px;
    opacity: .35;
}

.ac-shop-card__body {
    padding: 14px 16px 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ac-shop-card__title {
    font-size: 14px;
    font-weight: 700;
    color: #06172a;
    margin: 0 0 8px;
    line-height: 1.35;
    flex: 1;
}

.ac-shop-card__price {
    font-size: 15px;
    font-weight: 700;
    color: #a87318;
    margin: 0;
}

.ac-shop-card__price bdi { font-style: normal; }

.ac-shop-card__btn {
    display: block !important;
    margin: 10px 16px 16px !important;
    text-align: center;
    background: #06172a !important;
    color: #e3b85f !important;
    border-radius: 8px !important;
    padding: 9px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: none !important;
    cursor: pointer;
    transition: background .2s, color .2s;
    text-decoration: none !important;
    line-height: 1.4;
}

.ac-shop-card__btn:hover,
.ac-shop-card__btn:focus {
    background: #a87318 !important;
    color: #06172a !important;
}

/* Stato AJAX WooCommerce */
.ac-shop-card__btn.loading { opacity: .65; cursor: wait; }
.ac-shop-card__btn.added   { background: #3e8a62 !important; color: #fff !important; }

/* Link carrello sotto la griglia */
.ac-ns-cart-link {
    text-align: right;
    margin-bottom: 32px;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 8px 28px rgba(6,23,42,.10);
    transform: translateY(-2px);
}

.woocommerce ul.products li.product a img {
    border-radius: 0;
    margin: 0;
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px;
    font-weight: 700;
    color: #06172a;
    padding: 14px 16px 4px;
    margin: 0;
}

.woocommerce ul.products li.product .price {
    font-size: 15px;
    font-weight: 700;
    color: #a87318;
    padding: 2px 16px 10px;
    display: block;
    margin: 0;
}

.woocommerce ul.products li.product .button {
    display: block;
    width: calc(100% - 32px);
    margin: auto 16px 16px;   /* margin-top:auto spinge il pulsante sempre in fondo */
    text-align: center;
    background: #06172a;
    color: #e3b85f !important;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: none;
    cursor: pointer;
    transition: background .2s, color .2s;
    text-decoration: none;
    line-height: 1.4;
}

.woocommerce ul.products li.product .button:hover {
    background: #a87318;
    color: #06172a !important;
}

/* ── Pulsante "Torna al Negozio" (singolo prodotto) ────────────────────── */
/* Classi specifiche e isolate: nessun selettore generico, nessun impatto    */
/* su header, menu o altre sezioni del sito.                                 */

.ac-back-to-shop-wrapper {
    margin: 16px 0 18px 0;
    clear: both;
}

.ac-back-to-shop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    background: #d8a331;
    color: #061a2f;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
    border: 1px solid rgba(6, 26, 47, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.ac-back-to-shop-button:hover,
.ac-back-to-shop-button:focus {
    background: #061a2f;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .ac-back-to-shop-wrapper {
        margin: 14px 0 18px 0;
    }
    .ac-back-to-shop-button {
        padding: 11px 20px;
        font-size: 14px;
        max-width: 100%;
    }
}

/* ── Fix logo Gabriel nell'header sulle pagine WooCommerce ─────────────── */
/* CAUSA: la regola core WooCommerce ".woocommerce img,.woocommerce-page img  */
/* {height:auto}" (woocommerce-layout.css, specificità 0,1,1) prevale sul     */
/* tema ".ac-gabriel-image{height:100px}" (0,1,0) quando il <body> ha la      */
/* classe .woocommerce (pagine prodotto). Il PNG è 200x200 → con height:auto  */
/* il logo raddoppia e fa accavallare il menu.                                */
/* SOLUZIONE: ripristino le dimensioni REALI del tema SOLO per il logo        */
/* Gabriel, con selettore più specifico (0,2,0). Non tocca menu né altre img. */
.woocommerce .ac-gabriel-image,
.woocommerce-page .ac-gabriel-image {
    height: 100px;   /* tema base 768–1279px */
    width: auto;
}
@media (min-width: 1280px) {
    .woocommerce .ac-gabriel-image,
    .woocommerce-page .ac-gabriel-image {
        height: 70px;   /* tema desktop ≥1280px */
    }
}
@media (max-width: 767px) {
    .woocommerce .ac-gabriel-image,
    .woocommerce-page .ac-gabriel-image {
        height: 72px;   /* tema mobile ≤767px */
    }
}

/* ── Prodotto singolo ──────────────────────────────────────────────────── */

.woocommerce div.product .product_title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: -.03em;
    color: #06172a;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: #a87318 !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 1rem;
    line-height: 1.72;
    color: #0e2234;
}

/* ── Pulsanti globali ──────────────────────────────────────────────────── */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: #06172a !important;
    color: #e3b85f !important;
    border-radius: 8px !important;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 10px 22px;
    border: none;
    transition: background .2s, color .2s;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: #a87318 !important;
    color: #06172a !important;
}

/* ── Messaggi / notice ─────────────────────────────────────────────────── */

.woocommerce-message,
.woocommerce-info {
    border-top-color: #c68d2b !important;
    background: #fff6e6 !important;
    color: #06172a;
}
.woocommerce-message::before,
.woocommerce-info::before { color: #c68d2b !important; }
.woocommerce-error { border-top-color: #b74d49 !important; }

/* ── Tabelle (carrello, checkout riepilogo) ────────────────────────────── */

.woocommerce table.shop_table {
    border: 1px solid rgba(14,34,52,.12);
    border-radius: 12px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.woocommerce table.shop_table thead tr th {
    background: #06172a;
    color: #e3b85f;
    font-weight: 700;
    letter-spacing: .05em;
    font-size: 12px;
    text-transform: uppercase;
    padding: 12px 16px;
}

.woocommerce table.shop_table tbody tr:nth-child(even) td {
    background: #fffdf8;
}

.woocommerce table.shop_table tfoot tr th,
.woocommerce table.shop_table tfoot tr td {
    font-weight: 700;
    background: #fff6e6;
}

/* ── Disclaimer etico nel checkout ─────────────────────────────────────── */

.ac-shop-disclaimer {
    background: #fff6e6;
    border: 1px solid rgba(198,141,43,.35);
    border-left: 3px solid #c68d2b;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #0e2234;
    line-height: 1.6;
}
.ac-shop-disclaimer p { margin: 0; }

/* ── Form fields ───────────────────────────────────────────────────────── */

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    border: 1.5px solid rgba(14,34,52,.18);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
    background: #fffdf8;
    color: #0e2234;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    border-color: #c68d2b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(198,141,43,.18);
}

.woocommerce form .form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #0e2234;
    margin-bottom: 5px;
    display: block;
}

/* ── Ordine ricevuto (thank you) ───────────────────────────────────────── */

.woocommerce-order h2 {
    color: #06172a;
    font-weight: 900;
}
.woocommerce-order .woocommerce-notice--success {
    border-top-color: #3e8a62 !important;
    background: #f0faf5 !important;
}

/* ── Breadcrumb WooCommerce ────────────────────────────────────────────── */

.woocommerce .woocommerce-breadcrumb {
    font-size: 13px;
    color: #667789;
    margin-bottom: 20px;
}
.woocommerce .woocommerce-breadcrumb a {
    color: #a87318;
    text-decoration: none;
}
.woocommerce .woocommerce-breadcrumb a:hover { text-decoration: underline; }

/* ── Responsive griglia custom ─────────────────────────────────────────── */

@media (max-width: 680px) {
    .ac-shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 400px) {
    .ac-shop-grid { grid-template-columns: 1fr; }
}
