/*
Theme Name: Storefront Baldassarri
Template: storefront
Description: Tema figlio di Storefront con l'identità del sito Cantina Baldassarri (header, footer, palette, font). I prodotti si gestiscono da WooCommerce, i menu da Aspetto → Menu.
Version: 1.15.33
*/

/* ==========================================================================
   Font (self-hosted, come sul sito)
   ========================================================================== */
@font-face { font-family: 'ITC Garamond Std Narrow'; src: url('fonts/ITCGaramondStd-BkNarrow.woff2') format('woff2'), url('fonts/ITCGaramondStd-BkNarrow.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'ITC Garamond Std Narrow'; src: url('fonts/ITCGaramondStd-BkNarrowIta.woff2') format('woff2'), url('fonts/ITCGaramondStd-BkNarrowIta.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'ITC Garamond Std Narrow'; src: url('fonts/ITCGaramondStd-BdNarrow.woff2') format('woff2'), url('fonts/ITCGaramondStd-BdNarrow.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'ITC Garamond Std'; src: url('fonts/ITCGaramondStd-Bk.woff2') format('woff2'), url('fonts/ITCGaramondStd-Bk.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Work Sans'; src: url('fonts/work-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Work Sans'; src: url('fonts/work-sans-latin-ext-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Work Sans'; src: url('fonts/work-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Work Sans'; src: url('fonts/work-sans-latin-ext-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Work Sans'; src: url('fonts/work-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Work Sans'; src: url('fonts/work-sans-latin-ext-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ==========================================================================
   Token (identici a src/styles/tokens.css del sito)
   ========================================================================== */
:root {
  --bg: #f6f4ee;
  --bg-raised: #efece2;
  --ink: #151515;
  --ink-soft: #4a4539;
  --wine: #d91122;
  --wine-dark: #a80d1a;
  --navy: #6f8abf;
  --navy-dark: #4f6a9c;
  --gold: #d98f07;
  --cream: #f2cf66;
  --line: rgba(21, 21, 21, 0.14);
  --font-display: 'ITC Garamond Std Narrow', 'ITC Garamond Std', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;
  --header-h: 72px;
  --market-h: 30px;
}

/* ==========================================================================
   Base
   ========================================================================== */
html {
  background: var(--bg);
}

@media (max-width: 767px) {
  html {
    font-size: 106.25%;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.woocommerce-loop-product__title,
.product_title {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--ink);
}

a {
  color: var(--wine);
}

a:hover,
a:focus {
  color: var(--wine-dark);
}

.bb-container,
.col-full {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: border-box;
}

/* Storefront aggiunge margini/float alla colonna: contenuto a tutta larghezza */
.col-full {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-content .content-area,
.storefront-full-width-content .content-area {
  width: 100%;
  float: none;
  margin: 0;
}

.site-content {
  padding-top: 2rem;
}

/* ==========================================================================
   Bottoni (come .btn .btn-primary del sito)
   ========================================================================== */
.bb-btn,
.button,
button.button,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.added_to_cart,
.wp-element-button,
.wc-block-components-button:not(.is-link) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  background: var(--wine);
  color: #f7f4ec;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}

.bb-btn:hover,
.button:hover,
button.button:hover,
input[type="submit"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.added_to_cart:hover,
.wp-element-button:hover,
.wc-block-components-button:not(.is-link):hover {
  background: var(--wine-dark);
  color: #f7f4ec;
}

.bb-btn:active,
.button:active {
  transform: scale(0.98);
}

.bb-btn-sm {
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
}

@media (max-width: 767px) {
  .bb-btn,
  .button,
  .woocommerce a.button,
  .woocommerce button.button {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   Header (da Header.astro)
   ========================================================================== */
.bb-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.admin-bar .bb-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .bb-header {
    top: 0;
  }
}

/* Fascia "Spedisci in": il paese sceglie il listino (plugin Baldassarri Shop, includes/listini.php) */
.bb-market-bar {
  height: var(--market-h);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.bb-market-bar .bb-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  height: 100%;
}

.bb-market {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.bb-market-label {
  margin: 0;
}

.bb-market select {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.1rem 1.1rem 0.1rem 0.1rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 7px) 55%, calc(100% - 3px) 55%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.bb-market select:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}

.bb-market-note {
  margin: 0;
}

@media (max-width: 767px) {
  .bb-market-bar .bb-container {
    justify-content: center;
  }

  .bb-market-note {
    display: none;
  }
}

.bb-not-available {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.bb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.bb-wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.bb-wordmark img {
  display: block;
  width: auto;
}

.bb-wordmark-shield {
  height: 34px;
}

.bb-wordmark-type {
  height: 15px;
}

.bb-nav {
  flex: 1;
  min-width: 0;
}

.bb-nav-list {
  list-style: none;
  display: flex;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  justify-content: center;
  white-space: nowrap;
}

.bb-nav-list li {
  margin: 0;
}

.bb-nav-list a {
  text-decoration: none;
  font-size: 0.86rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.bb-nav-list a:hover,
.bb-nav-list .current-menu-item > a {
  color: var(--wine);
}

.bb-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

/* IT/EN, come .lang-switch del sito */
.bb-lang-switch {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
}

.bb-lang-switch:hover,
.bb-lang-switch:focus {
  color: var(--ink);
  border-color: var(--ink);
}

.bb-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--ink);
  text-decoration: none;
}

.bb-icon-link:hover {
  color: var(--wine);
}

.bb-icon-link svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-cart-count {
  position: absolute;
  top: 1px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--wine);
  color: #f7f4ec;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}

.bb-cart-count.is-empty {
  display: none;
}

.bb-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none !important;
  border: none;
  cursor: pointer;
  padding: 0;
}

.bb-menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
}

@media (min-width: 1320px) {
  .bb-menu-toggle {
    display: none;
  }
}

@media (max-width: 1319px) {
  .bb-nav {
    position: fixed;
    inset: calc(var(--header-h) + var(--market-h)) 0 0 0;
    background: var(--bg);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow-y: auto;
  }

  .admin-bar .bb-nav {
    top: calc(var(--header-h) + var(--market-h) + 32px);
  }

  .bb-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .bb-nav-list {
    flex-direction: column;
    gap: 0;
    padding: 1rem var(--gutter) 2rem;
  }

  .bb-nav-list li {
    border-bottom: 1px solid var(--line);
  }

  .bb-nav-list a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
  }

  body.bb-menu-open {
    overflow: hidden;
  }
}

/* ==========================================================================
   Footer (da Footer.astro)
   ========================================================================== */
.bb-footer {
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
  margin-top: 6rem;
  color: var(--ink-soft);
}

.bb-footer-top {
  display: grid;
  gap: 3rem;
  padding-block: 4rem 3rem;
  grid-template-columns: 1fr;
}

.bb-footer-wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.25rem;
}

.bb-footer-wordmark img {
  display: block;
  width: auto;
}

.bb-footer-wordmark img:first-child {
  height: 42px;
}

.bb-footer-wordmark img:last-child {
  height: 18px;
}

.bb-footer address {
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--ink-soft);
  margin: 0;
}

.bb-footer address a,
.bb-footer-list a,
.bb-legal-links a,
.bb-legal-links .bb-consent-open {
  text-decoration: none;
  color: var(--ink-soft);
}

.bb-legal-links .bb-consent-open {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.bb-footer-list a:hover,
.bb-legal-links a:hover,
.bb-legal-links .bb-consent-open:hover {
  color: var(--wine);
}

.bb-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.bb-footer-list li,
.bb-legal-links li {
  margin: 0;
}

.bb-footer-list a {
  font-size: 0.92rem;
}

.bb-footer-club h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.bb-footer-club p {
  font-size: 0.88rem;
  margin: 0 0 1rem;
  max-width: 32ch;
}

/* Seguici Facebook + Instagram (come il footer del sito, 20/10/2026) */
.bb-social {
  margin-top: 1.8rem;
}

.bb-social .bb-social-title {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}

.bb-social ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.bb-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
}

.bb-social a:hover {
  border-color: var(--wine);
  color: var(--wine);
}

.bb-footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.bb-footer-bottom p {
  margin: 0;
}

.bb-legal-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .bb-footer-top {
    grid-template-columns: 1.2fr 1fr 1.2fr;
  }
}

/* ==========================================================================
   WooCommerce — base (catalogo/prodotto/carrello rifiniti a parte)
   ========================================================================== */
.woocommerce-breadcrumb {
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.woocommerce-breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
}

.storefront-breadcrumb {
  padding: 1.25rem 0 0;
  margin: 0;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price,
ul.products li.product .price {
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
}

.onsale {
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
}

.baldassarri-qty-note {
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ==========================================================================
   Catalogo — testata, filtri, griglia, card
   ========================================================================== */
.woocommerce-products-header {
  padding: 1.5rem 0 0;
  margin: 0 0 1.75rem;
  text-align: center;
}

.woocommerce-products-header__title.page-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0;
}

.woocommerce-products-header .term-description,
.woocommerce-products-header .page-description {
  max-width: 44rem;
  margin: 0.9rem auto 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.woocommerce-products-header .term-description p:last-child,
.woocommerce-products-header .page-description p:last-child {
  margin-bottom: 0;
}

/* Filtri categoria: chip orizzontali, scorrono col dito su telefono */
.bb-chips {
  margin: 0 0 1.5rem;
}

.bb-chips ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.bb-chips li {
  margin: 0;
}

.bb-chips a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.bb-chips a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.bb-chips a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

@media (max-width: 767px) {
  .bb-chips ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
  }

  .bb-chips ul::-webkit-scrollbar {
    display: none;
  }

  .bb-chips ul::after {
    content: '';
    flex: 0 0 1px;
  }
}

/* Chip con la "pillola" che scorre (js/theme.js, solo pagine categoria) */
.bb-chips.has-pill ul {
  position: relative;
}

.bb-chips-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 999px;
  background: var(--ink);
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.bb-chips-pill.no-anim {
  transition: none;
}

.bb-chips.has-pill li {
  position: relative;
  z-index: 1;
}

.bb-chips.has-pill a[aria-current="page"] {
  background: transparent;
  border-color: transparent;
}

/* prodotti che escono e rientrano al cambio di categoria */
ul.products > li.bb-leave,
.woocommerce-info.bb-leave {
  animation: bb-cat-leave 0.22s ease-in both;
}

ul.products > li.bb-enter,
.woocommerce-info.bb-enter {
  animation: bb-cat-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes bb-cat-leave {
  to { opacity: 0; transform: translateY(-10px); }
}

@keyframes bb-cat-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  ul.products > li.bb-leave,
  ul.products > li.bb-enter,
  .woocommerce-info.bb-leave,
  .woocommerce-info.bb-enter {
    animation: none;
  }
}

/* Ordinamento + conteggio: una riga discreta */
.storefront-sorting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: 0.85rem;
}

.storefront-sorting::before,
.storefront-sorting::after {
  display: none;
}

.storefront-sorting .woocommerce-ordering,
.storefront-sorting .woocommerce-result-count {
  float: none;
  margin: 0;
  padding: 0;
}

.storefront-sorting .woocommerce-result-count {
  order: -1;
  color: var(--ink-soft);
}

.storefront-sorting .woocommerce-pagination {
  display: none;
}

.woocommerce-ordering select.orderby {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.45rem 2rem 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%234a4539' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}

/* Griglia: 2 colonne su telefono, 3 su tablet, 4 da desktop */
.site-main ul.products,
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1rem;
  margin: 0 0 2rem;
  padding: 0;
}

.site-main ul.products::before,
.site-main ul.products::after {
  display: none;
}

@media (min-width: 768px) {
  .site-main ul.products,
  .woocommerce ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem 1.5rem;
  }
}

@media (min-width: 1100px) {
  .site-main ul.products,
  .woocommerce ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.site-main ul.products li.product,
.woocommerce ul.products li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  text-align: center;
}

ul.products li.product .woocommerce-LoopProduct-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

/* Foto: bottiglia (PNG trasparente) su pannello chiaro, proporzione fissa */
ul.products li.product img,
ul.products li.product .attachment-woocommerce_thumbnail {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  padding: 1.25rem 0.5rem;
  margin: 0 0 1rem !important;
  background: var(--bg-raised);
  border-radius: var(--radius);
  box-sizing: border-box;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  ul.products li.product:hover img {
    transform: translateY(-4px);
  }
}

.bb-card-cat {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-dark);
}

ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.2rem;
  line-height: 1.2;
  padding: 0;
  margin: 0 0 0.35rem;
}

ul.products li.product .price {
  display: block;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

ul.products li.product .button,
ul.products li.product .added_to_cart {
  margin-top: auto;
  align-self: center;
  min-width: 9rem;
}

ul.products li.product .added_to_cart {
  display: block;
  margin-top: 0.5rem;
  padding: 0;
  background: none;
  color: var(--wine);
  font-size: 0.85rem;
  min-width: 0;
}

ul.products li.product .added_to_cart:hover {
  background: none;
  color: var(--wine-dark);
  text-decoration: underline;
}

@media (max-width: 767px) {
  ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.1rem;
  }

  ul.products li.product .button {
    width: 100%;
    min-width: 0;
  }
}

/* Paginazione */
.woocommerce-pagination {
  text-align: center;
}

.woocommerce-pagination .page-numbers li .page-numbers {
  border-radius: var(--radius);
}

.woocommerce-pagination .page-numbers li .page-numbers.current {
  background: var(--ink);
  color: var(--bg);
}

