/* =========================================================================
   La Querce — Shop e area utente v2
   Caricato da tpl/pagegenerated/store-*.html e user-*.html, DOPO i blocchi
   <style> di ciascun template (che restano: gestiscono layout di carrello,
   checkout e profilo). Qui solo l'allineamento alla grafica v2 — carta,
   titoli, card, campi, pulsanti — senza toccare misure e disposizione, così
   form e JavaScript del negozio continuano a funzionare com'erano.
   ========================================================================= */

.shop-v2,
.shop-v2 #main {
    background-color: var(--paper);
}

/* lo spazio sotto l'header fisso: un filo più arioso */
.shop-v2 .introPagePhotoEmpty {
    background-color: var(--paper);
}

/* --- titoli --- */

.shop-v2 main h1 {
    background-image: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text);
    font-weight: 300;
    font-size: clamp(1.6rem, 3.6vw, 2.5rem);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: var(--tracking-display);
}

.shop-v2 main h1:not(.product__name)::after {
    content: "";
    display: block;
    width: 2.5rem;
    height: 2px;
    margin: 1rem auto 0;
    background-color: var(--gold);
}

.shop-v2 main h2,
.shop-v2 main h3 {
    background-image: none;
    -webkit-text-fill-color: currentColor;
    letter-spacing: .04em;
}

.shop-v2 .h1sub,
.shop-v2 .h1sub a {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--text-soft);
}

.shop-v2 .h1sub a:hover {
    color: var(--gold-dark);
}

/* la barra delle categorie (Tutti / Vini / Olio) non deve stare
   attaccata alla lineetta dorata del titolo */
.shop-v2 main h1 + .h1sub {
    display: block;
    margin-top: clamp(2.5rem, 5vw, 3.25rem);   /* non si somma al margine del titolo: vince il maggiore */
}

/* --- catalogo --- */

.shop-v2 .productContainer__item__img {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(28, 27, 23, .04), 0 10px 30px rgba(28, 27, 23, .05);
    transition: box-shadow .45s ease;
}

.shop-v2 .productContainer__item:hover .productContainer__item__img {
    box-shadow: 0 2px 4px rgba(28, 27, 23, .05), 0 22px 50px rgba(28, 27, 23, .12);
}

.shop-v2 .productContainer__item__text {
    text-align: center;
    line-height: 1.5;
    color: var(--text-soft);
}

.shop-v2 .productContainer__item__price,
.shop-v2 .product__price {
    color: var(--text);
    font-weight: 600;
}

/* prezzo pieno: una riga sottile invece della barra rossa inclinata */
.shop-v2 .regularprice {
    color: var(--text-soft);
    font-weight: 400;
    text-decoration: line-through;
    text-decoration-color: rgba(28, 27, 23, .5);
}

.shop-v2 .regularprice::before {
    display: none;
}

/* --- scheda prodotto --- */

.shop-v2 .product__img,
.shop-v2 .product__otherimg {
    background-color: var(--surface);
    border-radius: var(--radius);
}

.shop-v2 .tab-header > div.active,
.shop-v2 .tab-indicator {
    color: var(--gold-dark);
}

/* --- campi dei form --- */

.shop-v2 main .form-input:not(button):not(a):not([type=submit]):not([type=button]),
.shop-v2 main .form-select,
.shop-v2 main select,
.shop-v2 main textarea {
    border-color: rgba(28, 27, 23, .2);
    background-color: var(--surface);
    color: var(--text);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.shop-v2 main .form-input:not(button):not(a):not([type=submit]):not([type=button]):focus,
.shop-v2 main .form-select:focus,
.shop-v2 main select:focus,
.shop-v2 main textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(170, 150, 75, .2);
    outline: none !important;
}

.shop-v2 main .form-label,
.shop-v2 main label {
    color: var(--text-soft);
}

/* --- pulsanti: stessi colori di prima, forma e lettere della v2 --- */

