/* ================================================================
   20BLACK v3 — DESIGN SYSTEM OVERRIDES
   Header mobile-first · Product cards · Animazioni cinematiche
   ================================================================ */

/* ─── CUSTOM PROPERTIES v3 ───────────────────────────────────── */
:root {
  --header-h:          72px;
  --header-scroll-bg:  rgba(10,10,10,0.88);
  --header-scroll-border: rgba(255,255,255,0.06);
  --logo-width:        140px;
  --mm-dur:            0.65s;
  --mm-ease:           cubic-bezier(0.76, 0, 0.24, 1);
  --card-radius:       0px;
  --ease-spring:       cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-expo:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-circ:         cubic-bezier(0.85, 0, 0.15, 1);
  --grain-opacity:     0.035;
}

/* grain texture: removed */

/* ─── LOADER v3 ──────────────────────────────────────────────── */
.site-loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--color-black, #0a0a0a);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s var(--ease-expo), visibility 0.8s;
}
.site-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.loader-logo { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; letter-spacing: 0.3em; color: #f8f6f2; }
.loader-logo span { color: #c8a96e; }
.loader-logo-img { width: var(--logo-width); height: auto; object-fit: contain; }
.loader-line { width: 200px; height: 1px; background: rgba(255,255,255,0.1); overflow: hidden; }
.loader-bar {
  height: 100%; width: 0%;
  background: var(--color-accent, #c8a96e);
  animation: loaderFill 1.6s var(--ease-expo) forwards;
}
@keyframes loaderFill { to { width: 100%; } }

/* ─── HEADER v3 — COMPLETE REWRITE ──────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  transition:
    background 0.5s var(--ease-expo),
    border-color 0.5s var(--ease-expo),
    height 0.4s var(--ease-expo),
    backdrop-filter 0.5s ease;
  background: transparent;
  border-bottom: 1px solid transparent;
}

.site-header.is-solid,
.site-header.scrolled {
  background: var(--header-scroll-bg);
  border-bottom-color: var(--header-scroll-border);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

/* Scrolled = leggermente più basso */
.site-header.is-solid { height: 64px; }

.header-wrap {
  max-width: 1440px; margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ── Logo ── */
.site-logo {
  grid-column: 1;
  display: flex; align-items: center;
  text-decoration: none;
}

.logo-img { 
  width: var(--logo-width);
  height: 36px;
  object-fit: contain;
  object-position: left center;
  display: block;
  transition: opacity 0.3s ease;
}
.logo-img--dark { display: none; }

.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-white, #f8f6f2);
  transition: color 0.3s;
}
.logo-20 { color: var(--color-accent, #c8a96e); }
.logo-black { color: var(--color-white, #f8f6f2); }

/* ── Primary Nav ── */
.primary-nav {
  grid-column: 2;
  display: flex; align-items: center;
}

.primary-nav .nav-list {
  display: flex; gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none; margin: 0; padding: 0;
}

.primary-nav .menu-item > a {
  position: relative;
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(248,246,242,0.85);
  text-decoration: none;
  padding: 0.25rem 0;
  display: block;
  overflow: hidden;
  transition: color 0.3s;
}

/* Double-line hover: text slides up, underline rises */
.primary-nav .menu-item > a .nav-link-inner {
  display: block;
  transition: transform 0.4s var(--ease-expo);
}
.primary-nav .menu-item > a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--color-accent, #c8a96e);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-expo);
}
.primary-nav .menu-item > a:hover .nav-link-inner { transform: translateY(-2px); }
.primary-nav .menu-item > a:hover::after { transform: scaleX(1); transform-origin: left; }
.primary-nav .menu-item > a:hover { color: #f8f6f2; }

/* ── Header Actions ── */
.header-actions {
  grid-column: 3;
  display: flex; align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  justify-content: flex-end;
}

.hdr-btn {
  background: none; border: none; padding: 0;
  color: rgba(248,246,242,0.85);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  position: relative;
  transition: color 0.25s, transform 0.25s var(--ease-spring);
}
.hdr-btn:hover { color: #f8f6f2; transform: scale(1.1); }
.hdr-btn svg { display: block; flex-shrink: 0; }
.hdr-btn:focus-visible {
  outline: 1px solid var(--color-accent, #c8a96e);
  outline-offset: 4px;
}

/* Cart bubble */
.cart-bubble {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-accent, #c8a96e);
  color: #0a0a0a;
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  animation: bubblePop 0.4s var(--ease-spring);
}
@keyframes bubblePop { from { transform: scale(0); } to { transform: scale(1); } }

/* Hamburger v3 — 2 lines morphing */
.hamburger {
  flex-direction: column; gap: 7px;
  overflow: visible;
}

.hbg-line {
  display: block;
  width: 22px; height: 1px;
  background: rgba(248,246,242,0.85);
  border-radius: 1px;
  transform-origin: center;
  transition: transform 0.45s var(--ease-expo), opacity 0.3s, width 0.3s;
}
.hbg-line:last-child { width: 14px; }

/* Open state — X morph */
.hamburger.is-open .hbg-line:first-child {
  transform: translateY(4px) rotate(45deg);
  width: 22px;
}
.hamburger.is-open .hbg-line:last-child {
  transform: translateY(-4px) rotate(-45deg);
  width: 22px;
}

/* ─── SEARCH OVERLAY v3 ──────────────────────────────────────── */
.search-overlay {
  position: fixed; inset: 0; z-index: 2000;
  pointer-events: none;
}

.search-overlay-bg {
  position: absolute; inset: 0;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.4s var(--ease-expo);
}

.search-inner {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem;
}

.search-field-wrap {
  width: 100%; max-width: 680px;
  position: relative;
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.5s var(--ease-expo), opacity 0.5s;
  transition-delay: 0.1s;
}

.search-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.35em; text-transform: uppercase;
  color: rgba(248,246,242,0.35);
  margin-bottom: 1.25rem;
}

.search-input {
  width: 100%;
  background: transparent; border: none;
  border-bottom: 1px solid rgba(248,246,242,0.2);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #f8f6f2;
  padding: 0.5rem 0 1rem;
  outline: none; caret-color: var(--color-accent, #c8a96e);
  transition: border-color 0.3s;
}
.search-input::placeholder { color: rgba(248,246,242,0.2); }
.search-input:focus { border-bottom-color: var(--color-accent, #c8a96e); }

.search-results {
  width: 100%; max-width: 680px;
  margin-top: 2rem;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.4s, transform 0.4s;
}
.search-result-item {
  display: grid; grid-template-columns: 52px 1fr auto;
  align-items: center; gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none; color: #f8f6f2;
  transition: padding-left 0.3s var(--ease-expo);
}
.search-result-item:hover { padding-left: 0.5rem; }
.search-result-img { width: 52px; height: 65px; object-fit: cover; }
.search-result-name { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; }
.search-result-price { font-family: 'DM Mono', monospace; font-size: 0.78rem; color: var(--color-accent, #c8a96e); }

.search-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none; cursor: pointer;
  color: rgba(248,246,242,0.5); padding: 0.5rem;
  transition: color 0.2s, transform 0.3s var(--ease-spring);
}
.search-close:hover { color: #f8f6f2; transform: rotate(90deg); }

/* Open state */
.search-overlay.is-open { pointer-events: all; }
.search-overlay.is-open .search-overlay-bg { opacity: 1; }
.search-overlay.is-open .search-field-wrap { opacity: 1; transform: translateY(0); }
.search-overlay.is-open .search-results { opacity: 1; transform: translateY(0); }

/* ─── MOBILE MENU v3 — FULLSCREEN CINEMATIC ─────────────────── */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1500;
  pointer-events: none; overflow: hidden;
  --ease-m: cubic-bezier(0.76, 0, 0.24, 1);
}

/* Two sliding panels for reveal effect */
.mm-panel {
  position: absolute; inset: 0;
  transform: translateX(100%);
  will-change: transform;
}
.mm-panel--1 {
  background: #1a1a1a;
  transition: transform var(--mm-dur) var(--mm-ease);
}
.mm-panel--2 {
  background: var(--color-black, #0a0a0a);
  transition: transform var(--mm-dur) var(--mm-ease);
  transition-delay: 0.06s;
}

.mobile-menu.is-open .mm-panel--1,
.mobile-menu.is-open .mm-panel--2 { transform: translateX(0); }

.mm-inner {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column;
  padding: clamp(5rem,12vh,7rem) clamp(2rem,8vw,5rem) clamp(2rem,5vh,3rem);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s, transform 0.4s;
  transition-delay: 0.3s;
}
.mobile-menu.is-open .mm-inner { opacity: 1; transform: translateY(0); pointer-events: all; }

.mobile-menu.is-open { pointer-events: all; }

/* Logo nel menu */
.mm-logo { margin-bottom: clamp(2rem, 6vh, 4rem); }

/* Nav list */
.mm-list { list-style: none; margin: 0; padding: 0; }

.mm-item {
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mm-link {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: rgba(248,246,242,0.9);
  text-decoration: none;
  padding: 0.3em 0;
  line-height: 1.1;
  transition: color 0.25s, padding-left 0.4s var(--ease-expo);
  position: relative;
}
.mm-link::before {
  content: attr(data-num);
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em;
  color: var(--color-accent, #c8a96e);
  opacity: 0;
  transition: opacity 0.3s;
}
.mm-link:hover { color: #fff; padding-left: 1.5rem; }
.mm-link:hover::before { opacity: 1; }

/* Stagger animation for each item */
.mm-item { transform: translateY(30px); opacity: 0; transition: transform 0.5s var(--ease-expo), opacity 0.5s; }
.mobile-menu.is-open .mm-item:nth-child(1) { transform: translateY(0); opacity: 1; transition-delay: 0.35s; }
.mobile-menu.is-open .mm-item:nth-child(2) { transform: translateY(0); opacity: 1; transition-delay: 0.42s; }
.mobile-menu.is-open .mm-item:nth-child(3) { transform: translateY(0); opacity: 1; transition-delay: 0.49s; }
.mobile-menu.is-open .mm-item:nth-child(4) { transform: translateY(0); opacity: 1; transition-delay: 0.56s; }
.mobile-menu.is-open .mm-item:nth-child(5) { transform: translateY(0); opacity: 1; transition-delay: 0.63s; }
.mobile-menu.is-open .mm-item:nth-child(6) { transform: translateY(0); opacity: 1; transition-delay: 0.70s; }

/* Footer del menu */
.mm-footer {
  margin-top: auto;
  display: flex; align-items: center;
  gap: 2rem; flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  opacity: 0; transform: translateY(15px);
  transition: opacity 0.4s, transform 0.4s;
  transition-delay: 0.7s;
}
.mobile-menu.is-open .mm-footer { opacity: 1; transform: translateY(0); }

.mm-social { display: flex; gap: 1.25rem; align-items: center; }
.mm-social-link {
  color: rgba(248,246,242,0.5);
  transition: color 0.25s, transform 0.3s var(--ease-spring);
}
.mm-social-link:hover { color: var(--color-accent, #c8a96e); transform: translateY(-3px); }

.mm-cart-link {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(248,246,242,0.5); text-decoration: none;
  transition: color 0.25s;
  margin-left: auto;
}
.mm-cart-link:hover { color: #f8f6f2; }

/* Close button */
.mm-close {
  position: absolute; top: 1.5rem; right: 1.5rem; z-index: 3;
  background: none; border: none; cursor: pointer;
  color: rgba(248,246,242,0.4); padding: 0.5rem;
  transition: color 0.25s, transform 0.4s var(--ease-spring);
  opacity: 0; pointer-events: none;
  transition-delay: 0s;
}
.mobile-menu.is-open .mm-close {
  opacity: 1; pointer-events: all; transition-delay: 0.5s;
}
.mm-close:hover { color: #f8f6f2; transform: rotate(90deg) scale(1.1); }

/* ─── PRODUCT CARDS v3 — EDITORIAL COMPACT ──────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0; /* ZERO gap — bordi si toccano */
}

.product-card {
  position: relative;
  background: #0f0f0f;
  overflow: hidden;
  cursor: none;
  outline: 1px solid rgba(255,255,255,0.03);
  transition: outline-color 0.3s;
}
.product-card:hover { outline-color: rgba(200,169,110,0.2); z-index: 1; }

/* Media */
.product-card-media {
  position: relative;
  aspect-ratio: 2/3;  /* più verticale = costume da bagno */
  overflow: hidden;
  background: #0d0d0d;
}

.product-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.6s ease;
  filter: brightness(0.92) saturate(0.95);
}

.product-card-img-hover {
  position: absolute; inset: 0;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Scale + reveal hover */
.product-card:hover .product-card-img {
  transform: scale(1.06);
  filter: brightness(0.75) saturate(0.85);
}
.product-card:hover .product-card-img-hover { opacity: 1; }

/* Gradient overlay — always subtle, stronger on hover */
.product-card-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(10,10,10,0.8) 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}
.product-card:hover .product-card-media::after { opacity: 1; }

/* Badges */
.product-card-badges {
  position: absolute; top: 0.75rem; left: 0.75rem;
  z-index: 3; display: flex; flex-direction: column; gap: 0.3rem;
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.5rem; letter-spacing: 0.18em; text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.badge-new  { background: var(--color-accent,#c8a96e); color: #0a0a0a; }
.badge-sale { background: rgba(255,255,255,0.9); color: #0a0a0a; }
.badge-sold-out { background: rgba(10,10,10,0.7); color: rgba(255,255,255,0.5); }

/* Wishlist btn on card */
.product-card .wishlist-btn {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 3;
  background: none; border: none; padding: 0.35rem;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transform: scale(0); opacity: 0;
  transition: color 0.25s, transform 0.4s var(--ease-spring), opacity 0.3s;
}
.product-card:hover .wishlist-btn { transform: scale(1); opacity: 1; }
.product-card .wishlist-btn.is-active { color: var(--color-accent,#c8a96e); }
.product-card .wishlist-btn:hover { transform: scale(1.2); }

/* Info area — ultra-compact */
.product-card-info {
  padding: 0.85rem 1rem 1.1rem;
  background: var(--color-black,#0a0a0a);
  position: relative;
}

/* Gold left-border reveal on hover */
.product-card-info::before {
  content: '';
  position: absolute; left: 0; top: 0.5rem; bottom: 0.5rem;
  width: 2px; background: var(--color-accent,#c8a96e);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.4s var(--ease-expo);
}
.product-card:hover .product-card-info::before { transform: scaleY(1); }

.product-card-category {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(200,169,110,0.6); /* accent muted */
  margin-bottom: 0.25rem;
}

.product-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem; font-weight: 400; line-height: 1.25;
  color: rgba(248,246,242,0.92);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  display: flex; align-items: baseline; gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.price-current {
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem; font-weight: 500;
  color: #f8f6f2;
}
.price-original {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  text-decoration: line-through;
}
.price-sale { color: #e63946; }

/* Size pills — minimal chips */
.product-card-sizes {
  display: flex; gap: 0.3rem; flex-wrap: wrap;
  margin-top: 0.4rem;
}
.size-pill {
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(255,255,255,0.1);
  font-family: 'DM Mono', monospace;
  font-size: 0.52rem; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  transition: border-color 0.2s, color 0.2s;
}
.product-card:hover .size-pill { border-color: rgba(200,169,110,0.3); color: rgba(200,169,110,0.7); }

/* Actions bar — slides up from bottom */
.product-card-actions {
  display: flex; gap: 0.5rem;
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0.6rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-expo);
  z-index: 2;
}
.product-card:hover .product-card-actions { transform: translateY(0); }

.product-card-actions .btn-add-cart {
  flex: 1;
  background: var(--color-accent,#c8a96e); color: #0a0a0a;
  border: none; padding: 0.65rem 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s var(--ease-spring);
}
.product-card-actions .btn-add-cart:hover { background: #e0c07e; transform: translateY(-1px); }
.product-card-actions .btn-add-cart.is-loading { opacity: 0.7; pointer-events: none; }
.product-card-actions .btn-add-cart.is-added  { background: #2a9d8f; color: #fff; }

/* ─── SECTION HEADERS — refined ─────────────────────────────── */
.section-eyebrow {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--color-accent,#c8a96e);
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300; line-height: 1.1;
  letter-spacing: 0.02em;
}

/* ─── SCROLL REVEAL — upgraded with blur ─────────────────────── */
.reveal,
.reveal-left,
.reveal-right,
[data-reveal] {
  opacity: 0;
  transition:
    opacity 0.9s var(--ease-expo),
    transform 0.9s var(--ease-expo),
    filter 0.9s ease;
  filter: blur(4px);
  will-change: opacity, transform, filter;
}
.reveal        { transform: translateY(32px); }
.reveal-left   { transform: translateX(-32px); }
.reveal-right  { transform: translateX(32px); }
[data-reveal="scale"] { transform: scale(0.94); }

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
[data-reveal].visible {
  opacity: 1; transform: none; filter: blur(0px);
}

/* Stagger for children */
.stagger-children > * {
  opacity: 0; transform: translateY(24px); filter: blur(2px);
  transition: opacity 0.7s var(--ease-expo), transform 0.7s var(--ease-expo), filter 0.6s;
}
.stagger-children.visible > *:nth-child(1) { opacity:1; transform:none; filter:none; transition-delay:.05s; }
.stagger-children.visible > *:nth-child(2) { opacity:1; transform:none; filter:none; transition-delay:.12s; }
.stagger-children.visible > *:nth-child(3) { opacity:1; transform:none; filter:none; transition-delay:.19s; }
.stagger-children.visible > *:nth-child(4) { opacity:1; transform:none; filter:none; transition-delay:.26s; }
.stagger-children.visible > *:nth-child(5) { opacity:1; transform:none; filter:none; transition-delay:.33s; }
.stagger-children.visible > *:nth-child(6) { opacity:1; transform:none; filter:none; transition-delay:.40s; }

/* ─── PAGE TRANSITION v3 ─────────────────────────────────────── */
.page-transition {
  position: fixed; inset: 0; z-index: 9998;
  background: var(--color-black,#0a0a0a);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.6s var(--ease-circ);
}
.page-transition.enter { transform: scaleY(1); transform-origin: bottom; }
.page-transition.exit  { transform: scaleY(0); transform-origin: top; }

/* ─── MARQUEE — refined ──────────────────────────────────────── */
.marquee-section {
  overflow: hidden;
  padding: 0.75rem 0;
  background: var(--color-accent,#c8a96e);
  border-top: 1px solid rgba(200,169,110,0.3);
  border-bottom: 1px solid rgba(200,169,110,0.3);
}
.marquee-track {
  display: flex; gap: 4rem;
  animation: marqueeRun 28s linear infinite;
  white-space: nowrap;
}
.marquee-section:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: flex; align-items: center; gap: 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: #0a0a0a; flex-shrink: 0;
}
.marquee-diamond {
  width: 4px; height: 4px; background: rgba(0,0,0,0.4);
  transform: rotate(45deg); flex-shrink: 0;
}
.marquee-section.dark {
  background: rgba(248,246,242,0.05);
  border-color: rgba(255,255,255,0.05);
}
.marquee-section.dark .marquee-item { color: rgba(248,246,242,0.4); }
.marquee-section.dark .marquee-diamond { background: rgba(248,246,242,0.2); }
@keyframes marqueeRun {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── MINI CART v3 ───────────────────────────────────────────── */
.mini-cart-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s var(--ease-expo);
}
.mini-cart-overlay.is-active { opacity: 1; pointer-events: all; }

.mini-cart-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  z-index: 1201; width: min(420px, 100vw);
  background: var(--color-black,#0a0a0a);
  border-left: 1px solid rgba(255,255,255,0.05);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-expo);
}
.mini-cart-panel.is-open { transform: translateX(0); }

.mini-cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mini-cart-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem; font-weight: 300;
  letter-spacing: 0.08em; color: #f8f6f2;
  margin: 0;
}
.mini-cart-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.4); padding: 0.25rem;
  transition: color 0.2s, transform 0.3s var(--ease-spring);
}
.mini-cart-close:hover { color: #f8f6f2; transform: rotate(90deg); }

.mini-cart-content {
  flex: 1; overflow-y: auto; padding: 1.5rem 2rem;
}

/* ─── RESPONSIVE — MOBILE FIRST v3 ──────────────────────────── */

/* Tablet — max 1024px */
@media (max-width: 1024px) {
  :root { --header-h: 66px; }

  .primary-nav { display: none; }
  .hamburger  { display: flex; }

  .header-wrap { grid-template-columns: 1fr auto; }
  .header-actions { grid-column: 2; }
  .site-logo { grid-column: 1; }

  .products-grid { grid-template-columns: repeat(2, 1fr); }

  .product-card-actions {
    transform: translateY(0); /* Always visible on touch */
    background: rgba(0,0,0,0.85);
  }
  .product-card .wishlist-btn { transform: scale(1); opacity: 1; }
}

/* Mobile — max 768px */
@media (max-width: 768px) {
  :root {
    --header-h: 58px;
    --grain-opacity: 0;  /* Disabilita grain su mobile per perf */
  }

  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none !important; }

  .header-wrap {
    padding: 0 1rem;
    grid-template-columns: 1fr auto;
  }

  .logo-text { font-size: 1.3rem; }
  .logo-img  { height: 30px; }

  /* Hide account icon on small mobile to save space */
  .hdr-account { display: none; }

  /* Products — 2 col tight on mobile */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
  }

  .product-card-info { padding: 0.65rem 0.75rem 0.85rem; }
  .product-card-name { font-size: 0.9rem; }
  .product-card-sizes { display: none; } /* Save space on mobile */

  /* Product actions always visible on mobile */
  .product-card-actions {
    position: static;
    transform: none !important;
    background: none;
    padding: 0 0.75rem 0.85rem;
    border-top: none;
  }
  .product-card-actions .btn-add-cart {
    padding: 0.55rem;
    font-size: 0.55rem;
  }

  /* Search overlay — full screen keyboard-friendly */
  .search-input { font-size: 1.8rem; }
  .search-label { font-size: 0.6rem; }

  /* Shop layout */
  .shop-layout { grid-template-columns: 1fr; }
  .filters-sidebar {
    position: static;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  /* Featured product / about */
  .featured-product,
  .about-section { grid-template-columns: 1fr; }
  .featured-product-content,
  .about-content { padding: 2.5rem 1.5rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr; }

  /* Newsletter */
  .newsletter-form { flex-direction: column; }
  .newsletter-btn { padding: 0.9rem; }

  /* Hero */
  .hero-title { font-size: clamp(2.2rem, 11vw, 3.5rem); }
  .hero-content { bottom: 3rem; padding: 0 1.5rem; }

  /* Collections carousel */
  .collection-card { flex: 0 0 calc(80vw); }
}

/* Small mobile — max 480px */
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
  }

  .product-card-name { font-size: 0.82rem; }

  .mm-link { font-size: clamp(2rem, 10vw, 3rem); }

  .about-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Very small — max 360px */
@media (max-width: 360px) {
  .products-grid { grid-template-columns: 1fr; }
  .header-wrap { padding: 0 0.85rem; }
}

/* ─── TOUCH DEVICES — Improve tap targets ────────────────────── */
@media (hover: none) and (pointer: coarse) {
  .hdr-btn { width: 44px; height: 44px; }

  .product-card:hover .product-card-actions,
  .product-card .product-card-actions {
    transform: translateY(0);
    opacity: 1;
  }
  .product-card:hover .product-card-media::after { opacity: 0.6; }

  /* Larger tap area for menu links */
  .mm-link { padding: 0.4em 0; }
}

/* ─── ACCESSIBILITY ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  body::before { display: none; }
  .reveal, .reveal-left, .reveal-right,
  .stagger-children > * { opacity: 1; transform: none; filter: none; }
}

/* ─── PRODUCT CARD LINK WRAPPER ─────────────────────────────── */
.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* Remove link underline hover */
.product-card-link:hover,
.product-card-link:focus { text-decoration: none; color: inherit; }

/* View arrow button */
.product-card-view {
  display: flex; align-items: center; justify-content: center;
  width: 40px; flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  color: #f8f6f2; border-radius: 0;
  text-decoration: none;
  transition: background 0.2s;
}
.product-card-view:hover { background: rgba(255,255,255,0.2); }

/* ─── WC PRODUCT LOOP WRAPPER FIX ───────────────────────────── */
/* WooCommerce wraps each product in <li class="product"> — style it */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}
.woocommerce ul.products li.product {
  margin: 0 !important;
  padding: 0 !important;
  outline: 1px solid rgba(255,255,255,0.03);
}
.woocommerce ul.products li.product .product-card-media,
.woocommerce ul.products li.product > a > img,
.woocommerce ul.products li.product .woocommerce-loop-product__link > img {
  width: 100%; aspect-ratio: 2/3; object-fit: cover;
}

@media (max-width: 1024px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 1px !important; }
}

/* ─── HEADER: ensure proper z-index stack ────────────────────── */
.site-header { z-index: 900; }
#mobileMenu  { z-index: 1500; }
#searchOverlay { z-index: 2000; }
.mini-cart-panel { z-index: 1300; }
.mini-cart-overlay { z-index: 1200; }
.site-loader { z-index: 9999; }
.page-transition { z-index: 9998; }

/* ─── BODY: prevent horizontal scroll on mobile ─────────────── */
html, body { overflow-x: hidden; max-width: 100vw; }

/* ─── SECTION BASE FIX ───────────────────────────────────────── */
.section {
  padding: var(--spacing-xl, 6rem) 0;
}
.section-dark  { background: var(--color-black, #0a0a0a); color: var(--color-white, #f8f6f2); }
.section-light { background: var(--color-off-white, #f5f2ec); color: var(--color-black, #0a0a0a); }
.section-mid   { background: var(--color-dark, #111); color: var(--color-white, #f8f6f2); }

/* ─── LOADER: CSS-only fallback se JS non funziona ──────────── */
/* Dopo 3.5s sparisce con CSS puro, indipendentemente da JS */
@keyframes loaderAutoHide {
  0%   { opacity: 1; visibility: visible; pointer-events: all; }
  95%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}
.site-loader {
  animation: loaderAutoHide 0.5s ease forwards;
  animation-delay: 3.5s;
  animation-fill-mode: forwards;
}
/* Quando JS aggiunge .hidden, sovrascrivi subito */
.site-loader.hidden {
  animation: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

/* ─── LOADER: unifica z-index (sovrascrive conflitti) ────────── */
#siteLoader.site-loader {
  z-index: 99999 !important;
  position: fixed !important;
  inset: 0 !important;
}

/* ─── BODY OVERFLOW SAFETY ───────────────────────────────────── */
/* Se il loader per qualsiasi motivo rimane, dopo 4s body torna scrollabile */
@keyframes bodyUnlock {
  to { overflow: auto !important; }
}
body {
  animation: bodyUnlock 0.01s forwards;
  animation-delay: 4s;
}

/* ═══════════════════════════════════════════════════════
   LOGO 20BLACK — sistema dimensionamento ottimizzato
   Il logo è quasi quadrato (157×160px sorgente @2x)
   ═══════════════════════════════════════════════════════ */

.site-logo {
  grid-column: 1;
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

/* ── Immagini logo ── */
.site-logo-img {
  display: block;
  height: 44px;           /* altezza fissa display */
  width: auto;            /* larghezza proporzionale */
  object-fit: contain;
  object-position: left center;
  transition: opacity 0.35s ease, transform 0.35s ease;
  user-select: none;
  -webkit-user-drag: none;
}

/* Su header trasparente: mostra bianco, nascondi nero */
.site-logo-img--light { opacity: 1; }
.site-logo-img--dark  { display: none; }

/* Su header solid/scrolled con stile bianco: switcha al logo nero */
.site-header.is-solid .site-logo-img--light {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}
.site-header.is-solid .site-logo-img--dark {
  display: block;
  opacity: 1;
}

/* Se header scroll style = blur (default): mantieni logo bianco */
.site-header.is-solid .site-logo {
  position: relative;
}

/* Hover sul logo */
.site-logo:hover .site-logo-img { opacity: 0.8; transform: scale(0.97); }
.site-logo:focus-visible { outline: 1px solid var(--color-accent, #c8a96e); outline-offset: 6px; }

/* ── Loader logo ── */
.loader-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-logo-img {
  width: 120px;
  height: auto;
  object-fit: contain;
  /* Animazione di pulse mentre carica */
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.03); }
}

/* ── Mobile menu logo ── */
.mm-logo img {
  width: 64px;
  height: auto;
  object-fit: contain;
  display: block;
  /* Piccola animazione di entrata */
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s, transform 0.4s;
  transition-delay: 0.25s;
}
.mobile-menu.is-open .mm-logo img {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer logo ── */
.footer-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  opacity: 0.7;
  transition: opacity 0.25s;
}
.footer-logo-img:hover { opacity: 1; }

/* ── Tablet: logo leggermente più piccolo ── */
@media (max-width: 1024px) {
  .site-logo-img { height: 40px; }
}

/* ── Mobile: logo ancora più compatto ── */
@media (max-width: 768px) {
  .site-logo-img { height: 36px; }
  .loader-logo-img { width: 90px; }
}

/* ── Header: garantisce che logo bianco rimanga bianco su blur ── */
/* (il blur header non cambia il colore del logo, solo il bg) */
.site-header:not(.is-solid) .site-logo-img--light { opacity: 1; }
.site-header:not(.is-solid) .site-logo-img--dark  { display: none !important; }

/* ── Logo in .is-solid con stile blur (default): logo rimane bianco ── */
/* Solo se header_scroll_style = 'white' il logo diventa nero (via customizer CSS) */

/* ═══════════════════════════════════════════════════════════════
   FIX CRITICO: ANNOUNCEMENT BAR + HEADER STACKING
   Il banner è position:fixed, l'header gli va sotto.
   Tutto il contenuto compensa con padding-top dinamico.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bar-h:       0px;   /* aggiornato via JS se bar visibile */
  --stack-h:     calc( var(--header-h) + var(--bar-h) );
}

/* La barra è il primo elemento fixed in cima */
#announcementBar.announcement-bar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1100 !important;   /* sopra header (900) */
  width: 100% !important;
}

/* L'header va subito sotto la barra */
#siteHeader.site-header {
  top: var(--bar-h) !important;
  transition: top 0.3s ease, background 0.5s ease, height 0.4s ease !important;
}

/* Quando la barra è nascosta, header torna in cima */
#announcementBar.ann-hidden ~ #siteHeader,
body:not(.has-announcement-bar) #siteHeader {
  top: 0 !important;
}

/* Hero slideshow: compensa barra + header */
.hero-slideshow {
  padding-top: 0 !important;
  /* L'altezza è 100dvh per coprire tutta la viewport */
  height: 100dvh !important;
  height: 100vh !important;    /* fallback */
}

/* Il contenuto dell'hero ha padding-top per stare sotto header+bar */
.hero-content {
  padding-top: calc( var(--stack-h) + 1rem ) !important;
}

/* Qualsiasi sezione subito dopo hero: nessun offset */
.hero-slideshow + * {
  margin-top: 0;
}

/* Pagine non-homepage: il main inizia sotto header+bar */
.site-main {
  padding-top: 0;
}

/* Pagine interne (non front-page) necessitano offset perché non hanno hero */
body:not(.home) .site-main > *:first-child:not(.hero-slideshow):not(.woocommerce) {
  padding-top: calc( var(--stack-h) + 2rem );
}

/* ─── SLIDESHOW ARROWS ───────────────────────────────────────── */
.slideshow-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f8f6f2;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.slideshow-arrow--prev { left: 2rem; }
.slideshow-arrow--next { right: 2rem; }
.slideshow-arrow:hover {
  background: rgba(200,169,110,0.25);
  border-color: rgba(200,169,110,0.4);
  transform: translateY(-50%) scale(1.08);
}
@media (max-width: 768px) {
  .slideshow-arrow { width: 40px; height: 40px; }
  .slideshow-arrow--prev { left: 1rem; }
  .slideshow-arrow--next { right: 1rem; }
}

/* ─── SCROLL HINT ────────────────────────────────────────────── */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex; flex-direction: column; align-items: center;
}
.scroll-hint-line {
  display: block;
  width: 1px; height: 60px;
  background: linear-gradient( to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 100% );
  animation: scrollDrop 2s ease-in-out infinite;
}
@keyframes scrollDrop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}
@media (max-width: 768px) { .hero-scroll-hint { bottom: 1.5rem; } }

/* ─── VIDEO SLIDES ───────────────────────────────────────────── */
.hero-slide-video-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
  z-index: 1;
}

/* Video HTML5 */
.hero-slide-video {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%; min-height: 100%;
  width: auto; height: auto;
  object-fit: cover;
}

/* YouTube / Vimeo iframe */
.hero-slide-iframe,
.yt-player {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* Aspect 16:9 ingrandito per coprire tutta la viewport */
  width: 177.78vh;   /* 16/9 * 100vh */
  height: 56.25vw;   /* 9/16 * 100vw */
  min-width: 100%;
  min-height: 100%;
  border: none;
  pointer-events: none; /* non interagibile */
}

/* Poster image sopra video (sbiadisce quando video parte) */
.hero-slide-poster {
  z-index: 2;
  transition: opacity 1s ease;
}
.hero-slide.video-playing .hero-slide-poster {
  opacity: 0;
  pointer-events: none;
}

/* Overlay più denso sui video per leggibilità testo */
.is-video-slide .hero-slide-overlay {
  background: linear-gradient(
    135deg,
    rgba(10,10,10,0.55) 0%,
    rgba(10,10,10,0.35) 50%,
    rgba(10,10,10,0.55) 100%
  ) !important;
}

/* ─── SLIDE BG EMPTY (nessuna immagine) ─────────────────────── */
.hero-slide-bg--empty {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1208 50%, #0a0a0a 100%);
}

/* ─── ANNOUNCEMENT BAR MOBILE ───────────────────────────────── */
@media (max-width: 768px) {
  #announcementBar.announcement-bar {
    font-size: 0.65rem !important;
    padding: 0.5rem 2.5rem !important;
    letter-spacing: 0.12em !important;
  }
  #announcementBar .ann-close {
    right: 0.5rem !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   FIX GLOBALE WOOCOMMERCE — colori, leggibilità, layout
   Risolve testo bianco su bianco, elementi fuori misura
   ═══════════════════════════════════════════════════════════════ */

/* ─── WC body background ─────────────────────────────────────── */
.woocommerce-account,
.woocommerce-cart,
.woocommerce-checkout {
  background: #0f0f0f;
}

/* ─── WC contenuto principale (senza sidebar) ────────────────── */
.woocommerce-account #main,
.woocommerce-cart    #main,
.woocommerce-checkout #main {
  background: #0f0f0f;
  color: rgba(248,246,242,0.88);
}

/* ─── Testo generico WC ──────────────────────────────────────── */
.woocommerce,
.woocommerce * {
  box-sizing: border-box;
}

/* Rimuovi sfondo bianco di default da contenitori WC */
.woocommerce-page .woocommerce,
.woocommerce-page .entry-content,
.woocommerce-MyAccount-content {
  background: transparent !important;
  color: rgba(248,246,242,0.88) !important;
}

/* ─── Bottoni WC — fix contrasto ─────────────────────────────── */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button {
  background-color: var(--color-accent, #c8a96e) !important;
  color: #0a0a0a !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: var(--font-mono, 'DM Mono', monospace) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  padding: 0.85rem 2rem !important;
  transition: background 0.2s !important;
  cursor: pointer !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .button:hover {
  background-color: #d4b87a !important;
  color: #0a0a0a !important;
}

/* Bottone "Effettua l'ordine" al checkout */
#place_order,
.woocommerce-checkout #place_order {
  background: var(--color-accent, #c8a96e) !important;
  color: #0a0a0a !important;
  width: 100% !important;
  padding: 1.1rem !important;
  font-size: 0.78rem !important;
}

/* ─── Form input globali WC ──────────────────────────────────── */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row select {
  background: #161616 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: rgba(248,246,242,0.88) !important;
  border-radius: 0 !important;
  padding: 0.85rem 1rem !important;
  font-size: 0.9rem !important;
  height: 48px !important;
  width: 100% !important;
  transition: border-color 0.2s !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--color-accent, #c8a96e) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(200,169,110,0.12) !important;
}

.woocommerce form .form-row input::placeholder { color: rgba(248,246,242,0.25) !important; }

.woocommerce form .form-row label {
  color: rgba(248,246,242,0.45) !important;
  font-family: var(--font-mono, 'DM Mono', monospace) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  font-weight: 400 !important;
  margin-bottom: 0.5rem !important;
  display: block !important;
}

/* ─── Notices/Messaggi ───────────────────────────────────────── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  background: #161616 !important;
  color: rgba(248,246,242,0.88) !important;
  border-top: none !important;
  border-left: 3px solid var(--color-accent, #c8a96e) !important;
  border-radius: 0 !important;
  padding: 1rem 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

.woocommerce-error { border-left-color: #e63946 !important; }
.woocommerce-info  { border-left-color: #4cc9f0 !important; }

.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before { display: none !important; }

/* ─── Cart totals / checkout order review ────────────────────── */
.woocommerce-cart .cart-collaterals,
.cart_totals,
.woocommerce-checkout-review-order {
  background: #161616 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  color: rgba(248,246,242,0.88) !important;
}

.cart_totals h2,
.woocommerce-checkout-review-order h3 {
  color: rgba(248,246,242,0.88) !important;
}

.shop_table.woocommerce-checkout-review-order-table th,
.woocommerce-cart-form__cart-item th {
  color: rgba(248,246,242,0.4) !important;
  background: rgba(255,255,255,0.02) !important;
  border-color: rgba(255,255,255,0.07) !important;
}

.shop_table td,
.shop_table th {
  border-color: rgba(255,255,255,0.07) !important;
  color: rgba(248,246,242,0.88) !important;
}

/* Coupon input al checkout */
.woocommerce-form-coupon-toggle .showcoupon,
.woocommerce-form-login-toggle .showlogin {
  color: var(--color-accent, #c8a96e) !important;
}

/* ─── Pagamento WC ───────────────────────────────────────────── */
#payment,
.woocommerce #payment {
  background: #161616 !important;
  border-radius: 0 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
}

#payment .payment_methods label,
.woocommerce #payment .payment_methods label {
  color: rgba(248,246,242,0.88) !important;
}

#payment .payment_box,
.woocommerce #payment .payment_box {
  background: rgba(255,255,255,0.03) !important;
  color: rgba(248,246,242,0.6) !important;
  border-radius: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════
   LA NOSTRA STORIA — Page Template
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.story-hero {
  position: relative;
  height: 100dvh; height: 100vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: #0a0a0a;
}
.story-hero-bg { position: absolute; inset: 0; }
.story-hero-img { width: 100%; height: 100%; object-fit: cover; }
.story-hero-gradient { position: absolute; inset: 0; background: linear-gradient(135deg,#1a1208 0%,#0a0a0a 100%); }
.story-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.85) 30%, rgba(10,10,10,.3) 100%); }
.story-hero-content { position: relative; z-index: 2; padding-bottom: 5rem; padding-top: calc(var(--stack-h,80px) + 2rem); }
.story-hero-scroll { position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%); z-index: 2; }
.story-eyebrow { font-family: var(--font-mono); font-size: .65rem; letter-spacing: .35em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 1rem; }
.story-title { font-family: var(--font-display); font-size: clamp(3rem,8vw,6rem); font-weight: 300; color: #f8f6f2; line-height: 1.05; margin: 0; letter-spacing: .02em; }
.story-title em { font-style: italic; color: var(--color-accent); }
.story-subtitle { color: rgba(248,246,242,.55); font-size: 1rem; line-height: 1.7; max-width: 460px; margin-top: 1.25rem; }

/* ── Intro / Quote ── */
.story-intro { padding: 5rem 0; }
.story-intro-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.story-intro-quote blockquote p { font-family: var(--font-display); font-size: clamp(1.4rem,3vw,2rem); font-weight: 300; color: rgba(248,246,242,.85); line-height: 1.5; font-style: italic; margin: 0 0 1rem; }
.story-intro-quote cite { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--color-accent); font-style: normal; }

/* ── Chapters ── */
.story-chapter { padding: 6rem 0; background: #f5f2ec; }
.story-chapter:nth-child(even) { background: #0a0a0a; }
.story-chapter:nth-child(even) * { color: rgba(248,246,242,.85) !important; }
.story-chapter--reversed .story-chapter-inner { direction: rtl; }
.story-chapter--reversed .story-chapter-inner > * { direction: ltr; }
.story-chapter-inner { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.25rem,5vw,3rem); display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.chapter-number { display: block; font-family: var(--font-mono); font-size: .65rem; letter-spacing: .3em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 1rem; }
.chapter-title { font-family: var(--font-display); font-size: clamp(2rem,4vw,3rem); font-weight: 300; line-height: 1.15; margin-bottom: 1.75rem; }
.story-chapter-text p { font-size: .95rem; line-height: 1.85; color: rgba(0,0,0,.65); margin-bottom: 1.25rem; }
.story-chapter:nth-child(even) .story-chapter-text p { color: rgba(248,246,242,.6) !important; }
.story-chapter-img-wrap { aspect-ratio: 3/4; overflow: hidden; position: relative; }
.story-chapter-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.story-chapter-img-wrap:hover img { transform: scale(1.04); }
.story-img-placeholder { width: 100%; height: 100%; background: #1a1a1a; display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(200,169,110,.3); }
.story-placeholder-num { font-family: var(--font-display); font-size: 4rem; font-weight: 300; }
.story-chapter-caption { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; color: rgba(0,0,0,.35); margin-top: .75rem; }
.story-chapter:nth-child(even) .story-chapter-caption { color: rgba(248,246,242,.25) !important; }

/* ── Values ── */
.story-values { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.story-value-item { display: flex; gap: 1rem; align-items: flex-start; }
.story-value-icon { font-size: 1rem; color: var(--color-accent); flex-shrink: 0; margin-top: .15rem; }
.story-value-item strong { display: block; font-size: .88rem; margin-bottom: .2rem; }
.story-value-item p { font-size: .82rem; opacity: .6; margin: 0; }

/* ── Stats ── */
.story-stats { background: #0a0a0a; }
.story-stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: rgba(255,255,255,.05); }
.story-stat { background: #0f0f0f; padding: 3.5rem 2rem; text-align: center; }
.story-stat-num { display: block; font-family: var(--font-display); font-size: clamp(2.5rem,5vw,4rem); font-weight: 300; color: var(--color-accent); line-height: 1; margin-bottom: .5rem; }
.story-stat-label { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(248,246,242,.35); }

/* ── Gallery strip ── */
.story-gallery-strip { overflow: hidden; }
.story-gallery-track { display: flex; }
.story-gallery-item { flex: 0 0 20%; aspect-ratio: 1; overflow: hidden; }
.story-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.story-gallery-item:hover img { transform: scale(1.06); }
.story-gallery-placeholder { display: flex; align-items: center; justify-content: center; gap: 2rem; padding: 2rem; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .25em; text-transform: uppercase; color: rgba(248,246,242,.25); }
.story-gallery-placeholder .sep { color: var(--color-accent); }

/* ── CTA finale ── */
.story-cta { background: var(--color-accent); padding: 6rem 0; text-align: center; }
.story-cta-title { font-family: var(--font-display); font-size: clamp(2.5rem,6vw,5rem); font-weight: 300; color: #0a0a0a; line-height: 1.1; margin: 1rem 0 2.5rem; }
.story-cta .story-eyebrow { color: rgba(10,10,10,.5); }
.story-cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.story-cta .btn-primary { background: #0a0a0a; color: #f8f6f2; }
.story-cta .btn-outline { border-color: rgba(10,10,10,.3); color: #0a0a0a; }
.story-cta .btn-outline:hover { background: #0a0a0a; color: #f8f6f2; }

/* ── Responsive storia ── */
@media (max-width: 1024px) {
  .story-chapter-inner { grid-template-columns: 1fr; gap: 3rem; }
  .story-chapter--reversed .story-chapter-inner { direction: ltr; }
  .story-stats-grid { grid-template-columns: repeat(2,1fr); }
  .story-gallery-item { flex: 0 0 33.33%; }
}
@media (max-width: 768px) {
  .story-chapter-inner { padding: 0 1.5rem; }
  .story-stats-grid { grid-template-columns: 1fr 1fr; }
  .story-gallery-item { flex: 0 0 50%; }
  .story-gallery-placeholder { flex-wrap: wrap; font-size: .6rem; }
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE SEZIONI MODULARI
   ═══════════════════════════════════════════════════════════════ */

.section-accent { background: var(--color-accent, #c8a96e); color: #0a0a0a; }
.section-accent .section-eyebrow { color: rgba(10,10,10,.5); }
.section-accent .section-title   { color: #0a0a0a; }
.section-accent .btn-outline { border-color: rgba(10,10,10,.4); color: #0a0a0a; }
.section-accent .btn-outline:hover { background: #0a0a0a; color: #f8f6f2; border-color: #0a0a0a; }

/* ── Testo + Immagine ── */
.hp-text-image { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.hp-section--reversed .hp-text-image { direction: rtl; }
.hp-section--reversed .hp-text-image > * { direction: ltr; }
.hp-text-body { margin-top: 1.5rem; font-size: .95rem; line-height: 1.85; opacity: .75; }
.hp-text-body p { margin-bottom: 1rem; }
.hp-image-block { aspect-ratio: 4/5; overflow: hidden; }
.hp-image-block img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.hp-image-block:hover img { transform: scale(1.04); }
@media (max-width: 768px) {
  .hp-text-image { grid-template-columns: 1fr; gap: 2rem; }
  .hp-section--reversed .hp-text-image { direction: ltr; }
}

/* ── Slideshow Modulare ── */
.hp-slideshow-wrap { padding: 5rem 0; }
.hp-slideshow-header { margin-bottom: 2.5rem; }
.hp-slideshow { position: relative; aspect-ratio: 21/9; overflow: hidden; background: #111; }
@media (max-width: 768px) { .hp-slideshow { aspect-ratio: 4/3; } }
.hp-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hp-slide.active { opacity: 1; position: relative; }
.hp-slide img { width: 100%; height: 100%; object-fit: cover; }
.hp-slide-controls { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); display: flex; gap: .5rem; z-index: 5; }
.hp-slide-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.3); border: none; cursor: pointer; transition: background .25s, transform .25s; padding: 0; }
.hp-slide-dot.active { background: #fff; transform: scale(1.3); }
.hp-slide-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.15); color: #fff; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .25s; }
.hp-slide-prev { left: 1rem; }
.hp-slide-next { right: 1rem; }
.hp-slide-arrow:hover { background: rgba(200,169,110,.5); }

/* ================================================================
   FIX DEFINITIVI v3 — Logo, Prodotti, Categorie, Mobile
   ================================================================ */

/* ─── FIX LOGO: NON usare position:absolute che rompe il layout ─── */
.site-header.is-solid .site-logo-img--light {
  opacity: 0 !important;
  position: static !important;   /* ← era absolute, rompeva il layout */
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}
.site-header.is-solid .site-logo-img--dark {
  display: block !important;
  opacity: 1 !important;
  height: 44px !important;
  width: auto !important;
}

/* Su sfondo blur (default) il logo rimane bianco — nascondi il dark */
.site-header:not(.is-solid) .site-logo-img--dark { display: none !important; }
.site-header:not(.is-solid) .site-logo-img--light {
  opacity: 1 !important;
  width: auto !important;
  height: 44px !important;
  position: static !important;
}

/* Header z-index definitivo — sopra TUTTO il contenuto */
#siteHeader.site-header {
  z-index: 900 !important;
  isolation: isolate;
}

/* Assicura che nessun elemento di contenuto superi l'header */
.products-grid,
.product-card,
.woocommerce ul.products li.product,
.collection-card,
.hero-slideshow,
.about-section,
.featured-product,
.section {
  z-index: auto !important;
  isolation: auto;
}

/* ─── FIX PRODOTTI: immagine placeholder quando manca l'img ─────── */
.product-card-media {
  background: #111 !important;  /* sfondo scuro se img non carica */
}
.product-card-img {
  background: #111;
}
/* Placeholder visivo quando non c'è immagine */
.product-card-media:not(:has(img[src])):before,
.product-card-media img[src=""],
.product-card-media img:not([src]) {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111 0%, #1a1a1a 50%, #111 100%);
}

/* Se img esiste ma non ha src o ha errore → mostra placeholder con icona */
.product-card-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  color: rgba(200,169,110,0.2);
}

/* ─── CATEGORIES CAROUSEL — quando manca immagine ───────────────── */
.collection-card {
  background: #0f0f0f;  /* sfondo di fallback */
  min-height: 280px;
}
.collection-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}
/* Stile della card senza immagine — elegante anche vuota */
.collection-card:not(:has(.collection-card-img[src])),
.collection-card.no-image {
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1208 100%);
  border: 1px solid rgba(200,169,110,0.1);
}

/* ─── MOBILE: HORIZONTAL SCROLL CAROUSEL per prodotti ───────────── */
/* Su mobile sostituisce la grid con carosello orizzontale scrollabile */
@media (max-width: 768px) {

  /* ── Products: carosello scroll orizzontale ── */
  .products-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 12px !important;
    padding: 0 1.25rem 1rem !important;
    /* Mantieni gli stessi dati visivi senza le 2 col strette */
  }
  .products-grid::-webkit-scrollbar { display: none !important; }

  /* Ogni card: larghezza fissa, non si stringe */
  .products-grid .product-card,
  .products-grid article.product-card {
    flex: 0 0 72vw !important;
    max-width: 280px !important;
    scroll-snap-align: start !important;
  }

  /* Aspect ratio prodotto su mobile: più quadrato per visibilità */
  .product-card-media {
    aspect-ratio: 3/4 !important;
  }

  /* Info più compatta */
  .product-card-info {
    padding: 0.75rem !important;
  }
  .product-card-name {
    font-size: 0.88rem !important;
    -webkit-line-clamp: 1 !important;
  }

  /* Actions su mobile: bottone sempre visibile */
  .product-card-actions {
    position: static !important;
    transform: none !important;
    padding: 0.5rem 0.75rem 0.75rem !important;
    background: none !important;
  }
  .product-card-actions .btn-add-cart {
    padding: 0.6rem !important;
    font-size: 0.6rem !important;
    width: 100% !important;
  }
  .product-card-view { display: none !important; }

  /* Logo mobile: altezza ridotta */
  .site-logo-img,
  .site-header.is-solid .site-logo-img--dark { height: 36px !important; }

  /* Categorie su mobile: carosello */
  .collections-carousel {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 12px !important;
    padding: 0 1.25rem 1rem !important;
  }
  .collections-carousel::-webkit-scrollbar { display: none !important; }

  .collection-card {
    flex: 0 0 75vw !important;
    max-width: 260px !important;
    scroll-snap-align: start !important;
  }
}

/* ─── WC ul.products: fix anche su mobile ────────────────────────── */
@media (max-width: 768px) {
  .woocommerce ul.products {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 12px !important;
    padding: 0 1.25rem 1rem !important;
    grid-template-columns: none !important;
  }
  .woocommerce ul.products::-webkit-scrollbar { display: none !important; }
  .woocommerce ul.products li.product {
    flex: 0 0 72vw !important;
    max-width: 280px !important;
    scroll-snap-align: start !important;
    margin: 0 !important;
    outline: 1px solid rgba(255,255,255,0.05) !important;
  }
}

/* ─── SEZIONE "Nuovi Arrivi" su mobile ───────────────────────────── */
@media (max-width: 768px) {
  /* Rimuovi il padding laterale dal container nelle sezioni prodotti
     così il carosello arriva ai bordi dello schermo */
  #shop-preview .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible;
  }
  #shop-preview .section-header.reveal {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  /* Indicatore scroll — puntini o freccia */
  #shop-preview .products-grid::after {
    content: '';
    flex: 0 0 1.25rem;  /* spacer finale */
  }
}

/* ─── CATEGORIE: nascondi se non ci sono immagini ─────────────────── */
/* La sezione collezioni viene nascosta su mobile se tutte le card sono vuote */
.collections-section .collection-card.no-image-available {
  display: none;
}

/* ─── SCROLL INDICATOR per caroselli mobile ─────────────────────── */
.mobile-scroll-hint {
  display: none;
}
@media (max-width: 768px) {
  .mobile-scroll-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono, 'DM Mono', monospace);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(248,246,242,0.3);
    padding: 0 1.25rem;
    margin-bottom: 0.75rem;
  }
  .mobile-scroll-hint::after {
    content: '→';
    animation: scrollHint 1.5s ease-in-out infinite;
  }
  @keyframes scrollHint {
    0%, 100% { transform: translateX(0); opacity: 0.3; }
    50%       { transform: translateX(4px); opacity: 0.8; }
  }
}

/* ─── DESKTOP: prodotti 3 colonne ottimizzate ────────────────────── */
@media (min-width: 1025px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1px !important;
  }
  /* Card desktop: aspect-ratio verticale */
  .product-card-media {
    aspect-ratio: 2/3 !important;
  }
}

/* ─── TABLET: 2 colonne con gap ─────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1px !important;
  }
}

/* ================================================================
   CONSOLIDATED RESPONSIVE RULES — sovrascrivono tutto
   Regola unica per breakpoint, senza conflitti
   ================================================================ */

/* ── Desktop ≥1025px: 3 colonne con gap minimo ── */
@media screen and (min-width: 1025px) {
  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1px !important;
    overflow: visible !important;
    flex-direction: unset !important;
  }
  .products-grid .product-card {
    flex: none !important;
    max-width: none !important;
    width: 100% !important;
  }
  .product-card-media { aspect-ratio: 2/3 !important; }
}

/* ── Tablet 769–1024px: 2 colonne ── */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1px !important;
    overflow: visible !important;
    flex-direction: unset !important;
  }
}

/* ── Mobile ≤768px: carosello scroll orizzontale ── */
@media screen and (max-width: 768px) {
  .products-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 12px !important;
    padding: 0 1rem 1.5rem !important;
    grid-template-columns: unset !important;
  }
  .products-grid::-webkit-scrollbar { display: none !important; }
  .products-grid .product-card,
  .products-grid article.product-card {
    flex: 0 0 75vw !important;
    max-width: 280px !important;
    min-width: 220px !important;
    scroll-snap-align: start !important;
  }
  .product-card-media { aspect-ratio: 3/4 !important; }
  .product-card-actions {
    position: static !important;
    transform: none !important;
    padding: 0.5rem 0.75rem 0.75rem !important;
    background: none !important;
  }

  /* WC loop nativo */
  .woocommerce ul.products {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 12px !important;
    padding: 0 1rem 1.5rem !important;
    grid-template-columns: unset !important;
  }
  .woocommerce ul.products::-webkit-scrollbar { display: none !important; }
  .woocommerce ul.products li.product {
    flex: 0 0 75vw !important;
    max-width: 280px !important;
    min-width: 220px !important;
    scroll-snap-align: start !important;
    margin: 0 !important;
  }
}

/* ── Logo definitivo: nessun position:absolute ── */
.site-header .site-logo { position: relative !important; }
.site-header .site-logo-img {
  position: static !important;
  display: block !important;
}
.site-header:not(.is-solid) .site-logo-img--light { opacity: 1 !important; height: 44px !important; width: auto !important; }
.site-header:not(.is-solid) .site-logo-img--dark  { opacity: 0 !important; height: 0 !important; width: 0 !important; overflow: hidden !important; }
.site-header.is-solid .site-logo-img--light { opacity: 0 !important; height: 0 !important; width: 0 !important; overflow: hidden !important; }
.site-header.is-solid .site-logo-img--dark  { opacity: 1 !important; height: 44px !important; width: auto !important; }

@media (max-width: 768px) {
  .site-header:not(.is-solid) .site-logo-img--light { height: 34px !important; }
  .site-header.is-solid .site-logo-img--dark { height: 34px !important; }
}

/* ── Sezione prodotti homepage: container senza padding sui lati su mobile ── */
@media (max-width: 768px) {
  #shop-preview .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  #shop-preview .section-header.reveal,
  #shop-preview .section-header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .mobile-scroll-hint {
    padding-left: 1rem !important;
  }
}

/* ================================================================
   SEZIONE NUOVI ARRIVI — markup pulito
   ================================================================ */

.tb-shop-preview {
  padding: 4rem 0 5rem;
  background: #0a0a0a;
  overflow: hidden;
}

.tb-shop-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.tb-viewall-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248,246,242,0.55);
  text-decoration: none;
  border-bottom: 1px solid rgba(248,246,242,0.15);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s;
  align-self: flex-end;
  margin-bottom: 0.5rem;
}
.tb-viewall-link:hover {
  color: var(--color-accent, #c8a96e);
  border-bottom-color: var(--color-accent, #c8a96e);
}

/* Desktop: griglia 3 colonne */
.tb-products-scroll {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
}

/* Tablet: 2 colonne */
@media (max-width: 1024px) {
  .tb-products-scroll {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: carosello orizzontale */
@media (max-width: 768px) {
  .tb-shop-preview {
    padding: 3rem 0 3.5rem;
  }
  .tb-shop-header {
    padding: 0 1rem;
    margin-bottom: 1.25rem;
  }
  .tb-products-scroll {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
    padding: 0 1rem 1rem;
    grid-template-columns: unset;
  }
  .tb-products-scroll::-webkit-scrollbar { display: none; }
  .tb-products-scroll .product-card {
    flex: 0 0 72vw;
    max-width: 260px;
    min-width: 200px;
    scroll-snap-align: start;
  }
}

.tb-empty-note {
  text-align: center;
  padding: 4rem 1.25rem;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 1.2rem;
  opacity: 0.35;
  color: #f8f6f2;
}

/* ================================================================
   BLOCCHI WC CARRELLO/CHECKOUT — stile scuro corretto
   Risolve il problema dell'errore React: non iniettare nulla nel DOM dei blocchi
   ================================================================ */

/* Pagine con blocchi WC: padding-top per header fisso */
.woocommerce-cart .wp-site-blocks,
.woocommerce-checkout .wp-site-blocks,
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-cart #main,
.woocommerce-checkout #main {
  padding-top: calc(var(--stack-h, 72px) + 0.5rem);
  background: #0a0a0a;
  min-height: 80vh;
}

/* Block cart dark theme — non modificare la struttura React, solo i colori */
.wc-block-cart,
.wc-block-checkout {
  color: rgba(248,246,242,0.88) !important;
}

.wc-block-cart__main-section,
.wc-block-checkout__main {
  background: transparent !important;
}

.wc-block-components-text-input input,
.wc-block-components-select select,
.wc-block-components-country-input input,
.wc-block-components-state-input select {
  background: #161616 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: rgba(248,246,242,0.88) !important;
  border-radius: 0 !important;
}

.wc-block-components-text-input input:focus,
.wc-block-components-select select:focus {
  border-color: var(--color-accent, #c8a96e) !important;
  outline: none !important;
}

.wc-block-components-label,
.wc-block-components-form label,
.wp-block-woocommerce-checkout-fields-block label {
  color: rgba(248,246,242,0.45) !important;
  font-family: var(--font-mono, 'DM Mono', monospace) !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
}

.wc-block-components-checkout-step__title,
.wc-block-components-checkout-step__heading {
  color: rgba(248,246,242,0.88) !important;
  font-family: var(--font-display, 'Cormorant Garamond', serif) !important;
}

.wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
  background: var(--color-accent, #c8a96e) !important;
  color: #0a0a0a !important;
  border-radius: 0 !important;
  font-family: var(--font-mono, 'DM Mono', monospace) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  border: none !important;
}
.wc-block-components-button:not(.is-link):hover {
  background: #d4b87a !important;
}

.wc-block-cart-item__product-name,
.wc-block-cart-item__product-metadata,
.wc-block-components-order-summary-item__individual-prices {
  color: rgba(248,246,242,0.88) !important;
}

.wc-block-components-totals-wrapper,
.wc-block-cart__totals-side,
.wc-block-checkout__sidebar {
  background: #111 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  color: rgba(248,246,242,0.88) !important;
}

.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value {
  color: rgba(248,246,242,0.8) !important;
}

.wc-block-components-order-summary__button-text,
.wc-block-components-panel__button-text {
  color: rgba(248,246,242,0.55) !important;
}

/* Coupon */
.wc-block-components-coupon input[type="text"] {
  background: #161616 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: rgba(248,246,242,0.88) !important;
}

/* ================================================================
   WC SHOP LOOP — griglia prodotti corretta
   Il <li class="product tb-product-li"> deve essere visualmente
   invisibile (nessun padding/margin extra) e il .product-card
   dentro deve occupare il 100% dello spazio.
   ================================================================ */

/* Reset totale del <li> di WC */
.woocommerce ul.products {
  display: grid !important;
  gap: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

/* Desktop: 3 colonne */
@media (min-width: 1025px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Tablet: 2 colonne */
@media (min-width: 769px) and (max-width: 1024px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile: 2 colonne fisse (NO carosello sullo shop - è più usabile) */
@media (max-width: 768px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2px !important;
    display: grid !important;
    overflow: visible !important;
    flex-direction: unset !important;
  }
}

/* Il <li> non deve aggiungere nulla visivamente */
.woocommerce ul.products li.product {
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: auto !important;
  display: block !important;
  position: relative !important;
}

/* Il .product-card dentro occupa tutto il <li> */
.woocommerce ul.products li.product .product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Fix: il product-card-link occupa tutto */
.woocommerce ul.products li.product .product-card .product-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Fix: media area con aspect ratio consistente nel loop WC */
.woocommerce ul.products li.product .product-card-media {
  aspect-ratio: 3/4 !important;
  flex-shrink: 0;
}

/* Info area occupa il resto */
.woocommerce ul.products li.product .product-card-info {
  flex: 1;
}

/* ── Shop bar (result count + ordering) ── */
.tb-shop-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.tb-shop-bar .woocommerce-result-count {
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: .72rem;
  letter-spacing: .1em;
  color: rgba(248,246,242,.4);
  margin: 0;
}
.tb-shop-bar .woocommerce-ordering select {
  background: #161616;
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(248,246,242,.7);
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: .7rem;
  letter-spacing: .08em;
  padding: .4rem .75rem;
  border-radius: 0;
  cursor: pointer;
}

/* ── Shop hero: dimensione controllata ── */
.tb-shop-hero {
  width: 100%;
  overflow: hidden;
}

/* ── Paginazione WC ── */
.woocommerce nav.woocommerce-pagination {
  margin-top: 3rem;
  text-align: center;
}
.woocommerce nav.woocommerce-pagination ul {
  display: inline-flex;
  gap: 2px;
  list-style: none;
  padding: 0; margin: 0;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: #111;
  border: 1px solid rgba(255,255,255,.06);
  color: rgba(248,246,242,.6);
  font-family: var(--font-mono); font-size: .78rem;
  text-decoration: none;
  transition: all .2s;
}
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--color-accent, #c8a96e);
  color: #0a0a0a;
  border-color: var(--color-accent, #c8a96e);
}