/* Card: bottone a contorno (il rosso pieno resta per carrello/pagamento) */
ul.products li.product .button {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

ul.products li.product .button:hover {
  background: var(--wine);
  border-color: var(--wine);
  color: #f7f4ec;
}

ul.products li.product .button.loading {
  opacity: 0.6;
}

/* bottiglia intera: le foto sono 2:3 con ~13% di margine trasparente sopra/sotto,
   quindi niente padding e riquadro 3:4 (contain: nessuna foto viene mai tagliata,
   anche se la cantina ne carica una senza margini) */
ul.products li.product img,
ul.products li.product .attachment-woocommerce_thumbnail {
  aspect-ratio: 3 / 4;
  padding: 0;
}

/* Testata catalogo compatta (Storefront mette ~4em sotto al titolo) */
.woocommerce-products-header,
.storefront-full-width-content .woocommerce-products-header {
  padding-bottom: 0 !important;
  margin-bottom: 1.5rem !important;
}

.woocommerce-products-header .page-description:empty {
  display: none;
}

@media (max-width: 767px) {
  .storefront-sorting .woocommerce-result-count {
    display: none;
  }

  .storefront-sorting {
    justify-content: flex-end;
  }
}

/* ==========================================================================
   Blog — elenco a card (home.php) e articolo (single.php)
   ========================================================================== */
.bb-eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
}

.bb-blog {
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.bb-blog-head {
  max-width: 44rem;
  margin: 1.5rem auto 2rem;
  text-align: center;
}

.bb-blog-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0;
}

.bb-blog-intro {
  margin-top: 0.9rem;
  color: var(--ink-soft);
}

.bb-blog-intro p:last-child {
  margin-bottom: 0;
}

.bb-blog-empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 3rem 0;
}

.bb-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.bb-post-card {
  margin: 0;
}

.bb-post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.bb-post-card-link:hover,
.bb-post-card-link:focus-visible {
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(21, 21, 21, 0.35);
}

.bb-post-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-raised);
}

.bb-post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.bb-post-card-link:hover .bb-post-card-media img {
  transform: scale(1.04);
}

/* Articolo senza foto di copertina: stemma su fondo crema */
.bb-post-card-media img.bb-post-card-placeholder {
  object-fit: contain;
  padding: 22%;
  opacity: 0.55;
}

.bb-post-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.35rem 1.4rem;
}

.bb-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bb-post-meta span,
.bb-post-meta a {
  color: var(--wine);
  font-weight: 600;
  text-decoration: none;
}

.bb-post-card-title {
  font-size: clamp(1.4rem, 2vw, 1.65rem);
  margin: 0 0 0.6rem;
}

.bb-post-card-excerpt {
  margin: 0 0 1.1rem;
  font-size: 0.93rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bb-post-card-more {
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--wine);
}

.bb-pagination {
  margin-top: 2.5rem;
  text-align: center;
}

.bb-pagination .nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bb-pagination .page-numbers {
  display: inline-block;
  min-width: 2.4rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}

.bb-pagination .page-numbers.current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* Articolo */
.bb-article-head {
  max-width: 46rem;
  margin: 1rem auto 2rem;
  text-align: center;
}

.bb-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}

.bb-back:hover {
  color: var(--wine);
}

.bb-article-head .bb-post-meta {
  justify-content: center;
}

.bb-article-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0;
}

.bb-article-cover {
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.bb-article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.bb-prose {
  max-width: 44rem;
  margin-inline: auto;
  font-size: 1.06rem;
  line-height: 1.75;
}

.bb-prose > * + * {
  margin-top: 1.25em;
}

.bb-prose p {
  margin-bottom: 0;
}

.bb-prose h2 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  margin-top: 2em;
}

.bb-prose h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
  margin-top: 1.8em;
}

.bb-prose img {
  border-radius: var(--radius);
  height: auto;
}

.bb-prose figure {
  margin-inline: 0;
  margin-bottom: 0;
}

.bb-prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

/* Foto "a tutta larghezza" nell'editor: escono un po' dalla colonna di testo */
.bb-prose .alignwide,
.bb-prose .alignfull {
  max-width: none;
  width: min(100vw - 2 * var(--gutter), 64rem);
  margin-left: 50%;
  transform: translateX(-50%);
}

.bb-prose blockquote {
  margin-inline: 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--wine);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--ink);
}

.bb-prose .wp-block-gallery {
  gap: 0.6rem;
}

.bb-more {
  margin-top: clamp(3.5rem, 7vw, 5rem);
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}

.bb-more-head h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  margin: 0 0 1.5rem;
}

/* "Altri articoli": riga a scorrimento orizzontale (dito, trackpad, frecce, trascinamento col mouse) */
.bb-more-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.bb-more-head h2 {
  margin: 0;
}

.bb-more-nav {
  display: flex;
  gap: 0.5rem;
}

.bb-more-nav[hidden] {
  display: none;
}

.bb-more-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.bb-more-btn:hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.bb-more-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.bb-more-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 2rem) / 3.25);
  gap: 2rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  scrollbar-width: none;
  /* spazio per la card che si alza al passaggio del mouse */
  padding-block: 6px 1.25rem;
  cursor: grab;
}

.bb-post-card-link:focus:not(:focus-visible) {
  outline: none;
}

.bb-more-track::-webkit-scrollbar {
  display: none;
}

.bb-more-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.bb-more-track.is-dragging a {
  pointer-events: none;
}

.bb-more-track > .bb-post-card {
  scroll-snap-align: start;
}

.bb-more-track:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 4px;
}

@media (max-width: 999px) {
  .bb-more-track {
    grid-auto-columns: calc((100% - 1.25rem) / 2.2);
    gap: 1.25rem;
  }
}

@media (max-width: 639px) {
  .bb-more-track {
    grid-auto-columns: 82%;
    gap: 1rem;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
}

@media (max-width: 999px) {
  .bb-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .bb-post-grid {
    grid-template-columns: 1fr;
  }

  .bb-article-cover {
    margin-inline: calc(-1 * var(--gutter));
  }

  .bb-article-cover img {
    aspect-ratio: 4 / 3;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-post-card-link,
  .bb-post-card-media img {
    transition: none;
  }

  .bb-post-card-link:hover {
    transform: none;
  }
}

/* Box regalo: foto orizzontale di gruppo → riempie il riquadro (la foto intera resta nella scheda prodotto) */
ul.products li.product.bb-box-product img,
ul.products li.product.bb-box-product .attachment-woocommerce_thumbnail {
  object-fit: cover;
  object-position: center;
}

/* ==========================================================================
   Scheda prodotto: quantità (− / +, scelta rapida, totale)
   ========================================================================== */
.single-product form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
}

.single-product form.cart .bb-qty {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}

.bb-qty-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-dark);
}

.bb-qty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.single-product form.cart .bb-qty .quantity {
  display: inline-flex;
  align-items: stretch;
  float: none;
  margin: 0;
  border: 1px solid rgba(21, 21, 21, 0.28);
  border-radius: var(--radius);
  background: #fff;
  height: 3rem;
}

.single-product form.cart .bb-qty .quantity .qty {
  width: 3.4rem;
  height: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
  -moz-appearance: textfield;
}

.single-product form.cart .bb-qty .quantity .qty::-webkit-inner-spin-button,
.single-product form.cart .bb-qty .quantity .qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bb-qty-btn {
  width: 2.9rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.bb-qty-btn:hover {
  background: var(--bg-raised);
  color: var(--wine);
}

.bb-qty-btn:focus-visible {
  outline: 2px solid var(--navy-dark);
  outline-offset: -2px;
}

.bb-qty-presets select {
  height: 3rem;
  padding: 0 2.4rem 0 0.9rem;
  border: 1px solid rgba(21, 21, 21, 0.28);
  border-radius: var(--radius);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23151515' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}

.bb-qty-presets select:focus-visible {
  outline: 2px solid var(--navy-dark);
  outline-offset: 1px;
}

.bb-qty-total {
  margin: 0.35rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.bb-qty-total-label {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.bb-qty-total-value {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.bb-qty-total-old {
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: line-through;
}

.bb-qty-total-old:empty {
  display: none;
}

/* risparmio: compare con un piccolo "pop" quando si entra in una fascia di sconto */
.bb-qty-save {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--wine);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  transform-origin: left center;
}

.bb-qty-save[hidden] {
  display: none;
}

.bb-qty-save.is-new {
  animation: bb-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bb-qty-total-old.is-new {
  animation: bb-fade-up 0.35s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .bb-qty-save.is-new,
  .bb-qty-total-old.is-new {
    animation: none;
  }
}

.bb-qty-hint {
  margin: 0;
  min-height: 1.3em;
  font-size: 0.88rem;
  color: var(--wine-dark);
}

.single-product form.cart .single_add_to_cart_button {
  height: 3.25rem;
  padding-inline: 2rem;
  float: none;
}

@media (max-width: 767px) {
  .single-product form.cart .single_add_to_cart_button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .bb-qty-row {
    gap: 0.5rem;
  }

  .bb-qty-btn {
    width: 2.5rem;
  }

  .single-product form.cart .bb-qty .quantity .qty {
    width: 2.9rem;
  }

  .bb-qty-presets select {
    padding-left: 0.7rem;
    padding-right: 2.1rem;
    background-position: right 0.75rem center;
  }
}

/* ==========================================================================
   Foto prodotto: palco con luce morbida, ombra a terra, nome in trasparenza
   ========================================================================== */
ul.products li.product .bb-card-media {
  position: relative;
  display: block;
  margin: 0 0 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #f1eee5 0%, #e9e4d6 100%);
  box-shadow: inset 0 0 0 1px rgba(21, 21, 21, 0.04);
  transition: box-shadow 0.5s ease;
}

ul.products li.product .bb-card-media img,
ul.products li.product .bb-card-media .attachment-woocommerce_thumbnail {
  position: relative;
  z-index: 1;
  margin: 0 !important;
  background: transparent;
  border-radius: 0;
  filter: drop-shadow(0 18px 18px rgba(21, 21, 21, 0.22));
}

/* ombra a terra: le foto sono 2:3 con la base della bottiglia a circa l'87% dell'altezza */
.bb-card-floor {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 86.5%;
  width: 46%;
  height: 7%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(21, 21, 21, 0.2), rgba(21, 21, 21, 0) 70%);
  filter: blur(2px);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

@media (hover: hover) and (pointer: fine) {
  ul.products li.product:hover .bb-card-media {
    box-shadow: inset 0 0 0 1px rgba(21, 21, 21, 0.04), 0 22px 34px -24px rgba(21, 21, 21, 0.45);
  }

  ul.products li.product:hover .bb-card-media img {
    transform: translateY(-8px);
  }

  ul.products li.product:hover .bb-card-floor {
    width: 36%;
    opacity: 0.75;
  }
}

/* box regalo: foto di gruppo a tutto riquadro, senza ombre da "bottiglia" */
ul.products li.product.bb-box-product .bb-card-media img {
  filter: none;
}

ul.products li.product.bb-box-product .bb-card-floor {
  display: none;
}

/* Scheda prodotto */
.single-product div.product .woocommerce-product-gallery {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 65% 50% at 50% 40%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #f1eee5 0%, #e7e2d3 100%);
  overflow: hidden;
}

.single-product div.product .woocommerce-product-gallery::before {
  content: attr(data-bb-name);
  position: absolute;
  z-index: 0;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 34%;
  font-family: var(--font-display);
  /* una sola riga: la dimensione dipende dalla lunghezza del nome e dalla larghezza del riquadro */
  font-size: clamp(1.6rem, calc(155cqw / var(--bb-name-len, 8)), 7.5rem);
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
  color: rgba(21, 21, 21, 0.055);
  pointer-events: none;
}

.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
.single-product div.product .woocommerce-product-gallery .flex-viewport {
  position: relative;
  z-index: 1;
}

.single-product div.product .woocommerce-product-gallery__image {
  position: relative;
}

.single-product div.product .woocommerce-product-gallery__image img {
  filter: drop-shadow(0 26px 30px rgba(21, 21, 21, 0.28));
}

.single-product div.product .woocommerce-product-gallery__image::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 86.5%;
  width: 42%;
  height: 5%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(21, 21, 21, 0.22), rgba(21, 21, 21, 0) 70%);
  filter: blur(3px);
  pointer-events: none;
}

.single-product div.product.bb-box-product .woocommerce-product-gallery__image img {
  filter: none;
}

.single-product div.product.bb-box-product .woocommerce-product-gallery__image::after,
.single-product div.product.bb-box-product .woocommerce-product-gallery::before {
  display: none;
}

.single-product div.product .woocommerce-product-gallery__trigger {
  z-index: 3;
}

/* Ingresso della scheda (meno di un secondo): la bottiglia sale e si posa sulla sua ombra,
   il nome in trasparenza scorre dietro, i testi a destra compaiono in sequenza.
   Solo vini/olio (non i box regalo) e mai con "riduci movimento". */
@media (prefers-reduced-motion: no-preference) {
  .single-product div.product:not(.bb-box-product) .woocommerce-product-gallery__image:first-child img.wp-post-image {
    animation: bb-bottle-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
  }

  .single-product div.product:not(.bb-box-product) .woocommerce-product-gallery__image:first-child::after {
    animation: bb-floor-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
  }

  .single-product div.product .woocommerce-product-gallery::before {
    animation: bb-ghost-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .single-product div.product .summary > * {
    animation: bb-fade-up 0.5s ease-out both;
  }

  .single-product div.product .summary > :nth-child(1) { animation-delay: 0.35s; }
  .single-product div.product .summary > :nth-child(2) { animation-delay: 0.42s; }
  .single-product div.product .summary > :nth-child(3) { animation-delay: 0.49s; }
  .single-product div.product .summary > :nth-child(n+4) { animation-delay: 0.56s; }
}

@keyframes bb-bottle-in {
  from { opacity: 0; transform: translateY(40px) rotate(-4deg); }
  to { opacity: 1; transform: none; }
}

@keyframes bb-floor-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes bb-ghost-in {
  from { opacity: 0; transform: translateX(8%); }
  to { opacity: 1; transform: none; }
}
/* ==========================================================================
   Home shop: come funziona (cartigli) → scelta vini → prezzi di spedizione
   Cartiglio = stessa grafica delle info pratiche di Esperienze sul sito:
   angoli rientrati, cornice dorata interna, ornamento, etichetta + valore serif.
   ========================================================================== */
.bb-home-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-dark);
  text-align: center;
  margin: 0 0 0.5rem;
}

.bb-home-title {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  text-align: center;
  margin: 0 0 2rem;
}

.bb-howto {
  margin: 0.5rem 0 3.5rem;
}

.bb-howto-more {
  text-align: center;
  margin: 1.6rem 0 0;
  font-size: 0.92rem;
}

.bb-howto-more a {
  color: var(--navy-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 106, 156, 0.35);
}

.bb-howto-more a:hover {
  color: var(--wine);
  border-color: currentColor;
}

.bb-choose {
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.bb-choose .bb-home-title {
  margin-bottom: 1.5rem;
}

.bb-cartigli {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

@media (min-width: 1000px) {
  .bb-cartigli-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

.bb-cartiglio {
  --notch: 14px;
  position: relative;
  margin: 0;
  background: var(--bg-raised);
  padding: 1.8rem 1rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  -webkit-mask:
    radial-gradient(circle at 0 0, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)) top left / 51% 51% no-repeat,
    radial-gradient(circle at 100% 0, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)) top right / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)) bottom left / 51% 51% no-repeat,
    radial-gradient(circle at 100% 100%, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)) bottom right / 51% 51% no-repeat;
  mask:
    radial-gradient(circle at 0 0, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)) top left / 51% 51% no-repeat,
    radial-gradient(circle at 100% 0, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)) top right / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)) bottom left / 51% 51% no-repeat,
    radial-gradient(circle at 100% 100%, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)) bottom right / 51% 51% no-repeat;
}