.shop-v2 main .btn:not(.btn-link):not(.close-btn),
.shop-v2 main .btn-reguser,
.shop-v2 main .btn-addtocart,
.shop-v2 main .btns__container button,
.shop-v2 main .btns__container a,
.shop-v2 main .btns__cart a,
.shop-v2 main .btns__cart button {
    border-radius: 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.shop-v2 main .btn-reguser {
    font-size: .9rem;
    color: #fff;
}

.shop-v2 main .btn-reguser:hover {
    background-color: var(--gold-light);
    color: var(--text);
}

/* --- finestre modali e righe del carrello --- */

.shop-v2 .modal-content {
    border-radius: var(--radius);
}

.shop-v2 .rowcart {
    border-color: var(--line);
}

/* --- scheda prodotto: vendita a cartoni da 3 (RegolaCartoni) --- */

.shop-v2 .product__cartoni {
    margin: 1rem 0 0;
    padding: .75rem 1rem;
    border-left: 2px solid var(--gold);
    background-color: rgba(170, 150, 75, .08);
    font-size: .9rem;
    line-height: 1.5;
    color: var(--text);
}

/* --- il riquadro grigio di style.css ---
   I template del catalogo e della scheda prodotto davano a
   .container-fullpage e .product un fondo #f6f6f6 della vecchia grafica
   (tolto anche da li'): sulla carta v2 appariva come una lastra grigia
   fredda. Qui resta solo il contenitore. */

.shop-v2 .container-fullpage {
    background-color: transparent;
}

/* la riga sotto i filtri del catalogo: filetto leggero invece del grigio scuro */
.shop-v2 main hr {
    border: 0;
    height: 1px;
    background: var(--line);
}

/* --- scheda prodotto: barra d'acquisto fissa su mobile (product.js) --- */

.barra-acquisto {
    display: none;
}

@media only screen and (max-width: 909px) {

    .barra-acquisto {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 950;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
        background-color: #0e0e0d;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .2);
        transform: translateY(110%);
        transition: transform .3s ease;
    }

    .barra-acquisto.is-visibile {
        transform: none;
    }

    .barra-acquisto__prezzo {
        font-size: 1.15rem;
        font-weight: 700;
        color: #fff;
    }

    .barra-acquisto__btn {
        min-height: 3rem;
        padding: 0 1.5rem;
        border: 0;
        border-radius: 2rem;
        background-color: var(--gold);
        color: var(--ink, #16160f);
        font-weight: 700;
        letter-spacing: .1em;
        text-transform: uppercase;
        cursor: pointer;
    }

    /* il "torna su" sale sopra la barra quando c'e' */
    body:has(.barra-acquisto.is-visibile) .torna-su {
        bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    }
}

/* foto principale con width/height veri: resta proporzionata */
.shop-v2 .product__img img {
    width: auto;
    height: auto;
    max-width: 100%;
}

/* elenco dello shop: nome del vino in evidenza, denominazione sotto */
.shop-v2 .productContainer__item__nome {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.shop-v2 .productContainer__item__denom {
    display: block;
    margin-top: .3rem;
    font-size: .8rem;
    letter-spacing: .04em;
    color: var(--text-soft);
}

/* regole (multipli di 3, spedizione) sotto le categorie */
.shop-v2 .shop-regole {
    margin: 1.25rem auto 0;
    max-width: 40rem;
    font-size: .85rem;
    text-align: center;
    color: var(--text-soft);
}

/* =============================================================================
   Scheda prodotto: "Torna a <categoria>" in cima (02/10/2026)
   Un link vero, con freccia e area da toccare di 44 px, prima della foto: su
   telefono il percorso sopra il titolo arrivava dopo tutta la bottiglia.
   Per tornare indietro: togliere questo blocco e .prodback nel template.
   ========================================================================== */

.shop-v2 .prodback {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem 1.5rem;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: .75rem clamp(1rem, 3vw, 2.5rem);
}

.shop-v2 .prodback a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    text-decoration: none;
}

.shop-v2 .prodback__link {
    gap: .4rem;
    color: var(--gold-dark);
}

.shop-v2 .prodback__link svg {
    transition: transform .2s ease;
}

.shop-v2 .prodback__link:hover,
.shop-v2 .prodback__link:focus-visible {
    color: var(--text);
}

.shop-v2 .prodback__link:hover svg {
    transform: translateX(-3px);
}

.shop-v2 .prodback__shop {
    color: var(--text-soft);
}

.shop-v2 .prodback__shop:hover {
    color: var(--gold-dark);
}

@media (prefers-reduced-motion: reduce) {
    .shop-v2 .prodback__link svg { transition: none; }
}

/* scheda prodotto: quantita' da scegliere (nessun valore preimpostato) */
.shop-v2 .product__qterr {
    margin: .5rem 0 0;
    font-size: .9rem;
    font-weight: 600;
    color: #8a2b1d;
}

.shop-v2 .product-quantity[aria-invalid="true"] {
    border-color: #8a2b1d;
    box-shadow: 0 0 0 2px rgba(138, 43, 29, .2);
}

/* scheda prodotto non disponibile: avviso al posto di quantita' e pulsante */
.shop-v2 .product__nondisp {
    margin: 1.5rem 0;
    padding: 1.1rem 1.25rem;
    background-color: #f4f1ea;
    border: 1px solid rgba(0, 0, 0, .08);
    border-left: 4px solid var(--text-soft);
    border-radius: var(--radius);
}

.shop-v2 .product__nondisp-titolo {
    margin: 0 0 .35rem;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--text);
}

.shop-v2 .product__nondisp-testo {
    margin: 0;
    font-size: .95rem;
    color: var(--text-soft);
}

.shop-v2 .product__nondisp-testo a {
    color: var(--gold-dark);
    text-decoration: underline;
}

/* elenco dello shop: logo biologico ICEA piccolo sotto il prezzo, con fumetto
   (testo dell'alt) al passaggio del mouse o al tocco */
.shop-v2 .productContainer__item__bio {
    position: relative;
    display: block;
    width: max-content;
    margin: .5rem auto 0;
    cursor: help;
}

.shop-v2 .productContainer__item__bio img {
    display: block;
    width: auto;
    height: 26px;
}

.shop-v2 .productContainer__item__bio-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    z-index: 5;
    width: max-content;
    max-width: 240px;
    padding: .55rem .75rem;
    background-color: #2b2722;
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    pointer-events: none;
}

