/*
Theme Name: Borgovino2
Theme URI: https://borgovino.it
Author: Borgovino
Description: Tema della bottega Borgovino, Borgo San Lorenzo 20r, Firenze. Vini, olio EVO e balsamico. Chiaro, luminoso, compatibile con WooCommerce.
Version: 1.7.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: borgovino2
*/

:root {
  --surface: #FCFBF7; --surface-alt: #F6F4EE; --line: #E4E1D8;
  --ink: #1F2021; --ink-muted: #5E5D5A;
  --olive: #51613A; --olive-dark: #3E4B2B; --white: #FFFFFF;
  --serif: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: Montserrat, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
}
html { background: var(--surface); }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }

.caps { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; line-height: 1.5; }
.eyebrow { color: var(--olive); margin: 0; }
.serif, h1, h2 { font-family: var(--serif); font-weight: 500; color: var(--ink); text-wrap: balance; }
.serif { margin: 0; }
.muted { color: var(--ink-muted); }

/* Bottoni */
.btn, .button, button.button, input.button, .wp-element-button,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce a.button.alt, .woocommerce button.button.alt {
  display: inline-flex; align-items: center; gap: 14px; padding: 14px 22px; border: 1px solid var(--olive); border-radius: 0;
  background: var(--olive); color: var(--white); text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; line-height: 1.5;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover, .button:hover, .wp-element-button:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--olive-dark); border-color: var(--olive-dark); color: var(--white); }
.btn--outline { background: transparent; color: var(--olive); }
.btn--outline:hover { background: var(--olive); color: var(--white); }
.btn--link { background: none; border-color: transparent; padding: 4px 0; color: var(--olive-dark); }
.btn--link:hover { background: none; border-color: transparent; color: var(--olive); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
.arrow { width: 14px; height: 10px; flex: none; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.site-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding-block: 18px; }
.logo { text-decoration: none; text-align: center; justify-self: start; display: grid; justify-items: center; }
.logo img.ramo { width: 54px; mix-blend-mode: multiply; margin-bottom: -2px; }
.logo .custom-logo { max-height: 90px; width: auto; }
.logo b { font-family: var(--serif); font-weight: 500; font-size: 36px; line-height: 1.1; color: var(--ink); }
.logo span { font-size: 9px; letter-spacing: .26em; color: var(--ink-muted); margin-top: 4px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 36px; }
.nav a { position: relative; display: block; text-decoration: none; color: var(--ink-muted); padding-block: 6px; }
.nav a:hover, .nav .current-menu-item > a, .nav a[aria-current] { color: var(--ink); }
.nav .current-menu-item > a::after, .nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--olive); }
.nav .sub-menu { display: none; }
.tools { display: flex; gap: 22px; justify-self: end; align-items: center; }
.tools a { display: block; color: var(--ink); position: relative; }
.tools svg { width: 21px; height: 21px; }
.cart-count { position: absolute; top: -6px; right: -10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--olive); color: var(--white); font-size: 10px; line-height: 16px; text-align: center; }

/* Hero */
.hero { position: relative; min-height: 420px; display: grid; align-items: center; }
.hero__img { position: absolute; inset: 0 0 0 30%; background-position: center right; background-size: cover; background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28%); mask-image: linear-gradient(90deg, transparent 0, #000 28%); }
.hero__text { position: relative; max-width: 470px; display: grid; gap: 20px; padding-block: 56px; }
.hero h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.08; }
.hero p.muted { max-width: 40ch; margin: 0; }
.hero .btn { justify-self: start; margin-top: 8px; }

/* Plus */
.features { display: grid; grid-template-columns: repeat(4, 1fr); padding-block: 36px; }
.feature { display: grid; justify-items: center; align-content: start; gap: 14px; text-align: center; padding: 6px 16px; color: var(--ink-muted); }
.feature + .feature { border-left: 1px solid var(--line); }
.feature svg { width: 36px; height: 36px; color: var(--olive); }

