/* TDG commerce refresh — demo */
:root{--tdg-wine:#6f1734;--tdg-wine-dark:#4d0f24;--tdg-cream:#f7f2e8;--tdg-ink:#2e2729;--tdg-line:#e7ddd3;--tdg-gold:#b89045}
.tdg-category-shortcuts{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 18px}
.tdg-category-chip{display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border:1px solid var(--tdg-line);border-radius:999px;background:#fff;color:var(--tdg-ink);font-size:14px;font-weight:700;line-height:1.2;transition:.2s ease}
.tdg-category-chip span{display:inline-grid;place-items:center;min-width:23px;height:23px;padding:0 6px;border-radius:999px;background:var(--tdg-cream);color:var(--tdg-wine);font-size:12px}
.tdg-category-chip:hover,.tdg-category-chip.is-active{border-color:var(--tdg-wine);background:var(--tdg-wine);color:#fff;transform:translateY(-1px)}
.tdg-category-chip:hover span,.tdg-category-chip.is-active span{background:rgba(255,255,255,.18);color:#fff}
.tdg-filter-panel{margin:0 0 28px;border:1px solid var(--tdg-line);border-radius:14px;background:linear-gradient(135deg,#fff 0%,#fbf8f2 100%);box-shadow:0 9px 30px rgba(45,31,35,.06);overflow:hidden}
.tdg-filter-panel summary{display:flex;align-items:center;justify-content:space-between;padding:17px 20px;color:var(--tdg-wine-dark);font-size:18px;font-weight:800;cursor:pointer;list-style:none}
.tdg-filter-panel summary::-webkit-details-marker{display:none}
.tdg-filter-icon{font-size:25px;font-weight:400;line-height:1;transition:transform .2s ease}
.tdg-filter-panel[open] .tdg-filter-icon{transform:rotate(45deg)}
.tdg-filter-form{display:grid;grid-template-columns:2fr 1.3fr 1fr 1fr;gap:15px;padding:0 20px 20px}
.tdg-field{display:flex;flex-direction:column;gap:6px;margin:0;color:#5a4b4f;font-size:12px;font-weight:800;letter-spacing:.03em;text-transform:uppercase}
.tdg-field input,.tdg-field select{width:100%;height:44px;margin:0;padding:0 12px;border:1px solid #d9cdc4;border-radius:8px;background:#fff;color:var(--tdg-ink);font-size:15px;font-weight:500;text-transform:none;box-shadow:none}
.tdg-field input:focus,.tdg-field select:focus{border-color:var(--tdg-wine);outline:2px solid rgba(111,23,52,.12)}
.tdg-filter-checks{grid-column:1/4;display:flex;align-items:center;flex-wrap:wrap;gap:18px;color:#4f4346;font-size:14px}
.tdg-filter-checks label{display:flex;align-items:center;gap:7px;cursor:pointer}
.tdg-filter-checks input{accent-color:var(--tdg-wine)}
.tdg-filter-actions{display:flex;align-items:center;justify-content:flex-end;gap:15px}
.tdg-filter-actions .button{min-height:42px;padding:0 20px;border-radius:8px;background:var(--tdg-wine);color:#fff;font-weight:800}
.tdg-filter-actions .button:hover{background:var(--tdg-wine-dark)}
.tdg-filter-actions a{color:var(--tdg-wine);font-size:14px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.woocommerce ul.products li.product{position:relative}
.woocommerce ul.products li.product .ct-media-container,.woocommerce ul.products li.product>a.woocommerce-LoopProduct-link:first-child{border-radius:12px;overflow:hidden;background:#faf8f4}
.woocommerce ul.products li.product img{aspect-ratio:1/1;object-fit:contain;background:#faf8f4}
.woocommerce ul.products li.product .woocommerce-loop-product__title{line-height:1.3}
.tdg-card-badges{position:absolute;z-index:4;top:12px;left:12px;display:flex;flex-wrap:wrap;gap:6px;max-width:calc(100% - 24px);pointer-events:none}
.tdg-card-badge{display:inline-flex;padding:6px 9px;border-radius:999px;background:var(--tdg-wine);color:#fff;font-size:11px;font-weight:800;line-height:1;letter-spacing:.02em;box-shadow:0 3px 10px rgba(0,0,0,.12)}
.tdg-card-badge.is-order{background:#8d6b2b}
.tdg-card-badge.is-muted{background:#6c6668}
.single-product .summary .woocommerce-product-details__short-description{color:#4d4547;font-size:16px;line-height:1.7}
.tdg-more-description{margin-top:8px}
.tdg-more-description a{color:var(--tdg-wine);font-weight:800;text-decoration:underline;text-underline-offset:3px}
.tdg-product-reassurance{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:22px 0 4px}
.tdg-product-reassurance>div{min-width:0;padding:14px;border:1px solid var(--tdg-line);border-radius:10px;background:var(--tdg-cream)}
.tdg-product-reassurance strong,.tdg-product-reassurance span{display:block}
.tdg-product-reassurance strong{margin-bottom:4px;color:var(--tdg-wine-dark);font-size:13px;line-height:1.3}
.tdg-product-reassurance span{color:#64585b;font-size:12px;line-height:1.45}
.single-product .woocommerce-tabs{margin-top:42px}
.single-product .woocommerce-tabs .tabs li a{font-weight:800}
@media(max-width:999px){
 .tdg-filter-form{grid-template-columns:1fr 1fr}
 .tdg-search{grid-column:1/-1}
 .tdg-filter-checks{grid-column:1/-1}
 .tdg-filter-actions{grid-column:1/-1;justify-content:flex-start}
 .tdg-product-reassurance{grid-template-columns:1fr}
}
@media(max-width:689px){
 .tdg-category-shortcuts{gap:7px;margin-bottom:14px;overflow-x:auto;flex-wrap:nowrap;padding:0 0 5px;scrollbar-width:thin}
 .tdg-category-chip{flex:0 0 auto;padding:8px 12px;font-size:13px}
 .tdg-filter-panel{margin-bottom:20px;border-radius:11px}
 .tdg-filter-panel:not([open]) .tdg-filter-form{display:none}
 .tdg-filter-panel summary{padding:14px 15px;font-size:16px}
 .tdg-filter-form{grid-template-columns:1fr;gap:12px;padding:0 15px 16px}
 .tdg-search,.tdg-filter-checks,.tdg-filter-actions{grid-column:1}
 .tdg-filter-checks{align-items:flex-start;flex-direction:column;gap:10px}
 .tdg-filter-actions{justify-content:space-between}
 .tdg-filter-actions .button{flex:1}
 .woocommerce ul.products{row-gap:34px}
 .woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:17px}
 .tdg-card-badges{top:8px;left:8px}
 .tdg-card-badge{padding:5px 8px;font-size:10px}
 .single-product .summary .product_title{line-height:1.16}
 .single-product .summary .price{margin-top:10px}
 .tdg-product-reassurance{margin-top:18px}
 .single-product .woocommerce-tabs{margin-top:30px}
 .home .products li.product:nth-child(n+5){display:none!important}
 .home h1,.home h2{line-height:1.14}
 .home .wp-block-button__link,.home .button{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
}


/* Mobile product image viewer */
@media (max-width: 999.98px) and (pointer: coarse) {
  .single-product .woocommerce-product-gallery .ct-media-container {
    cursor: zoom-in;
    touch-action: manipulation;
  }
  .single-product .woocommerce-product-gallery .ct-media-container::after {
    content: "Tocca per ingrandire";
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(24, 24, 24, .72);
    font-size: 12px;
    line-height: 1;
    pointer-events: none;
  }
  .single-product .woocommerce-product-gallery .zoomImg { display: none !important; }
}
.tdg-image-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  color: #fff;
  background: rgba(10, 10, 10, .97);
  overscroll-behavior: contain;
}
.tdg-image-viewer.is-open { display: block; }
html.tdg-viewer-open, html.tdg-viewer-open body { overflow: hidden !important; }
.tdg-viewer-stage {
  position: absolute;
  inset: 64px 0 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  touch-action: none;
  user-select: none;
}
.tdg-viewer-image {
  display: block;
  max-width: 94vw;
  max-height: calc(100vh - 184px);
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center;
  will-change: transform;
  -webkit-user-drag: none;
  user-select: none;
}
.tdg-viewer-close {
  position: absolute;
  z-index: 2;
  top: max(12px, env(safe-area-inset-top));
  right: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.16);
  font-size: 32px;
  line-height: 40px;
}
.tdg-viewer-controls {
  position: absolute;
  left: 50%;
  bottom: max(48px, calc(env(safe-area-inset-bottom) + 38px));
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.tdg-viewer-controls button {
  min-width: 48px;
  height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  color: #fff;
  background: rgba(255,255,255,.14);
  font-size: 20px;
}
.tdg-viewer-help {
  position: absolute;
  right: 16px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 16px;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  text-align: center;
}

/* TDG brand states: bordeaux for actions and selected navigation */
:root {
  --theme-palette-color-1: #6f1734;
  --theme-palette-color-2: #4d0f24;
  --theme-link-hover-color: #4d0f24;
  --theme-button-background-initial-color: #6f1734;
  --theme-button-background-hover-color: #4d0f24;
  --theme-form-field-border-focus-color: #6f1734;
}

:is(.menu-item.current-menu-item, .menu-item.current-menu-ancestor, .menu-item.current_page_item, .menu-item.current_page_ancestor) > a,
.ct-header-menu .menu-item > a:hover,
.mobile-menu .menu-item > a:hover,
.woocommerce-tabs .tabs li.active a {
  color: var(--tdg-wine) !important;
}

:is(.button, .ct-button, .wp-element-button, button[type="submit"], input[type="button"], input[type="submit"]):not(.components-button):not([class*="paypal"]):not([class*="apple-pay"]):not([class*="google-pay"]) {
  --theme-button-background-initial-color: var(--tdg-wine);
  --theme-button-background-hover-color: var(--tdg-wine-dark);
  background-color: var(--tdg-wine);
  border-color: var(--tdg-wine);
  color: #fff;
}

:is(.button, .ct-button, .wp-element-button, button[type="submit"], input[type="button"], input[type="submit"]):not(.components-button):not([class*="paypal"]):not([class*="apple-pay"]):not([class*="google-pay"]):hover {
  background-color: var(--tdg-wine-dark);
  border-color: var(--tdg-wine-dark);
  color: #fff;
}

:is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--tdg-wine);
}

:is(.page-numbers.current, .woocommerce-pagination .current) {
  background: var(--tdg-wine) !important;
  border-color: var(--tdg-wine) !important;
  color: #fff !important;
}

:is(a, button, input, select, textarea):focus-visible {
  outline-color: var(--tdg-wine);
}
/* TDG compact internal page headings */
.hero-section[data-type="type-2"] {
  min-height: 108px !important;
  padding-top: 0 !important;
  background: #faf8f6 !important;
  border-bottom: 1px solid rgba(111, 23, 52, .12);
}

.hero-section[data-type="type-2"] > figure {
  background: #faf8f6 !important;
}

.hero-section[data-type="type-2"] > [class*="ct-container"] {
  align-items: flex-start !important;
  justify-content: center !important;
  text-align: left !important;
}

.hero-section[data-type="type-2"] .entry-header {
  width: 100%;
  margin: 0;
  text-align: left !important;
  --item-spacing: 8px;
}

.hero-section[data-type="type-2"] .page-title {
  margin: 0;
  color: var(--tdg-ink);
  font-size: clamp(30px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.hero-section[data-type="type-2"] .page-title::after {
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 11px;
  border-radius: 999px;
  background: var(--tdg-wine);
  content: "";
}

.hero-section[data-type="type-2"] .ct-breadcrumbs {
  margin-bottom: 7px;
  color: #6b6265;
  font-size: 12px;
}

@media (max-width: 689px) {
  .hero-section[data-type="type-2" {
    min-height: 82px !important;
  }

  .hero-section[data-type="type-2"] .page-title {
    font-size: clamp(25px, 8vw, 30px);
  }

  .hero-section[data-type="type-2"] .page-title::after {
    width: 38px;
    height: 2px;
    margin-top: 8px;
  }
}
/* Align compact headings with the central site container */
.hero-section[data-type="type-2"] > [class*="ct-container"] {
  width: var(--theme-container-width) !important;
  max-width: var(--theme-normal-container-max-width) !important;
  margin-inline: auto !important;
}
/* Final sizing and alignment for Blocksy type-2 headings */
.hero-section[data-type="type-2"] {
  min-height: 0 !important;
}

.hero-section[data-type="type-2"] > [class*="ct-container"] {
  width: calc(100% - 60px) !important;
  max-width: 1290px !important;
  min-height: 96px !important;
  margin-inline: auto !important;
  padding: 18px 0 !important;
  box-sizing: border-box;
}

@media (max-width: 689px) {
  .hero-section[data-type="type-2"] > [class*="ct-container"] {
    width: calc(100% - 30px) !important;
    min-height: 72px !important;
    padding: 13px 0 !important;
  }
}
/* TDG compact aligned page title - final verified rule */
.hero-section[data-type="type-2"] { min-height: 0 !important; }
.hero-section[data-type="type-2"] > [class*="ct-container"] { width: var(--theme-container-width) !important; max-width: 1290px !important; height: auto !important; min-height: 96px !important; margin-inline: auto !important; padding: 18px 0 !important; box-sizing: border-box !important; }
@media (max-width: 689px) { .hero-section[data-type="type-2"] > [class*="ct-container"] { width: calc(100% - 30px) !important; min-height: 72px !important; padding: 13px 0 !important; } }