/* la punta del fumetto */
.shop-v2 .productContainer__item__bio-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: #2b2722;
}

.shop-v2 .productContainer__item__bio:hover .productContainer__item__bio-tip,
.shop-v2 .productContainer__item__bio.is-open .productContainer__item__bio-tip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
    .shop-v2 .productContainer__item__bio-tip { transition: none; }
}

/* formato e prezzo al litro sotto il prezzo; informazioni di etichetta (05/10/2026) */
.shop-v2 .product__unit,
.shop-v2 .productContainer__item__unit {
    display: block;
    margin-top: .2rem;
    font-size: .8rem;
    font-weight: 400;
    color: var(--text-soft);
}

.shop-v2 .product__etichetta {
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.shop-v2 .product__etichetta strong {
    font-weight: 600;
}

/* =============================================================================
   Scheda tecnica del prodotto (05/10/2026): presentazione, voci in tabella,
   download a lato. Sostituisce le schede "Descrizione / Download".
   ========================================================================== */
.shop-v2 .scheda {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2.5rem 3.5rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
}

.shop-v2 .scheda__titolo {
    margin: 0 0 1.25rem;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: var(--tracking-display);
    color: var(--text);
}

.shop-v2 .scheda__intro {
    margin-bottom: 1.75rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
}

.shop-v2 .scheda__intro p {
    margin: 0 0 .75rem;
}

.shop-v2 .scheda__voci {
    margin: 0;
    border-top: 1px solid rgba(0, 0, 0, .1);
}

.shop-v2 .scheda__riga {
    display: grid;
    grid-template-columns: minmax(9rem, 32%) minmax(0, 1fr);
    gap: .25rem 1.5rem;
    padding: .8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.shop-v2 .scheda__riga dt {
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--gold-dark);
    padding-top: .2rem;
}

.shop-v2 .scheda__riga dd {
    margin: 0;
    line-height: 1.6;
    color: var(--text);
}

.shop-v2 .scheda__download {
    position: sticky;
    top: 110px;
    padding: 1.25rem;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: var(--radius);
}

.shop-v2 .scheda__download-titolo {
    margin: 0 0 .9rem;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--text-soft);
}

.shop-v2 .scheda__download ul {
    display: grid;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop-v2 .scheda__file {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .35rem .9rem;
    padding: .9rem;
    border: 1px solid rgba(170, 150, 75, .35);
    border-radius: calc(var(--radius) - 2px);
    background-color: #fbf9f3;
    color: var(--text);
    text-decoration: none;
    transition: border-color .2s ease, background-color .2s ease;
}

.shop-v2 .scheda__file:hover,
.shop-v2 .scheda__file:focus-visible {
    border-color: var(--gold);
    background-color: #f6f1e2;
    text-decoration: none;
}

.shop-v2 .scheda__file-icona {
    grid-row: span 2;
    color: var(--gold-dark);
}

.shop-v2 .scheda__file-testo {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.shop-v2 .scheda__file-nome {
    font-weight: 600;
}

.shop-v2 .scheda__file-meta {
    font-size: .8rem;
    color: var(--text-soft);
}

.shop-v2 .scheda__file-azione {
    grid-column: 2;
    justify-self: start;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--gold-dark);
    border-bottom: 1px solid currentColor;
}

@media (max-width: 860px) {
    .shop-v2 .scheda {
        grid-template-columns: minmax(0, 1fr);
    }
    .shop-v2 .scheda__download {
        position: static;
    }
}

@media (max-width: 520px) {
    .shop-v2 .scheda__riga {
        grid-template-columns: minmax(0, 1fr);
        gap: .15rem;
    }
}