/* Selezioni */
.section { padding-block: 48px 72px; }
.section-title { text-align: center; display: grid; gap: 12px; justify-items: center; margin-bottom: 40px; }
.section-title h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.15; }
.section-title::after { content: ""; width: 36px; height: 1px; background: var(--olive); margin-top: 4px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { display: grid; justify-items: center; text-align: center; gap: 10px; text-decoration: none; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 12px; }
.card h3 { font-family: var(--sans); font-weight: 500; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.card p { margin: 0; font-size: 13px; line-height: 1.6; max-width: 26ch; }

/* Storia */
.story { display: grid; grid-template-columns: 47% 1fr; background: var(--surface-alt); }
.story img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; min-height: 280px; max-height: 560px; }
.story__text { display: grid; align-content: center; gap: 18px; padding: 48px var(--gutter); max-width: 560px; }
.story h2 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; }
.story p { margin: 0; }
.story .btn { justify-self: start; margin-top: 4px; }

/* Footer */
.services { padding-block: 28px 0; text-align: center; }
.services .eyebrow { display: inline-grid; justify-items: center; gap: 10px; }
.services .eyebrow::after { content: ""; width: 30px; height: 1px; background: var(--olive); }
.services .features { padding-block: 24px 32px; }
.services .feature svg { width: 28px; height: 28px; }
.skyline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; padding-block: 8px 40px; }
.skyline hr { border: 0; border-top: 1px solid var(--line); margin: 0 0 3px; }
.skyline img { width: 300px; max-width: 60vw; mix-blend-mode: multiply; }
.footer-note { text-align: center; font-size: 12px; color: var(--ink-muted); padding-block: 0 32px; margin: 0; }

/* Pagine interne, articoli, WooCommerce */
.page-main { padding-block: 40px 80px; min-height: 40vh; }
.page-main h1 { font-size: clamp(34px, 4.4vw, 48px); line-height: 1.1; margin: 0 0 24px; }
.page-main .entry { max-width: 72ch; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--olive-dark); }
.woocommerce span.onsale { background: var(--olive); border-radius: 0; }
.woocommerce .woocommerce-breadcrumb { font-size: 12px; color: var(--ink-muted); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--olive); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--olive); }

@media (max-width: 860px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav { grid-column: 1 / -1; order: 3; }
  .nav ul { justify-content: center; gap: 20px; flex-wrap: wrap; }
  .hero { min-height: 0; }
  .hero__img { position: relative; inset: auto; height: 260px; -webkit-mask-image: none; mask-image: none; order: -1; }
  .hero__text { padding-block: 32px 40px; }
  .features { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .feature:nth-child(3) { border-left: 0; }
  .cards { grid-template-columns: 1fr; gap: 40px; }
  .story { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Pagina Prodotti */
.prodotti { padding-block: 24px 56px; }
.prodotti__intro { margin-bottom: 44px; }
.prodotti__intro::after { order: -1; margin: 0 0 4px; }
.prodotti__intro .eyebrow { order: -2; }
.prodotti__intro h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.1; margin: 0; }
.prodotti__intro p.muted { max-width: 62ch; margin: 0; }
.prodotti__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: start; }
.prodotto { display: grid; justify-items: center; text-align: center; }
.prodotto > a:first-child { display: block; width: 100%; }
.prodotto img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.prodotto__icona { width: 38px; height: 38px; color: var(--olive); margin-top: 22px; }
.prodotto h2 { font-size: clamp(32px, 3.4vw, 40px); line-height: 1.15; margin: 10px 0 0; }
.prodotto__sotto { margin-top: 12px; display: grid; justify-items: center; gap: 14px; }
.prodotto__sotto::after { content: ""; width: 26px; height: 1px; background: var(--olive); }
.prodotto__testo { margin: 16px 0 0; max-width: 36ch; }
.prodotto__voci { list-style: none; padding: 0; margin: 24px 0 0; width: 100%; max-width: 310px; text-align: left; }
.prodotto__voci li + li { border-top: 1px solid var(--line); }
.prodotto__voci a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; text-decoration: none; color: var(--olive-dark); font-size: 14px; }
.prodotto__voci a:hover { color: var(--olive); }
.prodotto__voci a:hover .arrow { transform: translateX(3px); }
.prodotto__voci .arrow { color: var(--ink-muted); transition: transform .15s; }
.prodotto__btn { margin-top: 26px; color: var(--ink); border-color: var(--ink-muted); }
.prodotto__btn:hover { border-color: var(--olive); }
@media (max-width: 860px) {
  .prodotti__grid { grid-template-columns: 1fr; gap: 64px; }
}