.bb-cartiglio::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 20px solid transparent;
  border-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><path d='M12.5 0.75 H47.5 A12 12 0 0 0 59.25 12.5 V47.5 A12 12 0 0 0 47.5 59.25 H12.5 A12 12 0 0 0 0.75 47.5 V12.5 A12 12 0 0 0 12.5 0.75 Z' fill='none' stroke='%23c9963a' stroke-opacity='0.75' stroke-width='1.2'/></svg>") 20 stretch;
  pointer-events: none;
}

.bb-cartiglio-orn {
  position: relative;
  display: block;
  width: 56px;
  height: 7px;
  margin-bottom: 0.4rem;
  background: linear-gradient(90deg, transparent 0, #c9963a 0, #c9963a 20px, transparent 20px, transparent 36px, #c9963a 36px, #c9963a 56px) center / 100% 1px no-repeat;
  opacity: 0.85;
}

.bb-cartiglio-orn::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  background: #c9963a;
  transform: translate(-50%, -50%) rotate(45deg);
}

.bb-cartiglio-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0;
}

.bb-cartiglio-value {
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}

@media (min-width: 600px) {
  .bb-cartiglio {
    padding: 2.2rem 1.6rem 1.9rem;
  }
  .bb-cartiglio-label {
    font-size: 0.76rem;
  }
  .bb-cartiglio-value {
    font-size: 1.2rem;
  }
}

/* Prezzi di spedizione: una card per destinazione, note (dazi, stati USA) sotto il prezzo */
.bb-shipping {
  margin: 4rem 0 1rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + var(--market-h) + 1rem);
}

.bb-cartigli-ship {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .bb-cartigli-ship {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

.bb-cartigli-ship {
  max-width: 60rem;
  margin-inline: auto;
}

.bb-cartiglio-notes {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.8rem 0 0;
  border-top: 1px solid rgba(201, 150, 58, 0.35);
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.bb-cartiglio-notes li {
  margin: 0;
}

.bb-shipping-note {
  text-align: center;
  margin: 1.4rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Tipologie: tessere con la stessa foto "a palco" delle card prodotto, aprono la categoria */
.bb-types {
  margin: 0 0 1rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + var(--market-h) + 1rem);
}

.bb-types-grid {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 0.75rem;
  margin: 0;
  padding: 0;
}

.bb-type {
  flex: 0 0 calc(50% - 0.375rem);
  margin: 0;
}

@media (min-width: 900px) {
  .bb-types-grid {
    gap: 1.5rem;
  }
  .bb-type {
    flex-basis: calc(20% - 1.2rem);
    min-width: 11rem;
  }
}

.bb-type a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

.bb-type-media {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 0.9rem;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #f1eee5 0%, #e9e4d6 100%);
  box-shadow: inset 0 0 0 1px rgba(21, 21, 21, 0.04);
  transition: box-shadow 0.5s ease;
}

.bb-type-media img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  margin: 0;
  filter: drop-shadow(0 18px 18px rgba(21, 21, 21, 0.22));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* box regalo: foto della cassa scontornata (07/10/2026), si mostra intera come le bottiglie */
.bb-type-box .bb-type-media img {
  object-fit: contain;
  padding: 6% 0 2%;
}

.bb-type-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.25;
  color: var(--ink);
}

.bb-type-count {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.bb-type-btn {
  margin-top: 0.8rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--wine);
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wine);
  transition: background 0.3s ease, color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .bb-type a:hover .bb-type-media {
    box-shadow: inset 0 0 0 1px rgba(21, 21, 21, 0.04), 0 22px 34px -24px rgba(21, 21, 21, 0.45);
  }
  .bb-type a:hover .bb-type-media img {
    transform: translateY(-8px);
  }
  .bb-type-box a:hover .bb-type-media img {
    transform: scale(1.03);
  }
  .bb-type a:hover .bb-card-floor {
    width: 36%;
    opacity: 0.75;
  }
  .bb-type a:hover .bb-type-btn {
    background: var(--wine);
    color: #fff;
  }
}

.bb-type a:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 4px;
}

/* Torna indietro (categorie → tipologie, prodotto → categoria) */
.bb-shop-back {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.bb-shop-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.bb-shop-back a:hover {
  border-color: var(--wine);
  color: var(--wine);
}

/* Articolo: galleria dal modulo "Nuovo articolo" (campo Galleria foto), sotto il testo */
.bb-post-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  max-width: 56rem;
  margin: 2.5rem auto 0;
}

@media (min-width: 900px) {
  .bb-post-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.bb-post-gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
}

.bb-post-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  .bb-post-gallery a:hover img {
    transform: scale(1.03);
  }
}

/* Storefront mette overflow-x: hidden su body e #page: così l'header non resta fisso in alto
   (e scorrendo, ad es. verso gli avvisi del carrello, taglia la riga "Home › Carrello").
   clip taglia lo stesso ciò che esce di lato ma non blocca position: sticky. */
body,
#page {
  overflow-x: clip;
  overflow-y: visible;
}

/* avvisi e ancore non finiscono sotto l'header fisso */
html {
  scroll-padding-top: calc(var(--header-h, 73px) + var(--market-h, 30px) + 12px);
}

/* Carrello: "Procedi al pagamento" spento finché i vini non arrivano al minimo d'ordine */
.wc-block-cart__submit-button.bb-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.wc-block-cart__submit-button.bb-disabled:hover {
  background: var(--wine);
}

.bb-cart-min {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--wine-dark);
  text-align: center;
}

.wc-block-cart__submit-container {
  background: var(--bg);
}

/* ==========================================================================
   Il mio account: accesso e registrazione in una card (form-login.php + js/account.js)
   ========================================================================== */
:root {
  --ok: #2e8b4f;
  --ok-dark: #23703f;
  --ko: #c8102e;
}

.bb-auth {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 3rem;
}

.bb-auth-card,
.woocommerce-account .woocommerce-ResetPassword {
  position: relative;
  width: 100%;
  max-width: 27rem;
  margin-inline: auto;
  padding: 2rem 1.25rem 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(21, 21, 21, 0.04), 0 18px 40px -24px rgba(74, 69, 57, 0.35);
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .bb-auth-card,
  .woocommerce-account .woocommerce-ResetPassword {
    padding: 2.5rem 2.25rem 2rem;
  }
}

.bb-auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  transition: height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.bb-auth-shield {
  display: block;
  width: 44px;
  height: auto;
  margin: 0 auto 0.75rem;
}

.bb-auth-panels {
  position: relative;
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bb-auth-panel {
  transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bb-auth-panel.is-leaving {
  opacity: 0;
  transform: translateX(calc(var(--dir, 1) * -28px));
}

.bb-auth-panel.is-entering {
  opacity: 0;
  transform: translateX(calc(var(--dir, 1) * 28px));
  transition: none;
}

.bb-auth-title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.8rem, 6vw, 2.2rem);
}

.bb-auth-sub {
  margin: 0.35rem 0 1.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.bb-auth .form-row,
.woocommerce-ResetPassword .form-row {
  width: 100%;
  float: none;
  margin: 0 0 1rem;
  padding: 0;
}

.bb-auth label,
.woocommerce-ResetPassword label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}

.bb-auth .required {
  color: var(--wine);
}

.bb-auth input.input-text,
.woocommerce-ResetPassword input.input-text {
  width: 100%;
  height: 3rem;
  padding: 0 2.75rem 0 0.9rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.bb-auth input.input-text:focus,
.woocommerce-ResetPassword input.input-text:focus {
  outline: none;
  background: #fff;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.bb-auth .is-invalid input.input-text {
  border-color: var(--ko);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

/* occhio "mostra password" di WooCommerce */
.bb-auth .password-input,
.woocommerce-ResetPassword .password-input {
  position: relative;
  display: block;
}

.bb-auth .show-password-input,
.woocommerce-ResetPassword .show-password-input {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
}

/* spunta dentro il campo email / nome utente */
.bb-field-wrap {
  position: relative;
  display: block;
}

.bb-field-ok {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  width: 1.25rem;
  height: 1.25rem;
  transform: translateY(-50%) scale(0.6);
  opacity: 0;
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.bb-field-wrap.is-ok .bb-field-ok {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.bb-field-ok svg,
.bb-pw-ico svg,
.bb-step-ico svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-field-ok .bb-ico-ok {
  stroke: var(--ok);
  stroke-width: 2.6;
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  transition: stroke-dashoffset 0.35s 0.05s ease-out;
}

.bb-field-wrap.is-ok .bb-ico-ok {
  stroke-dashoffset: 0;
}

.bb-field-ok .bb-ico-ko,
.bb-step-ico .bb-ico-ko {
  display: none;
}

.bb-auth .bb-auth-remember {
  margin-bottom: 1.25rem;
}

.bb-auth-remember label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  color: var(--ink-soft);
  cursor: pointer;
}

.bb-auth-remember input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--ink);
}

.bb-auth .bb-auth-submit,
.woocommerce-ResetPassword .button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 3.25rem;
  font-size: 1rem;
}

.bb-auth .bb-auth-submit:focus {
  outline: none;
}

.bb-auth .bb-auth-submit:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.bb-auth-submit.is-busy {
  pointer-events: none;
  background: var(--wine-dark);
}

.bb-auth-submit.is-busy::before {
  content: '';
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(247, 244, 236, 0.35);
  border-top-color: #f7f4ec;
  border-radius: 50%;
  animation: bb-spin 0.7s linear infinite;
}

@keyframes bb-spin { to { transform: rotate(360deg); } }

/* passaggi durante l'accesso */
.bb-auth-steps {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--ink-soft);
  animation: bb-fade-up 0.35s ease-out;
}

.bb-auth-steps[hidden] {
  display: none;
}

.bb-auth-steps li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.25rem 0;
  opacity: 0.45;
  transition: opacity 0.25s, color 0.25s;
}

.bb-auth-steps li[data-state="run"],
.bb-auth-steps li[data-state="ok"],
.bb-auth-steps li[data-state="ko"] {
  opacity: 1;
}

.bb-auth-steps li[data-state="ok"] {
  color: var(--ink);
}

.bb-step-ico {
  position: relative;
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  padding: 0.2rem;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  box-sizing: border-box;
  transition: background 0.25s, border-color 0.25s;
}

.bb-step-ico .bb-ico-ok {
  stroke: #fff;
  stroke-width: 3.2;
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
}

li[data-state="run"] .bb-step-ico {
  border-color: rgba(21, 21, 21, 0.12);
  border-top-color: var(--ink);
  animation: bb-spin 0.7s linear infinite;
}

li[data-state="ok"] .bb-step-ico {
  background: var(--ok);
  border-color: var(--ok);
  animation: bb-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

li[data-state="ok"] .bb-step-ico .bb-ico-ok {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s 0.08s ease-out;
}

li[data-state="ko"] .bb-step-ico {
  background: var(--ko);
  border-color: var(--ko);
  animation: bb-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

li[data-state="ko"] .bb-step-ico .bb-ico-ko {
  display: block;
  stroke: #fff;
  stroke-width: 3.2;
}

.bb-auth-error {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.9rem;
  background: #fdf0f1;
  border-left: 3px solid var(--ko);
  color: #8a0c1f;
  font-size: 0.88rem;
  line-height: 1.45;
  animation: bb-fade-up 0.3s ease-out;
}

.bb-auth-error[hidden] {
  display: none;
}

.bb-auth-lost {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.92rem;
}

.bb-auth-switch {
  margin: 0.6rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.woocommerce .bb-auth-lost a,
.woocommerce .bb-auth-switch a {
  font-weight: 600;
  color: var(--wine);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 0.3s ease;
}

.woocommerce .bb-auth-lost a:hover,
.woocommerce .bb-auth-switch a:hover {
  background-size: 100% 1px;
}

/* regole della password */
.bb-pw {
  margin: -0.35rem 0 1.25rem;
}

.bb-pw-meter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 0.7rem;
}

.bb-pw-meter i {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  transition: background 0.3s;
}

.bb-pw[data-level="1"] .bb-pw-meter i:nth-child(-n+1),
.bb-pw[data-level="2"] .bb-pw-meter i:nth-child(-n+2) {
  background: var(--gold);
}

.bb-pw[data-level="3"] .bb-pw-meter i {
  background: var(--ok);
}

.bb-pw-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.bb-pw-rules li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  transition: color 0.25s;
}

.bb-pw-ico {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0.18rem;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  box-sizing: border-box;
  transition: background 0.25s, border-color 0.25s;
}

.bb-pw-ico .bb-ico-ok,
.bb-pw-ico .bb-ico-ko {
  stroke: #fff;
  stroke-width: 3.4;
  opacity: 0;
}

.bb-pw-ico .bb-ico-ok {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
}

.bb-pw-rules li[data-state="ok"] {
  color: var(--ok-dark);
}

.bb-pw-rules li[data-state="ok"] .bb-pw-ico {
  background: var(--ok);
  border-color: var(--ok);
}

.bb-pw-rules li[data-state="ok"] .bb-ico-ok {
  opacity: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s 0.05s ease-out;
}

.bb-pw-rules li[data-state="ko"] {
  color: var(--ko);
}

.bb-pw-rules li[data-state="ko"] .bb-pw-ico {
  background: var(--ko);
  border-color: var(--ko);
}

.bb-pw-rules li[data-state="ko"] .bb-ico-ko {
  opacity: 1;
}

.bb-pw-rules li.bb-pop .bb-pw-ico {
  animation: bb-pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bb-pw.is-error .bb-pw-rules li[data-state="ko"] {
  animation: bb-blink 0.5s ease-in-out 2;
}

@keyframes bb-pop {
  0% { transform: scale(0.55); }
  100% { transform: scale(1); }
}

@keyframes bb-blink {
  50% { opacity: 0.35; }
}

@keyframes bb-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* conferma: cerchio che si disegna, spunta, alone e scintille */
.bb-auth-card.is-leaving-forms .bb-auth-panels {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bb-auth-done {
  position: relative;
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.bb-auth-done[hidden] {
  display: none;
}

.bb-done-mark {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 1.25rem;
  overflow: visible;
}

.bb-done-halo {
  fill: var(--ok);
  opacity: 0;
  transform-origin: 60px 60px;
  animation: bb-halo 1.6s 0.55s ease-out forwards;
}

.bb-done-ring {
  fill: none;
  stroke: var(--ok);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 277;
  stroke-dashoffset: 277;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  animation: bb-draw 0.7s 0.1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.bb-done-check {
  fill: none;
  stroke: var(--ok);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 62;
  stroke-dashoffset: 62;
  animation: bb-draw 0.45s 0.7s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes bb-draw { to { stroke-dashoffset: 0; } }

@keyframes bb-halo {
  0% { opacity: 0; transform: scale(0.7); }
  35% { opacity: 0.22; transform: scale(1.08); }
  100% { opacity: 0.1; transform: scale(1); }
}

.bb-done-title,
.bb-done-sub {
  opacity: 0;
  animation: bb-fade-up 0.45s ease-out forwards;
}

.bb-done-title { animation-delay: 0.85s; outline: none; }
.bb-done-sub { animation-delay: 0.95s; margin-bottom: 0.5rem; }

.bb-done-burst {
  position: absolute;
  top: calc(1rem + 3.75rem);
  left: 50%;
  width: 0;
  height: 0;
}

.bb-done-burst i {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: bb-spark 0.9s 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bb-done-burst i:nth-child(3n) {
  background: var(--ok);
  width: 4px;
  height: 4px;
  margin: -2px;
}

@keyframes bb-spark {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(0.4); }
}

/* "Password dimenticata" e nuova password: stessa card */
.woocommerce-account .woocommerce-ResetPassword + .bb-auth-switch {
  max-width: 27rem;
  margin-inline: auto;
  border-top: 0;
}

.woocommerce-ResetPassword > p:first-child {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

@media (prefers-reduced-motion: reduce) {
  .bb-auth *,
  .bb-auth *::before,
  .bb-auth *::after,
  .bb-pw * {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ==========================================================================
   Avvisi WooCommerce (aggiunto al carrello, info, errori): via il verde e
   l'azzurro di Storefront, carta chiara con filo scuro come il resto dello shop
   ========================================================================== */
body .woocommerce-message,
body .woocommerce-info,
body .woocommerce-error,
body .woocommerce-noreviews,
body p.no-comments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1rem 3rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

body .woocommerce-message::after,
body .woocommerce-info::after,
body .woocommerce-error::after {
  content: none;
}

body .woocommerce-message::before,
body .woocommerce-info::before,
body .woocommerce-error::before,
body .woocommerce-noreviews::before,
body p.no-comments::before {
  color: var(--ink);
  top: 1.1rem;
  left: 1.15rem;
}

/* WooCommerce mette il fuoco sull'avviso (per i lettori di schermo): niente contorno nero */
body .woocommerce-message:focus,
body .woocommerce-info:focus,
body .woocommerce-error:focus {
  outline: none;
}

body .woocommerce-error {
  border-left-color: var(--wine);
}

body .woocommerce-error::before {
  color: var(--wine);
}

body .woocommerce-message a:not(.button),
body .woocommerce-info a:not(.button),
body .woocommerce-error a:not(.button) {
  color: var(--wine);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body .woocommerce-message a:not(.button):hover,
body .woocommerce-info a:not(.button):hover,
body .woocommerce-error a:not(.button):hover {
  color: var(--wine-dark);
  opacity: 1;
}

/* il pulsante va in coda al testo, contornato: niente blocco rosso dentro l'avviso */
body .woocommerce-message .button,
body .woocommerce-info .button,
body .woocommerce-error .button {
  order: 2;
  float: none;
  margin: 0 0 0 auto;
  padding: 0.55rem 1rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink) !important;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: none;
}

body .woocommerce-message .button:hover,
body .woocommerce-info .button:hover,
body .woocommerce-error .button:hover {
  background: var(--ink);
  color: var(--bg);
  opacity: 1;
}

/* avvisi a blocchi (carrello / cassa) */
body .wc-block-components-notice-banner {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
}

body .wc-block-components-notice-banner > svg {
  background: var(--ink);
  fill: #fff;
}

body .wc-block-components-notice-banner.is-error {
  border-left-color: var(--wine);
}

body .wc-block-components-notice-banner.is-error > svg {
  background: var(--wine);
}

/* ==========================================================================
   Card prodotto e tipologia: scheda bianca arrotondata, testi a sinistra,
   in basso prezzo (o conteggio) a sinistra e pulsante morbido a destra
   ========================================================================== */
.site-main ul.products li.product,
.woocommerce ul.products li.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto auto;
  align-items: center;
  column-gap: 0.5rem;
  padding: 0.6rem 0.6rem 0.9rem;
  background: #fff;
  border: 1px solid rgba(21, 21, 21, 0.07);
  border-radius: 16px;
  box-shadow: 0 10px 28px -22px rgba(74, 69, 57, 0.45);
  text-align: left;
  transition: box-shadow 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

ul.products li.product .woocommerce-LoopProduct-link {
  grid-column: 1 / -1;
  align-self: start;
}

ul.products li.product .bb-card-media {
  margin-bottom: 0.9rem;
  border-radius: 10px;
}

ul.products li.product .bb-card-cat,
.bb-type-count {
  color: var(--wine);
  padding: 0 0.3rem;
}

ul.products li.product .woocommerce-loop-product__title {
  padding: 0 0.3rem;
  margin: 0 0 0.9rem;
}

ul.products li.product .price {
  grid-column: 1;
  margin: 0;
  padding-left: 0.3rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

ul.products li.product .button {
  grid-column: 2;
  align-self: center;
  justify-self: end;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-radius: 10px;
  background: rgba(217, 17, 34, 0.09);
  color: var(--wine);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

ul.products li.product .button.add_to_cart_button::before {
  content: "+";
  margin-right: 0.3rem;
  font-weight: 400;
  font-size: 1.1em;
}

ul.products li.product .button:hover {
  background: var(--wine);
  color: #fff;
}

ul.products li.product .added_to_cart {
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: 0.5rem;
}

@media (hover: hover) and (pointer: fine) {
  .site-main ul.products li.product:hover,
  .woocommerce ul.products li.product:hover {
    box-shadow: 0 22px 40px -24px rgba(74, 69, 57, 0.55);
  }
}

@media (max-width: 767px) {
  .site-main ul.products li.product,
  .woocommerce ul.products li.product {
    padding: 0.45rem 0.45rem 0.7rem;
    border-radius: 14px;
  }
  ul.products li.product .price {
    font-size: 0.95rem;
  }
  ul.products li.product .button {
    width: auto;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
  }
}

/* tipologie: stessa scheda */
.bb-type a {
  height: 100%;
  align-items: stretch;
  text-align: left;
  padding: 0.6rem 0.6rem 0.9rem;
  background: #fff;
  border: 1px solid rgba(21, 21, 21, 0.07);
  border-radius: 16px;
  box-shadow: 0 10px 28px -22px rgba(74, 69, 57, 0.45);
  transition: box-shadow 0.5s ease;
}

.bb-type-media {
  border-radius: 10px;
}

.bb-type-name {
  padding: 0 0.3rem;
  margin-bottom: 0.8rem;
}

.bb-type-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
}

.bb-type-count {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bb-type-btn {
  margin: 0;
  padding: 0.5rem 0.8rem;
  border: 0;
  border-radius: 10px;
  background: rgba(217, 17, 34, 0.09);
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .bb-type a:hover {
    box-shadow: 0 22px 40px -24px rgba(74, 69, 57, 0.55);
  }
  .bb-type a:hover .bb-type-media {
    box-shadow: inset 0 0 0 1px rgba(21, 21, 21, 0.04);
  }
}

.bb-type a:focus-visible {
  outline-offset: 2px;
}

.bb-type {
  min-width: 0;
}

.bb-type-foot {
  flex-wrap: wrap;
  row-gap: 0.45rem;
}

@media (max-width: 899px) {
  .bb-type a {
    padding: 0.45rem 0.45rem 0.7rem;
    border-radius: 14px;
  }
  .bb-type-name {
    font-size: 1.1rem;
  }
  .bb-type-count {
    font-size: 0.66rem;
    letter-spacing: 0.06em;
  }
  .bb-type-btn {
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* telefono: due colonne strette, il prezzo resta su una riga e il pulsante diventa solo "+"
   (il nome per i lettori di schermo resta nell'aria-label di WooCommerce) */
ul.products li.product .price {
  white-space: nowrap;
}

@media (max-width: 767px) {
  ul.products li.product .button.add_to_cart_button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    font-size: 0;
  }
  ul.products li.product .button.add_to_cart_button::before {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1;
  }
}

/* dopo l'aggiunta: niente link "Visualizza carrello" che allunga la card (il carrello in alto
   si aggiorna già col numero), il "+" diventa una spunta */
ul.products li.product .added_to_cart {
  display: none !important;
}

ul.products li.product .button.add_to_cart_button.added::before {
  content: "\2713";
}

ul.products li.product .button.add_to_cart_button.added::after {
  display: none;
}

/* Tasto "Shop" dopo Contatti: piccolo bottone rosso come "Acquista online" sul sito */
.bb-nav-list {
  align-items: center;
}

.bb-nav-list .bb-nav-shop a {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: var(--wine);
  border-radius: var(--radius);
  color: #fff;
  font-weight: 600;
  transition: background 0.2s ease;
}

.bb-nav-list .bb-nav-shop a:hover {
  background: var(--wine-dark);
  color: #fff;
}

@media (max-width: 1319px) {
  .bb-nav-list {
    align-items: stretch;
  }
  .bb-nav-list li.bb-nav-shop {
    border-bottom: 0;
    padding-top: 1.25rem;
  }
  .bb-nav-list .bb-nav-shop a {
    display: block;
    padding: 0.9rem 1rem;
    text-align: center;
  }
}

/* ==========================================================================
   Card morbide: corpo crema come i cartigli, filo dorato, foto su pastello
   tenue per categoria (bianchi azzurro come la capsula, rossi rosato...)
   ========================================================================== */
.site-main ul.products li.product,
.woocommerce ul.products li.product,
.bb-type a,
ul.products li.product .bb-card-media,
.bb-type-media {
  box-shadow: none !important;
}

.site-main ul.products li.product,
.woocommerce ul.products li.product,
.bb-type a {
  background: var(--bg-raised);
  border: 1px solid rgba(201, 150, 58, 0.35);
}

ul.products li.product .bb-card-media,
.bb-type-media {
  --tint: #ece6d8;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--tint) 60%, #fff) 0%, var(--tint) 100%);
}

ul.products li.product.product_cat-vini-bianchi .bb-card-media,
.bb-type-cat-vini-bianchi .bb-type-media { --tint: #dbe5f0; }
ul.products li.product.product_cat-vini-rossi .bb-card-media,
.bb-type-cat-vini-rossi .bb-type-media { --tint: #e6b9b4; }
ul.products li.product.product_cat-altri-prodotti .bb-card-media,
.bb-type-cat-altri-prodotti .bb-type-media { --tint: #efe8d2; }
ul.products li.product.product_cat-olio-evo .bb-card-media,
.bb-type-cat-olio-evo .bb-type-media { --tint: #e6e4cc; }
ul.products li.product.product_cat-box-regalo .bb-card-media,
.bb-type-cat-box-regalo .bb-type-media { --tint: #ecdccb; }

/* tipologie più grandi: su schermi larghi la griglia esce dal contenitore (max 1440px) */
@media (min-width: 1400px) {
  .bb-types-grid {
    width: min(1440px, calc(100vw - 4rem));
    margin-left: calc(50% - min(720px, 50vw - 2rem));
    gap: 1.5rem 1.25rem;
  }
  .bb-type {
    flex-basis: calc(20% - 1rem);
  }
}

/* bottiglie più grandi nel riquadro (le foto hanno molto margine) */
ul.products li.product:not(.bb-box-product) .bb-card-media img,
.bb-type:not(.bb-type-box) .bb-type-media img {
  scale: 1.18;
  transform-origin: 50% 52%;
}

/* spedizioni: card dispari finale (Canada) centrata */
@media (min-width: 600px) {
  .bb-cartigli-ship > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 0.55rem);
  }
}

/* foto a filo della card in alto e ai lati: il crema resta solo sotto, dal titolo in giù */
.site-main ul.products li.product,
.woocommerce ul.products li.product,
.bb-type a {
  --card-pad: 0.6rem;
  overflow: hidden;
}

ul.products li.product .bb-card-media,
.bb-type-media {
  width: calc(100% + 2 * var(--card-pad));
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 0.9rem;
  border-radius: 0;
}

@media (max-width: 767px) {
  .site-main ul.products li.product,
  .woocommerce ul.products li.product {
    --card-pad: 0.45rem;
  }
}

@media (max-width: 899px) {
  .bb-type a {
    --card-pad: 0.45rem;
  }
}

/* ==========================================================================
   Variante "tinta piena": tutta la card nel pastello della categoria
   (scelta 2026-10-05 da card-varianti.html), niente stacco crema né bordo
   ========================================================================== */
.site-main ul.products li.product,
.woocommerce ul.products li.product,
.bb-type a {
  --tint: #ece6d8;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 60%, #fff) 0%, var(--tint) 100%);
}

ul.products li.product.product_cat-vini-bianchi, .bb-type-cat-vini-bianchi a { --tint: #dbe5f0; }
ul.products li.product.product_cat-vini-rossi, .bb-type-cat-vini-rossi a { --tint: #e6b9b4; }
ul.products li.product.product_cat-altri-prodotti, .bb-type-cat-altri-prodotti a { --tint: #efe8d2; }
ul.products li.product.product_cat-olio-evo, .bb-type-cat-olio-evo a { --tint: #e6e4cc; }
ul.products li.product.product_cat-box-regalo, .bb-type-cat-box-regalo a { --tint: #ecdccb; }

/* la foto resta trasparente sulla tinta della card, con la luce morbida dietro la bottiglia */
ul.products li.product .bb-card-media,
.bb-type-media {
  background: radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 70%) !important;
}

ul.products li.product .button,
.bb-type-btn {
  background: #fff;
  color: var(--wine);
  border-radius: 999px;
}

ul.products li.product .button:hover,
ul.products li.product .button:focus-visible {
  background: var(--wine);
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .bb-type a:hover .bb-type-btn {
    background: var(--wine);
    color: #fff;
  }
}

/* sul rosso il rosso del marchio si legge poco: categoria in rosso scuro */
ul.products li.product.product_cat-vini-rossi .bb-card-cat,
.bb-type-cat-vini-rossi .bb-type-count {
  color: var(--wine-dark);
}

/* ==========================================================================
   Il mio account a card (cliente collegato): menu a sinistra, contenuti in card
   ========================================================================== */
.woocommerce-account.logged-in .site-main .woocommerce {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 900px) {
  .woocommerce-account.logged-in .site-main .woocommerce {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 2rem;
  }
}

.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
  float: none;
  width: auto;
  margin: 0;
  min-width: 0;
}

.bb-acc-nav,
.bb-acc-card,
.bb-order {
  background: #fff;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 18px;
}

/* menu */
.bb-acc-nav {
  padding: 1rem;
}

@media (min-width: 900px) {
  .bb-acc-nav {
    position: sticky;
    top: 7rem;
  }
}

.bb-acc-who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.25rem 1rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
}

.bb-acc-avatar {
  flex: 0 0 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eedad8;
  color: var(--wine-dark);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.bb-acc-who-text {
  display: grid;
  min-width: 0;
}

.bb-acc-hello {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.2;
}

.bb-acc-mail {
  font-size: 0.82rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.woocommerce-account .bb-acc-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
  border: 0;
}

.woocommerce-account .bb-acc-nav ul li {
  margin: 0;
  border: 0;
}

.woocommerce-account .bb-acc-nav ul li a {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.woocommerce-account .bb-acc-nav ul li a::before,
.woocommerce-account .bb-acc-nav ul li a::after {
  display: none !important;
}

.woocommerce-account .bb-acc-nav ul li a:hover {
  background: var(--bg);
}

.woocommerce-account .bb-acc-nav ul li.is-active a {
  background: rgba(217, 17, 34, 0.09);
  color: var(--wine);
  font-weight: 600;
}

.woocommerce-account .bb-acc-nav ul li.woocommerce-MyAccount-navigation-link--customer-logout {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(21, 21, 21, 0.08);
}

.woocommerce-account .bb-acc-nav ul li.woocommerce-MyAccount-navigation-link--customer-logout a {
  color: var(--ink-soft);
}

/* su telefono il menu è una riga di pillole che scorre */
@media (max-width: 899px) {
  .bb-acc-nav {
    padding: 0.85rem;
  }
  .woocommerce-account .bb-acc-nav ul {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -0.85rem;
    padding: 0 0.85rem;
  }
  .woocommerce-account .bb-acc-nav ul::-webkit-scrollbar {
    display: none;
  }
  .woocommerce-account .bb-acc-nav ul li a {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: var(--bg);
    white-space: nowrap;
    font-size: 0.9rem;
  }
  .woocommerce-account .bb-acc-nav ul li.woocommerce-MyAccount-navigation-link--customer-logout {
    margin: 0;
    padding: 0;
    border: 0;
  }
}

/* contenuti */
.bb-acc-intro {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.bb-acc-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .bb-acc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bb-acc-stack {
  display: grid;
  gap: 1rem;
}

.bb-acc-card {
  margin: 0;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

@media (min-width: 900px) {
  .bb-acc-card {
    padding: 1.5rem 1.6rem;
  }
}

.bb-acc-card-head {
  display: grid;
  gap: 0.2rem;
}

.woocommerce-account .bb-acc-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.2;
}

.bb-acc-card-sub,
.bb-acc-hint,
.bb-acc-muted {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.bb-acc-hint {
  display: block;
  margin-top: 0.35rem;
}

.bb-acc-address {
  margin: 0;
  font-style: normal;
  line-height: 1.6;
  flex: 1;
}

.bb-acc-card > .button {
  align-self: flex-start;
}

.bb-acc-empty {
  align-items: flex-start;
}

.bb-acc-empty p {
  margin: 0;
  color: var(--ink-soft);
}

/* pulsanti dell'account */
.woocommerce-account .bb-btn-main,
.woocommerce-account .bb-btn-soft,
.woocommerce-account .bb-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.55rem 1.15rem;
  border: 0;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.woocommerce-account .bb-btn-main::after,
.woocommerce-account .bb-btn-soft::after {
  display: none;
}

.woocommerce-account .bb-btn-main {
  background: var(--wine);
  color: #fff;
}

.woocommerce-account .bb-btn-main:hover {
  background: var(--wine-dark);
  color: #fff;
}

.woocommerce-account .bb-btn-soft {
  background: rgba(217, 17, 34, 0.09);
  color: var(--wine);
}

.woocommerce-account .bb-btn-soft:hover {
  background: var(--wine);
  color: #fff;
}

.woocommerce-account .bb-btn-danger {
  background: transparent;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.woocommerce-account .bb-btn-danger:hover {
  background: transparent;
  color: var(--wine);
}

.bb-acc-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  margin: 0.25rem 0 0;
}

/* campi dei form */
.bb-acc-fields,
.bb-acc-form .woocommerce-address-fields__field-wrapper {
  display: grid;
  gap: 0.9rem 1rem;
  margin: 0;
  padding: 0;
  border: 0;
}

@media (min-width: 700px) {
  .bb-acc-fields,
  .bb-acc-form .woocommerce-address-fields__field-wrapper {
    grid-template-columns: 1fr 1fr;
  }
  .bb-acc-fields > .form-row-wide,
  .bb-acc-fields > .bb-pw,
  .bb-acc-form .woocommerce-address-fields__field-wrapper > .form-row-wide {
    grid-column: 1 / -1;
  }
}

.bb-acc-form .form-row {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
}

.bb-acc-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.bb-acc-form .required {
  color: var(--wine);
  text-decoration: none;
}

.bb-acc-form input.input-text,
.bb-acc-form select,
.bb-acc-form textarea,
.bb-acc-form .select2-container .select2-selection--single {
  width: 100%;
  height: 3rem;
  padding: 0 0.9rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.bb-acc-form .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 3rem;
  padding: 0;
  color: var(--ink);
}

.bb-acc-form .select2-container .select2-selection--single .select2-selection__arrow {
  height: 3rem;
  right: 0.6rem;
}

.bb-acc-form input.input-text:focus,
.bb-acc-form select:focus,
.bb-acc-form .select2-container--focus .select2-selection--single,
.bb-acc-form .select2-container--open .select2-selection--single {
  outline: none;
  background: #fff;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.bb-acc-form .password-input {
  display: block;
  position: relative;
}

/* card ordini */
.bb-orders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.bb-order {
  margin: 0;
  padding: 1.1rem 1.25rem;
  display: grid;
  gap: 0.9rem;
}

.bb-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.woocommerce-account .bb-order-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}

.bb-order-date {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.bb-badge {
  flex: 0 0 auto;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.bb-badge--ok { background: #e2f0e5; color: #1f6634; }
.bb-badge--run { background: #dfe8f5; color: #2c4f8f; }
.bb-badge--wait { background: #f6ecd6; color: #855700; }
.bb-badge--off { background: #ece9e3; color: #5d574c; }
.bb-badge--ko { background: #f6dcdc; color: #a80d1a; }

.bb-order-items {
  list-style: none;
  margin: 0;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(21, 21, 21, 0.08);
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  display: grid;
  gap: 0.6rem;
}

.bb-order-items li {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.bb-order-thumb {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}

.bb-order-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
}

.bb-order-item-name {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-order-item-qty {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.bb-order-items li.bb-order-more {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.bb-order-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bb-order-total {
  display: grid;
}

.bb-order-total span {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.bb-order-total strong {
  font-size: 1.15rem;
}

.bb-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bb-acc-pager {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

/* carte salvate */
.bb-paycard {
  gap: 0.5rem;
}

.bb-paycard.is-default {
  border-color: rgba(31, 102, 52, 0.35);
}

.bb-paycard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.bb-paycard-brand {
  font-weight: 600;
  font-size: 1.05rem;
}

.bb-paycard-num {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.bb-paycard-exp {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.bb-paycard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.bb-paycard-actions .button {
  min-height: 2.3rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* Storefront usa ".hentry .entry-content …": stessi selettori, più specifici */
.hentry .entry-content .bb-acc-nav ul li.woocommerce-MyAccount-navigation-link a {
  padding: 0.7rem 0.85rem;
}

@media (max-width: 899px) {
  .hentry .entry-content .bb-acc-nav ul li.woocommerce-MyAccount-navigation-link a {
    padding: 0.55rem 0.9rem;
  }
}

.hentry .entry-content a.bb-order-num {
  text-decoration: none;
}

.woocommerce-account .bb-btn-main,
.woocommerce-account .bb-btn-soft,
.woocommerce-account .bb-btn-danger,
.woocommerce-account .bb-paycard-actions .button {
  border-radius: 999px !important;
}

.hentry .entry-content .bb-acc-nav ul {
  margin: 0;
  border: 0;
}

@media (max-width: 899px) {
  .hentry .entry-content .bb-acc-nav ul {
    margin: 0 -0.85rem;
  }
}

.woocommerce-account .woocommerce .button.bb-btn-main {
  background: var(--wine);
  color: #fff;
}

.woocommerce-account .woocommerce .button.bb-btn-soft {
  background: rgba(217, 17, 34, 0.09);
  color: var(--wine);
}

.woocommerce-account .woocommerce .button.bb-btn-main:hover,
.woocommerce-account .woocommerce .button.bb-btn-soft:hover {
  background: var(--wine-dark);
  color: #fff;
}

.woocommerce-account .woocommerce .button.bb-btn-danger {
  background: transparent;
  color: var(--ink-soft);
}

/* telefono: voci del menu su più righe, tutte visibili */
@media (max-width: 899px) {
  .hentry .entry-content .bb-acc-nav ul {
    flex-wrap: wrap;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
}

.hentry .entry-content .bb-acc-nav ul li,
.hentry .entry-content .bb-acc-nav ul li.woocommerce-MyAccount-navigation-link {
  border: 0;
  padding: 0;
}

.woocommerce-account fieldset.bb-acc-fields {
  background: transparent;
  padding: 0;
  margin: 0;
}

.bb-acc-form .show-password-input {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
}

.bb-acc-form .password-input input.input-text {
  padding-right: 2.9rem;
}

/* dettaglio ordine: intestazione, prodotti e indirizzi in card */
.woocommerce-view-order .woocommerce-MyAccount-content {
  display: grid;
  gap: 1rem;
}

.woocommerce-view-order .woocommerce-MyAccount-content > * {
  margin: 0;
}

.bb-order-summary {
  gap: 0.6rem;
}

.hentry .entry-content a.bb-acc-back {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}

.hentry .entry-content a.bb-acc-back:hover {
  color: var(--wine);
}

.bb-order-notes ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.bb-order-notes li {
  margin: 0;
  padding-left: 0.9rem;
  border-left: 2px solid rgba(217, 17, 34, 0.25);
}

.bb-order-notes .meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.bb-order-notes .description p {
  margin: 0.2rem 0 0;
}

.woocommerce-view-order .woocommerce-order-details,
.woocommerce-view-order .woocommerce-customer-details .woocommerce-column,
.woocommerce-view-order .woocommerce-customer-details > address {
  background: #fff;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 18px;
  padding: 1.25rem;
  margin: 0;
}

@media (min-width: 900px) {
  .woocommerce-view-order .woocommerce-order-details,
  .woocommerce-view-order .woocommerce-customer-details .woocommerce-column,
  .woocommerce-view-order .woocommerce-customer-details > address {
    padding: 1.5rem 1.6rem;
  }
}

.woocommerce-view-order .woocommerce-order-details__title,
.woocommerce-view-order .woocommerce-column__title,
.woocommerce-view-order .woocommerce-customer-details > h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.2;
}

.woocommerce-view-order table.order_details {
  margin: 0;
  border: 0;
  background: transparent;
}

.woocommerce-view-order table.order_details th,
.woocommerce-view-order table.order_details td {
  padding: 0.75rem 0;
  background: transparent !important;
  border: 0;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
}

.woocommerce-view-order table.order_details thead th {
  padding-top: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.woocommerce-view-order table.order_details .product-total,
.woocommerce-view-order table.order_details tfoot td {
  text-align: right;
}

.woocommerce-view-order table.order_details tfoot tr:last-child th,
.woocommerce-view-order table.order_details tfoot tr:last-child td {
  border-bottom: 0;
  font-size: 1.1rem;
}

.hentry .entry-content .woocommerce-view-order table.order_details a,
.woocommerce-view-order table.order_details .product-name a {
  color: var(--ink);
  text-decoration: none;
}

.woocommerce-view-order .order-again {
  margin: 1rem 0 0;
}

.woocommerce-view-order .order-again .button,
.woocommerce-view-order .order-actions-button {
  border-radius: 999px !important;
  background: rgba(217, 17, 34, 0.09) !important;
  color: var(--wine) !important;
}

.woocommerce-view-order .order-again .button:hover,
.woocommerce-view-order .order-actions-button:hover {
  background: var(--wine) !important;
  color: #fff !important;
}

.woocommerce-view-order .woocommerce-customer-details {
  margin: 0;
}

.woocommerce-view-order .woocommerce-customer-details .woocommerce-columns {
  display: grid;
  gap: 1rem;
  margin: 0;
}

@media (min-width: 700px) {
  .woocommerce-view-order .woocommerce-customer-details .woocommerce-columns {
    grid-template-columns: 1fr 1fr;
  }
}

.woocommerce-view-order .woocommerce-customer-details .woocommerce-column {
  float: none;
  width: auto;
}

.woocommerce-view-order .woocommerce-customer-details address {
  font-style: normal;
  line-height: 1.6;
  border: 0;
  padding: 0;
}

.woocommerce-view-order .woocommerce-customer-details .woocommerce-column address {
  margin: 0;
}

/* un solo indirizzo (senza colonne): la card è tutta la sezione */
.woocommerce-view-order .woocommerce-customer-details:not(:has(.woocommerce-columns)) {
  background: #fff;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 18px;
  padding: 1.25rem;
}

@media (min-width: 900px) {
  .woocommerce-view-order .woocommerce-customer-details:not(:has(.woocommerce-columns)) {
    padding: 1.5rem 1.6rem;
  }
}

/* ==========================================================================
   Carrello classico (woocommerce/cart/*.php): righe a card nella tinta della tipologia,
   barra verso minimo/sconto, riepilogo bordeaux a scontrino, carrello vuoto con le tipologie
   ========================================================================== */
.woocommerce-cart {
  --bordeaux: #5a1019;
  --receipt-ink: #f6efe2;
}

.woocommerce-cart .hentry .entry-content > .woocommerce {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.woocommerce-cart .woocommerce-notices-wrapper:empty {
  display: none;
}

@media (min-width: 900px) {
  .woocommerce-cart .hentry .entry-content > .woocommerce:has(.bb-cart-form) {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.5rem 2.5rem;
  }

  .woocommerce-cart .hentry .entry-content > .woocommerce > :not(.bb-cart-form):not(.bb-cart-side) {
    grid-column: 1 / -1;
  }

  .woocommerce-cart .bb-cart-side {
    position: sticky;
    top: calc(var(--header-h, 73px) + var(--market-h, 30px) + 1rem);
  }
}

.woocommerce-cart .bb-cart-form,
.woocommerce-cart .cart-collaterals {
  margin: 0;
  min-width: 0;
}

.woocommerce-cart .cart-collaterals .cart_totals {
  float: none;
  width: auto;
  margin: 0;
}

/* barra verso minimo / sconto */
.bb-goal {
  margin: 0 0 1rem;
  padding: 1rem 1.2rem 1.1rem;
  border-radius: 18px;
  background: #ece6d8;
}

.bb-goal-text {
  margin: 0 0 0.8rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.bb-goal-text b {
  color: var(--wine-dark);
  font-weight: 600;
}

.bb-goal-bar {
  position: relative;
  height: 8px;
  margin: 0 11px;
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.1);
}

.bb-goal-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: var(--wine);
}

/* tappe: cerchio vuoto, poi vino con spunta */
.bb-goal-step {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(21, 21, 21, 0.18);
  transform: translate(-50%, -50%);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.bb-goal-step::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s;
}

.bb-goal-step.is-on {
  background: var(--wine);
  box-shadow: inset 0 0 0 2px var(--wine);
}

.bb-goal-step.is-on::after {
  transform: rotate(45deg) scale(1);
}

/* tappa appena raggiunta: rimbalzo e onda */
.bb-goal-step.is-new {
  animation: bb-step-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bb-goal-step.is-new::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--wine);
  animation: bb-step-ring 0.9s ease-out forwards;
}

@keyframes bb-step-pop {
  0% { transform: translate(-50%, -50%) scale(1); }
  40% { transform: translate(-50%, -50%) scale(1.45); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes bb-step-ring {
  from { transform: scale(1); opacity: 0.8; }
  to { transform: scale(2.8); opacity: 0; }
}

.bb-goal.is-hit {
  animation: bb-goal-hit 1.2s ease-out;
}

@keyframes bb-goal-hit {
  0% { background-color: #ece6d8; }
  25% { background-color: #f2d9d6; }
  100% { background-color: #ece6d8; }
}

.bb-goal-marks {
  position: relative;
  height: 2.1rem;
  margin: 0.6rem 11px 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.bb-goal-marks span {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: color 0.25s ease;
}

.bb-goal-marks span b {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.bb-goal-marks span.is-end {
  align-items: flex-end;
  transform: translateX(calc(-100% + 11px));
}

.bb-goal-marks span.is-on,
.bb-goal-marks span.is-on b {
  color: var(--wine-dark);
}

/* righe prodotto */
.bb-cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hentry .entry-content .bb-cart-items li.bb-ci {
  --tint: #ece6d8;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin: 0;
  padding: 0.6rem 1rem 0.6rem 0.5rem;
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 60%, #fff) 0%, var(--tint) 100%);
}

.bb-ci--vini-bianchi { --tint: #dbe5f0 !important; }
.bb-ci--vini-rossi { --tint: #e6b9b4 !important; }
.bb-ci--altri-prodotti { --tint: #efe8d2 !important; }
.bb-ci--olio-evo { --tint: #e6e4cc !important; }
.bb-ci--box-regalo { --tint: #ecdccb !important; }

.bb-ci-media {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  background: radial-gradient(ellipse 70% 55% at 50% 45%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 70%);
}

.hentry .entry-content .bb-ci-media img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(21, 21, 21, 0.2));
}

.bb-ci--box-regalo .bb-ci-media img {
  filter: none;
}

.bb-ci-body {
  min-width: 0;
}

.bb-ci-cat {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wine-dark);
}

.bb-ci-name {
  margin: 0.1rem 0 0.15rem;
  font-family: var(--display, 'Garamond N', Georgia, serif);
  font-size: 1.35rem;
  line-height: 1.15;
}

.hentry .entry-content .bb-ci-name a {
  color: var(--ink);
  text-decoration: none;
}

.hentry .entry-content .bb-ci-name a:hover {
  color: var(--wine-dark);
}

.bb-ci-name dl.variation {
  margin: 0.2rem 0 0;
  font-family: var(--body, 'Work Sans', sans-serif);
  font-size: 0.8rem;
}

.bb-ci-unit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.bb-ci-unit del {
  opacity: 0.7;
}

.bb-ci-off {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--wine-dark);
}

.bb-ci-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.8rem;
  margin-top: 0.55rem;
}

.bb-ci-ctl {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.woocommerce-cart .bb-ci-qty .quantity {
  display: inline-flex;
  align-items: center;
  height: 2.4rem;
  margin: 0;
  border-radius: 999px;
  background: #fff;
}

.woocommerce-cart .bb-ci-qty .bb-step {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.woocommerce-cart .bb-ci-qty .bb-step:hover {
  color: var(--wine);
}

.woocommerce-cart .bb-ci-qty input.qty {
  width: 2rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  -moz-appearance: textfield;
}

.woocommerce-cart .bb-ci-qty input.qty::-webkit-inner-spin-button,
.woocommerce-cart .bb-ci-qty input.qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.hentry .entry-content .bb-ci-remove a.remove {
  display: inline;
  width: auto;
  height: auto;
  border: 0;
  background: none;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink-soft) !important;
  text-indent: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hentry .entry-content .bb-ci-remove a.remove::before {
  content: none;
}

.hentry .entry-content .bb-ci-remove a.remove:hover {
  background: none;
  color: var(--wine) !important;
}

.bb-ci-total {
  margin-left: auto;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
}

/* codice promozionale e aggiornamento */
.bb-cart-actions {
  margin-top: 1rem;
}

.bb-coupon summary {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  list-style: none;
}

.bb-coupon summary::-webkit-details-marker {
  display: none;
}

.woocommerce-cart .bb-coupon .coupon {
  display: flex;
  gap: 0.5rem;
  max-width: 26rem;
  margin-top: 0.7rem;
}

.woocommerce-cart .bb-coupon #coupon_code {
  flex: 1;
  min-width: 0;
  height: 2.8rem;
  padding: 0 1rem;
  border: 1px solid rgba(21, 21, 21, 0.18);
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}

.woocommerce-cart .bb-coupon .bb-coupon-btn {
  height: 2.8rem;
  padding: 0 1.3rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
}

/* il carrello si aggiorna da solo: il pulsante resta per chi non ha JavaScript */

.woocommerce-cart .bb-cart-form:has(.bb-step) .bb-update-cart {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* riepilogo a scontrino */
.woocommerce-cart .bb-receipt {
  position: relative;
  margin-bottom: 10px;
  padding: 1.5rem 1.4rem 1.6rem;
  border-radius: 18px 18px 0 0;
  background: var(--bordeaux);
  color: var(--receipt-ink);
}

.woocommerce-cart .bb-receipt::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
  background: radial-gradient(circle at 8px 0, var(--bordeaux) 7.5px, transparent 8px) 0 0 / 16px 8px repeat-x;
}

.hentry .entry-content .bb-receipt .bb-receipt-title {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  font-family: var(--display, 'Garamond N', Georgia, serif);
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--receipt-ink);
}

.hentry .entry-content .bb-receipt table.bb-receipt-table {
  width: 100%;
  margin: 0;
  border: 0;
  background: none;
  font-size: 0.92rem;
}

.hentry .entry-content .bb-receipt table.bb-receipt-table tr,
.hentry .entry-content .bb-receipt table.bb-receipt-table th,
.hentry .entry-content .bb-receipt table.bb-receipt-table td {
  border: 0;
  background: none !important;
  color: var(--receipt-ink);
}

.hentry .entry-content .bb-receipt table.bb-receipt-table th,
.hentry .entry-content .bb-receipt table.bb-receipt-table td {
  padding: 0.35rem 0;
  font-weight: 400;
  vertical-align: top;
}

.hentry .entry-content .bb-receipt table.bb-receipt-table td {
  font-weight: 600;
  text-align: right;
}

.bb-receipt .woocommerce-shipping-totals td {
  font-weight: 400 !important;
}

.bb-receipt #shipping_method {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bb-receipt #shipping_method li {
  margin: 0 0 0.2rem;
}

.bb-receipt .woocommerce-shipping-destination,
.bb-receipt .woocommerce-shipping-calculator {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(246, 239, 226, 0.75);
}

.hentry .entry-content .bb-receipt a {
  color: var(--receipt-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hentry .entry-content .bb-receipt .shipping-calculator-form input,
.hentry .entry-content .bb-receipt .shipping-calculator-form select {
  color: var(--ink);
}

.hentry .entry-content .bb-receipt table.bb-receipt-table tr.order-total th,
.hentry .entry-content .bb-receipt table.bb-receipt-table tr.order-total td {
  padding-top: 1rem;
  border-top: 1px dashed rgba(246, 239, 226, 0.3);
  vertical-align: baseline;
}

.hentry .entry-content .bb-receipt tr.order-total td {
  font-size: 1.6rem;
}

.bb-receipt tr.order-total small.includes_tax {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(246, 239, 226, 0.7);
}

.woocommerce-cart .bb-receipt .wc-proceed-to-checkout {
  margin: 1.2rem 0 0;
  padding: 0;
}

.woocommerce-cart .bb-receipt .checkout-button.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 1rem;
  border-radius: 999px;
  background: var(--receipt-ink);
  font-size: 1rem;
  font-weight: 600;
  color: var(--bordeaux) !important;
  text-decoration: none !important;
}

.woocommerce-cart .bb-receipt .checkout-button.button:hover {
  background: #fff;
}

.woocommerce-cart .bb-receipt .checkout-button.bb-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.woocommerce-cart .bb-receipt .checkout-button.bb-disabled:hover {
  background: var(--receipt-ink);
}

.bb-receipt .bb-cart-min {
  color: var(--receipt-ink);
}

/* carrello vuoto: messaggio e tipologie */
.woocommerce-cart .bb-cart-empty {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
}

.woocommerce-cart .bb-cart-empty::before {
  content: none;
}

.hentry .entry-content .bb-cart-empty-title {
  margin: 0 0 0.4rem;
  font-family: var(--display, 'Garamond N', Georgia, serif);
  font-size: 1.8rem;
  font-weight: 400;
}

.bb-cart-empty-sub {
  margin: 0 0 1.8rem;
  color: var(--ink-soft);
}

.woocommerce-cart .bb-cart-empty .bb-types-grid {
  text-align: left;
}

/* tipologie dentro una pagina (carrello vuoto): niente sottolineature dei link di Storefront */
.hentry .entry-content .bb-types-grid a,
.hentry .entry-content .bb-types-grid a:hover {
  color: var(--ink);
  text-decoration: none;
}

.hentry .entry-content .bb-receipt table.bb-receipt-table tr.cart-subtotal th {
  white-space: nowrap;
}

/* nel carrello vuoto la griglia resta nella larghezza della pagina (in home si allarga oltre) */
.woocommerce-cart .bb-cart-empty .bb-types-grid {
  width: auto;
  margin-left: 0;
}

/* ==========================================================================
   Il mio account: card color sabbia senza bordo, campi bianchi, menu bordeaux
   (le card bianche sul crema staccavano troppo)
   ========================================================================== */
.woocommerce-account {
  --acc-sand: #ece6d8;
  --bordeaux: #5a1019;
  --cream: #f6efe2;
}

.woocommerce-account .bb-acc-card,
.woocommerce-account .bb-order,
.woocommerce-view-order .woocommerce-order-details,
.woocommerce-view-order .woocommerce-customer-details .woocommerce-column,
.woocommerce-view-order .woocommerce-customer-details > address,
.woocommerce-view-order .woocommerce-customer-details:not(:has(.woocommerce-columns)) {
  background: var(--acc-sand);
  border: 0;
}

.woocommerce-account .bb-paycard.is-default {
  box-shadow: inset 0 0 0 1px rgba(31, 102, 52, 0.35);
}

.bb-acc-form input.input-text,
.bb-acc-form select,
.bb-acc-form textarea,
.bb-acc-form .select2-container .select2-selection--single {
  background: #fff;
}

.bb-order-thumb {
  background: rgba(255, 255, 255, 0.6);
}

.woocommerce-account .bb-order,
.woocommerce-account .bb-order * {
  border-color: rgba(21, 21, 21, 0.1);
}

.woocommerce-account .woocommerce .button.bb-btn-soft {
  background: #fff;
  color: var(--wine);
}

/* menu bordeaux */
.woocommerce-account .bb-acc-nav {
  background: var(--bordeaux);
  border: 0;
  color: var(--cream);
}

.woocommerce-account .bb-acc-who {
  border-bottom-color: rgba(246, 239, 226, 0.16);
}

.woocommerce-account .bb-acc-avatar {
  background: var(--cream);
  color: var(--bordeaux);
}

.woocommerce-account .bb-acc-hello {
  color: var(--cream);
}

.woocommerce-account .bb-acc-mail {
  color: rgba(246, 239, 226, 0.7);
}

.hentry .entry-content .bb-acc-nav ul li a,
.woocommerce-account .bb-acc-nav ul li.woocommerce-MyAccount-navigation-link--customer-logout a {
  color: var(--cream);
}

.hentry .entry-content .bb-acc-nav ul li a:hover {
  background: rgba(246, 239, 226, 0.1);
  color: var(--cream);
}

.hentry .entry-content .bb-acc-nav ul li.is-active a,
.hentry .entry-content .bb-acc-nav ul li.is-active a:hover {
  background: var(--cream);
  color: var(--bordeaux);
}

.woocommerce-account .bb-acc-nav ul li.woocommerce-MyAccount-navigation-link--customer-logout {
  border-top-color: rgba(246, 239, 226, 0.16);
}

.woocommerce-account .bb-acc-nav ul li.woocommerce-MyAccount-navigation-link--customer-logout a {
  color: rgba(246, 239, 226, 0.75);
}

@media (max-width: 899px) {
  .hentry .entry-content .bb-acc-nav ul li a {
    background: rgba(246, 239, 226, 0.1);
  }
}

/* ==========================================================================
   Avvisi WooCommerce come le card (sabbia, radius 18, pulsante a pillola): il bianco
   con filo nero stonava sul crema. Errori rosati.
   ========================================================================== */
body .woocommerce-message,
body .woocommerce-info,
body .woocommerce-noreviews,
body p.no-comments,
body .wc-block-components-notice-banner {
  background: #ece6d8;
  border: 0;
  border-radius: 18px;
  padding: 1.05rem 1.25rem 1.05rem 3.1rem;
}

body .woocommerce-error,
body .wc-block-components-notice-banner.is-error {
  background: #f6dcdc;
  border: 0;
  border-radius: 18px;
}

body .woocommerce-message::before,
body .woocommerce-info::before,
body .woocommerce-noreviews::before,
body p.no-comments::before {
  color: var(--wine-dark);
  left: 1.2rem;
}

body .woocommerce-message .button,
body .woocommerce-info .button,
body .woocommerce-error .button {
  padding: 0.6rem 1.15rem;
  background: #fff;
  color: var(--wine);
  border: 0 !important;
  border-radius: 999px;
}

body .woocommerce-message .button:hover,
body .woocommerce-info .button:hover,
body .woocommerce-error .button:hover {
  background: var(--wine);
  color: #fff;
}

/* ==========================================================================
   Contorno di focus: Storefront mette un bordo viola (colore WooCommerce) a ogni
   clic. Via col mouse; con la tastiera resta, rosso vino (crema sul menu bordeaux).
   ========================================================================== */
body a:focus:not(:focus-visible),
body button:focus:not(:focus-visible),
body input:focus:not(:focus-visible),
body textarea:focus:not(:focus-visible),
body select:focus:not(:focus-visible) {
  outline: none;
}

body a:focus-visible,
body button:focus-visible,
body .button:focus-visible,
body input[type="checkbox"]:focus-visible,
body input[type="radio"]:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}

body .bb-acc-nav a:focus-visible {
  outline-color: #f6efe2;
}

/* ==========================================================================
   Accesso / registrazione / password dimenticata "a scontrino", come il riepilogo
   del carrello: card bordeaux con bordo dentellato, testi crema, campi bianchi,
   pulsante crema. I dentini sono disegnati con una maschera sugli ultimi 8px,
   perché la card ha overflow:hidden (altezza animata da js/account.js).
   ========================================================================== */
.bb-auth-card,
.woocommerce-account .woocommerce-ResetPassword {
  --bordeaux: #5a1019;
  --cream: #f6efe2;
  background: var(--bordeaux);
  color: var(--cream);
  border: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: none;
  padding-bottom: calc(1.75rem + 8px);
  -webkit-mask:
    linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat,
    radial-gradient(circle at 8px 0, #000 7.5px, transparent 8px) bottom left / 16px 8px repeat-x;
  mask:
    linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat,
    radial-gradient(circle at 8px 0, #000 7.5px, transparent 8px) bottom left / 16px 8px repeat-x;
}

@media (min-width: 480px) {
  .bb-auth-card,
  .woocommerce-account .woocommerce-ResetPassword {
    padding-bottom: calc(2rem + 8px);
  }
}

.hentry .entry-content .bb-auth-title,
.bb-auth-title {
  color: var(--cream);
}

.bb-auth-sub,
.woocommerce-ResetPassword > p:first-child {
  color: rgba(246, 239, 226, 0.72);
}

.bb-auth label,
.woocommerce-ResetPassword label {
  color: var(--cream);
}

.bb-auth .required {
  color: #f3a7ae;
}

.bb-auth input.input-text,
.woocommerce-ResetPassword input.input-text {
  background: #fff;
  border-color: transparent;
  border-radius: 12px;
}

.bb-auth input.input-text:focus,
.woocommerce-ResetPassword input.input-text:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(246, 239, 226, 0.45);
}

/* compilazione automatica del browser: niente azzurro */
.bb-auth input.input-text:-webkit-autofill,
.woocommerce-ResetPassword input.input-text:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px #fff inset;
  -webkit-text-fill-color: var(--ink);
}

.bb-auth .is-invalid input.input-text {
  box-shadow: 0 0 0 3px rgba(243, 167, 174, 0.7);
}

.bb-auth-remember label {
  color: rgba(246, 239, 226, 0.8);
}

.bb-auth-remember input {
  accent-color: var(--cream);
}

.woocommerce-account .bb-auth .bb-auth-submit.button,
.woocommerce-account .woocommerce-ResetPassword .button {
  border-radius: 999px;
  background: var(--cream);
  color: var(--bordeaux);
}

.woocommerce-account .bb-auth .bb-auth-submit.button:hover,
.woocommerce-account .woocommerce-ResetPassword .button:hover,
.bb-auth-submit.is-busy {
  background: #fff;
  color: var(--bordeaux);
}

.bb-auth-submit.is-busy::before {
  border-color: rgba(90, 16, 25, 0.25);
  border-top-color: var(--bordeaux);
}

.bb-auth .bb-auth-submit:focus-visible {
  outline-color: var(--cream);
}

.woocommerce .bb-auth-lost a,
.woocommerce .bb-auth-switch a,
.woocommerce-account .woocommerce-ResetPassword + .bb-auth-switch a {
  color: var(--cream);
}

.bb-auth-switch {
  border-top-color: rgba(246, 239, 226, 0.16);
  color: rgba(246, 239, 226, 0.72);
}

/* "Password dimenticata": il link per tornare sta fuori dalla card, sul crema */
.woocommerce .woocommerce-ResetPassword + .bb-auth-switch {
  color: var(--ink-soft);
}

.woocommerce .woocommerce-ResetPassword + .bb-auth-switch a {
  color: var(--wine);
}

.bb-auth-steps {
  background: rgba(246, 239, 226, 0.08);
  color: rgba(246, 239, 226, 0.75);
  border-radius: 12px;
}

.bb-auth-steps li[data-state="ok"] {
  color: var(--cream);
}

.bb-auth .bb-step-ico {
  border-color: rgba(246, 239, 226, 0.3);
}

.bb-auth li[data-state="run"] .bb-step-ico {
  border-color: rgba(246, 239, 226, 0.2);
  border-top-color: var(--cream);
}

.bb-auth-error {
  border: 0;
  border-radius: 12px;
  background: #f6dcdc;
}

/* accesso riuscito: cerchio e spunta crema */
.bb-auth .bb-done-halo {
  fill: var(--cream);
}

.bb-auth .bb-done-ring,
.bb-auth .bb-done-check {
  stroke: var(--cream);
}

.hentry .entry-content .bb-auth .bb-done-title {
  color: var(--cream);
}

.bb-auth .bb-done-sub {
  color: rgba(246, 239, 226, 0.72);
}

/* regole della password nella registrazione / nuova password */
.bb-auth .bb-pw-meter i,
.woocommerce-ResetPassword .bb-pw-meter i {
  background: rgba(246, 239, 226, 0.2);
}

.bb-auth .bb-pw-rules,
.woocommerce-ResetPassword .bb-pw-rules {
  color: rgba(246, 239, 226, 0.72);
}

.bb-auth .bb-pw-ico,
.woocommerce-ResetPassword .bb-pw-ico {
  border-color: rgba(246, 239, 226, 0.35);
}

.bb-auth .bb-pw-rules li[data-state="ok"],
.woocommerce-ResetPassword .bb-pw-rules li[data-state="ok"] {
  color: #a8dcb6;
}

.bb-auth .bb-pw-rules li[data-state="ko"],
.bb-auth .bb-pw.is-error .bb-pw-rules li[data-state="ko"],
.woocommerce-ResetPassword .bb-pw-rules li[data-state="ko"] {
  color: #f3a7ae;
}

.bb-auth .woocommerce-privacy-policy-text,
.bb-auth .woocommerce-privacy-policy-text p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(246, 239, 226, 0.72);
}

.hentry .entry-content .bb-auth .woocommerce-privacy-policy-text a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.woocommerce-ResetPassword .required,
.hentry .entry-content .woocommerce-ResetPassword .required {
  color: #f3a7ae;
}

/* "Procedi al pagamento" che si sblocca al minimo d'ordine: rimbalzo e riflesso */
.woocommerce-cart .bb-receipt .checkout-button.bb-unlock {
  position: relative;
  overflow: hidden;
  animation: bb-unlock-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.woocommerce-cart .bb-receipt .checkout-button.bb-unlock::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  transform: skewX(-20deg);
  animation: bb-unlock-shine 1s ease-out 0.25s forwards;
}

@keyframes bb-unlock-pop {
  0% { transform: scale(0.94); opacity: 0.45; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bb-unlock-shine {
  to { left: 120%; }
}

@media (prefers-reduced-motion: reduce) {
  .bb-goal-step.is-new,
  .bb-goal-step.is-new::before,
  .bb-goal.is-hit,
  .woocommerce-cart .bb-receipt .checkout-button.bb-unlock,
  .woocommerce-cart .bb-receipt .checkout-button.bb-unlock::after {
    animation: none;
  }
}

.woocommerce-cart .bb-receipt .checkout-button.bb-wait {
  opacity: 0.45;
}

/* cambio quantità in corso: la riga che sta per sparire e il riepilogo in attesa del server */
.bb-ci.is-leaving {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.bb-receipt.is-syncing .order-total td,
.bb-receipt.is-syncing .cart-subtotal td {
  opacity: 0.45;
  transition: opacity 0.15s ease;
}

/* Scheda prodotto: aggiunta al carrello senza ricaricare. Durante l'invio il pulsante si attenua,
   dopo compare accanto un cerchio verde con la spunta */
.single-product form.cart.is-loading .single_add_to_cart_button {
  opacity: 0.6;
  cursor: progress;
}

.single-product form.cart .bb-atc-ok {
  display: none;
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #2f8a4f;
}

.single-product form.cart .bb-atc-ok::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0.7rem;
  height: 1.25rem;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
}

.single-product form.cart.is-added .bb-atc-ok {
  display: block;
  animation: bb-atc-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.single-product form.cart.is-added .bb-atc-ok::after {
  animation: bb-atc-check 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
}

@keyframes bb-atc-pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

@keyframes bb-atc-check {
  to { transform: translate(-50%, -50%) rotate(45deg) scale(1); }
}

.single-product form.cart .bb-atc-err {
  width: 100%;
  margin: 0;
  font-size: 0.9rem;
  color: var(--wine-dark);
}

@media (max-width: 767px) {
  .single-product form.cart .single_add_to_cart_button {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* contatore del carrello in testata: piccolo salto quando arriva un prodotto */
.bb-cart-count.bb-bump {
  animation: bb-count-bump 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bb-count-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .single-product form.cart.is-added .bb-atc-ok,
  .bb-cart-count.bb-bump {
    animation: none;
  }

  .single-product form.cart.is-added .bb-atc-ok::after {
    animation: none;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
}

/* riepilogo: riga dello sconto quantità sotto il prezzo pieno dei prodotti */
.hentry .entry-content .bb-receipt table.bb-receipt-table tr.bb-receipt-saving th,
.hentry .entry-content .bb-receipt table.bb-receipt-table tr.bb-receipt-saving td {
  color: #a8dcb6;
}

/* Barra del carrello in verde (scelta V5): strisce che scorrono mentre si riempie, tappe verdi,
   e a ogni traguardo la card si colora di verde col messaggio grande e i coriandoli */
.bb-goal {
  position: relative;
  overflow: hidden;
}

.bb-goal-text b {
  color: #1f6b3a;
}

.bb-goal-bar i {
  background: repeating-linear-gradient(-45deg, #2f8a4f 0 10px, #3c9c5d 10px 20px);
  background-size: 28px 28px;
}

.bb-goal-bar i.is-running {
  animation: bb-goal-stripes 0.6s linear infinite;
}

@keyframes bb-goal-stripes {
  to { background-position: 28px 0; }
}

.bb-goal-step.is-on {
  background: #2f8a4f;
  box-shadow: inset 0 0 0 2px #2f8a4f;
}

.bb-goal-marks span.is-on,
.bb-goal-marks span.is-on b {
  color: #1f6b3a;
}

.bb-goal-party {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0 1rem;
  border-radius: 18px;
  background: #2f8a4f;
  color: #fff;
  font-family: var(--font-display, "Garamond N", Georgia, serif);
  font-size: 1.6rem;
  line-height: 1.1;
  text-align: center;
  pointer-events: none;
}

.bb-goal-party small {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-body, "Work Sans", system-ui, sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.85;
}

.bb-goal-party-ck {
  position: relative;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: #fff;
}

.bb-goal-party-ck::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 0.55rem;
  height: 1rem;
  border: solid #2f8a4f;
  border-width: 0 3px 3px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.bb-goal-confetti {
  position: absolute;
  top: -10px;
  z-index: 5;
  border-radius: 1px;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .bb-goal-bar i.is-running {
    animation: none;
  }
}

/* ==========================================================================
   Pagamento (checkout a blocchi) nello stile del carrello: sezioni in card sabbia,
   campi bianchi arrotondati, riepilogo a scontrino bordeaux, "Effettua ordine" a pillola
   ========================================================================== */
.wc-block-checkout .wc-block-components-checkout-step {
  margin: 0 0 1rem;
  padding: 1.2rem 1.1rem 1.4rem;
  border-radius: 18px;
  background: #ece6d8;
}

@media (min-width: 768px) {
  .wc-block-checkout .wc-block-components-checkout-step {
    padding: 1.5rem 1.75rem 1.75rem;
  }
}

.wc-block-checkout .wc-block-components-checkout-step__heading {
  margin-top: 0;
}

.wc-block-checkout .wc-block-components-checkout-step__container,
.wc-block-checkout .wc-block-components-checkout-step__content {
  padding-bottom: 0;
}

/* campi */
body .wc-block-checkout .wc-block-components-text-input input,
body .wc-block-checkout .wc-block-components-textarea,
body .wc-block-checkout .wc-blocks-components-select .wc-blocks-components-select__select,
body .wc-block-components-totals-coupon .wc-block-components-text-input input {
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

body .wc-block-checkout .wc-blocks-components-select .wc-blocks-components-select__container {
  border-radius: 12px;
  background: #fff;
}

body .wc-block-checkout .wc-block-components-text-input input:focus,
body .wc-block-checkout .wc-block-components-textarea:focus,
body .wc-block-checkout .wc-blocks-components-select .wc-blocks-components-select__select:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(217, 17, 34, 0.15);
  outline: none;
}

body .wc-block-checkout .wc-block-components-text-input.has-error input,
body .wc-block-checkout .wc-blocks-components-select.has-error .wc-blocks-components-select__select {
  border-color: var(--wine);
}

/* caselle di spunta e opzione di spedizione */
body .wc-block-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
  border: 1px solid rgba(21, 21, 21, 0.25);
  border-radius: 6px;
  background: #fff;
}

body .wc-block-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
  border-color: var(--wine);
  background: var(--wine);
}

body .wc-block-checkout .wc-block-components-checkbox .wc-block-components-checkbox__mark {
  fill: #fff;
}

body .wc-block-checkout .wc-block-components-radio-control__option,
body .wc-block-checkout .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option {
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

body .wc-block-checkout .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option-checked,
body .wc-block-checkout .wc-block-components-radio-control__option-checked {
  box-shadow: inset 0 0 0 2px var(--wine);
}

body .wc-block-checkout .wc-block-components-radio-control--highlight-checked::after {
  display: none;
}

body .wc-block-checkout .wc-block-components-radio-control__input:checked {
  border-color: var(--wine);
}

body .wc-block-checkout .wc-block-components-radio-control__input:checked::before {
  background: var(--wine);
}

/* condizioni e pulsante finale */
body .wc-block-checkout .wc-block-checkout__terms {
  margin: 0.5rem 0 1rem;
  padding-top: 0;
  border-top: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

body .wc-block-checkout .wc-block-checkout__terms--with-separator::before {
  display: none;
}

body .wc-block-checkout .wc-block-components-checkout-place-order-button {
  width: 100%;
  min-height: 3.4rem;
  border-radius: 999px;
  font-size: 1rem;
}

/* riepilogo a scontrino bordeaux (stesso del carrello) */
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block {
  --receipt-ink: #f6efe2;
  padding: 0.4rem 1.2rem calc(1.2rem + 8px);
  border: 0;
  border-radius: 18px 18px 0 0;
  background: #5a1019;
  color: var(--receipt-ink);
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat,
    radial-gradient(circle at 8px 0, #000 7.5px, transparent 8px) bottom left / 16px 8px repeat-x;
  mask: linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat,
    radial-gradient(circle at 8px 0, #000 7.5px, transparent 8px) bottom left / 16px 8px repeat-x;
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block * {
  color: inherit;
}

body .wc-block-checkout .wc-block-components-checkout-order-summary__title {
  margin: 0;
  padding: 1rem 0 0.6rem;
  border: 0;
}

body .wc-block-checkout .wc-block-components-checkout-order-summary__title-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper,
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary,
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-panel {
  border-color: rgba(246, 239, 226, 0.25);
  border-style: dashed;
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper:empty {
  display: none;
}

body .wc-block-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item__quantity {
  border: 0;
  background: var(--receipt-ink);
  box-shadow: none;
  color: #5a1019;
}

body .wc-block-checkout .wc-block-components-order-summary .wc-block-components-product-metadata__description {
  display: none;
}

body .wc-block-checkout .wc-block-components-order-summary .wc-block-components-product-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

body .wc-block-checkout .wc-block-components-order-summary-item__image {
  border-radius: 10px;
  background: rgba(246, 239, 226, 0.12);
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block a,
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-panel__button {
  color: var(--receipt-ink);
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-coupon .wc-block-components-text-input input {
  color: var(--ink);
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-coupon .wc-block-components-text-input label {
  color: var(--ink-soft);
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-coupon__button {
  border-radius: 999px;
  background: var(--receipt-ink);
  color: #5a1019;
}

body .wc-block-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  font-size: 1rem;
  font-weight: 400;
}

body .wc-block-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-size: 1.6rem;
  font-weight: 600;
}

/* desktop: riepilogo affiancato e fermo mentre si compila */
@media (min-width: 900px) {
  body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block {
    padding: 0.6rem 1.5rem calc(1.5rem + 8px);
  }
}

/* WooCommerce mette un bordo scuro ai campi con un selettore più specifico */
body .wc-block-checkout .wc-block-components-text-input input,
body .wc-block-checkout .wc-block-components-textarea {
  border: 1px solid rgba(21, 21, 21, 0.12) !important;
  border-radius: 12px !important;
  background: #fff !important;
}

body .wc-block-checkout .wc-block-components-text-input input:focus,
body .wc-block-checkout .wc-block-components-textarea:focus {
  border-color: var(--wine) !important;
}

body .wc-block-checkout .wc-block-components-text-input.has-error input {
  border-color: var(--wine) !important;
}

/* scontrino: niente cornici interne, solo un tratteggio prima di codici, conti e totale */
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .checkout-order-summary-block-fill,
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper,
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary,
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-panel,
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wp-block-woocommerce-checkout-order-summary-totals-block {
  border: 0 !important;
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .checkout-order-summary-block-fill {
  padding: 0;
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper {
  padding-left: 0;
  padding-right: 0;
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary {
  padding: 0.4rem 0 0.8rem;
}

body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wp-block-woocommerce-checkout-order-summary-coupon-form-block,
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wp-block-woocommerce-checkout-order-summary-totals-block,
body .wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper:has(.wc-block-components-totals-footer-item) {
  border-top: 1px dashed rgba(246, 239, 226, 0.35) !important;
}

/* la pagina di pagamento resta larga come il resto del sito (Storefront allarga gli alignwide)
   e il riepilogo fisso si ferma sotto la testata */
body .entry-content > .wp-block-woocommerce-checkout.alignwide {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (min-width: 768px) {
  body .wc-block-checkout .wc-block-checkout__sidebar.is-sticky {
    top: calc(var(--market-h, 30px) + 96px);
  }
}

/* Fascia "Spedisci in" più leggibile: bordeaux come lo scontrino, testo chiaro */
.bb-market-bar {
  background: #5a1019;
  border-bottom: 0;
  color: rgba(246, 244, 238, 0.82);
  font-size: 0.82rem;
}

.bb-market select {
  color: #fff;
  border-bottom: 0;
}

.bb-market select option {
  color: var(--ink);
  background: #fff;
}

.bb-market select:focus-visible {
  outline-color: var(--cream);
}

/* prodotto esaurito: etichetta compatta al posto del bottone, non copre il prezzo */
ul.products li.product.outofstock .button {
  padding: 0.35rem 0.6rem;
  background: transparent;
  color: var(--ink);
  opacity: 0.6;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Recedi dal contratto qui (footer): ben visibile */
.bb-recesso { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
