/* RC24.25.4: il comando Rigo commerciale > Nascondi prezzo governa anche il prezzo Hero. */
.cgk-pui10-hero-total-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  max-width: 340px;
  text-align: right;
}

.cgk-pui10-hero-total-label {
  color: rgba(255,255,255,.92);
  font-size: clamp(12px, 1.15vw, 15px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  text-shadow: 0 6px 18px rgba(0,0,0,.48);
  margin-bottom: 4px;
}

.cgk-pui10-hero-price {
  display: block !important;
}

body.single-product .product {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

body.single-product .product .summary {
  float: none !important;
  width: 100% !important;
  clear: both !important;
  margin: 0 !important;
}

/* Product UI: neutralizza lo spazio residuo lasciato dal breadcrumb/template WooCommerce sopra l'Hero. */
body.single-product .woocommerce-breadcrumb,
body.single-product nav.woocommerce-breadcrumb,
body.single-product .storefront-breadcrumb,
body.single-product .wp-block-woocommerce-breadcrumbs,
body.single-product .woocommerce-products-header {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.single-product main,
body.single-product .site-main,
body.single-product .wp-site-blocks > main,
body.single-product .wp-block-post-content,
body.single-product .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.single-product .woocommerce,
body.single-product .woocommerce-page {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.single-product .cgk-pui10-hero {
  margin-top: 0 !important;
}

.cgk-pui10-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 320px;
  position: relative;
  background-image: var(--cgk-pui10-hero);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.cgk-pui10-hero--clean { display: block; }

.cgk-pui10-hero__inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 320px;
  padding-top: 42px;
  box-sizing: border-box;
}

.cgk-pui10-hero__title {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 3.4vw, 50px);
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: -0.03em;
  text-shadow: 0 8px 26px rgba(0,0,0,.36);
}



.cgk-pui10-hero__category-desc {
  position: absolute;
  left: 0;
  right: 190px;
  top: 52%;
  transform: translateY(-42%);
  max-width: 660px;
  color: rgba(255,255,255,.94);
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.55;
  text-shadow: 0 6px 22px rgba(0,0,0,.45);
}

.cgk-pui10-hero__category-desc p {
  margin: 0;
}

.cgk-pui10-hero__product-image {
  position: absolute;
  right: 0;
  bottom: 36px;
  width: 150px;
  height: 150px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.42);
  background: rgba(255,255,255,.10);
  box-shadow: 0 16px 38px rgba(0,0,0,.24);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  backdrop-filter: blur(3px);
}

.cgk-pui10-hero__product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  box-sizing: border-box;
  display: block;
}

.cgk-pui10-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,22,34,.22);
  pointer-events: none;
}


.cgk-pui10-hero__actions {
  position: absolute;
  left: 0;
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.cgk-pui10-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(8,18,32,.35);
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  text-decoration: none !important;
  text-shadow: 0 3px 12px rgba(0,0,0,.35);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  backdrop-filter: blur(4px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.cgk-pui10-hero-btn:hover,
.cgk-pui10-hero-btn:focus {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.78);
  transform: translateY(-1px);
}

/* I tab WooCommerce vengono rimossi dalla pagina prodotto standard.
   Descrizione e recensioni sono accessibili dai pulsanti Hero in pagine pulite dedicate. */
body.single-product .woocommerce-tabs {
  display: none !important;
}

.cgk-pui10-card {
  width: min(1180px, calc(100% - 40px));
  margin: 34px auto 36px;
  padding: 24px 30px 30px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(20,35,55,.10);
  box-sizing: border-box;
}

.cgk-pui10-card__intro {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(31,48,71,.10);
}

.cgk-pui10-card__image {
  flex: 0 0 132px;
  width: 132px;
  height: 132px;
  border-radius: 16px;
  overflow: hidden;
  background: #f4f7fa;
  box-shadow: 0 12px 24px rgba(20,35,55,.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cgk-pui10-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 8px;
  box-sizing: border-box;
}

.cgk-pui10-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.cgk-pui10-card h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 2.5vw, 36px);
  line-height: 1.12;
  color: #1f3047;
  font-weight: 800;
}

.cgk-pui10-card p {
  margin: 0;
  color: #263b57;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.5;
  max-width: 920px;
}

.cgk-pui10-card__renderer {
  width: 100%;
}

.cgk-pui10-card__renderer .summary,
.cgk-pui10-card__renderer .cart,
.cgk-pui10-card__renderer form.cart,
.cgk-pui10-card__renderer .variations_form,
.cgk-pui10-card__renderer .cgk-ccc-rc-wrap,
.cgk-pui10-card__renderer .cgk-ccc-linked-composites,
.cgk-pui10-card__renderer .cgk-ccc-gallery,
.cgk-pui10-card__renderer .cgk-ccc-selected-options {
  max-width: 100%;
}

/* Il renderer WooCommerce/CCC resta originale: solo piccoli contenimenti visuali. */
.cgk-pui10-card__renderer table.variations {
  width: 100%;
}

@media (max-width: 768px) {
  .cgk-pui10-hero { min-height: 240px; }
  .cgk-pui10-hero__inner { width: calc(100% - 26px); min-height: 240px; padding-top: 24px; }
  .cgk-pui10-hero__category-desc { right: 150px; max-width: 520px; }
  .cgk-pui10-hero__product-image { width: 120px; height: 120px; bottom: 18px; border-radius: 18px; }
  .cgk-pui10-hero__actions { bottom: 18px; gap: 8px; flex-wrap: wrap; max-width: calc(100% - 145px); }
  .cgk-pui10-hero-btn { min-height: 34px; padding: 0 14px; font-size: 13px; }
  .cgk-pui10-card {
    width: calc(100% - 26px);
    margin-top: 22px;
    padding: 20px;
  }
  .cgk-pui10-card__intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  .cgk-pui10-card__image {
    width: 118px;
    height: 118px;
    flex-basis: 118px;
  }
}

@media (max-width: 480px) {
  .cgk-pui10-hero { min-height: 200px; }
  .cgk-pui10-hero__inner { min-height: 200px; padding-top: 20px; }
  .cgk-pui10-hero__category-desc { display: none; }
  .cgk-pui10-hero__product-image { width: 92px; height: 92px; bottom: 14px; border-radius: 15px; }
  .cgk-pui10-hero__actions { left: 0; right: 104px; bottom: 14px; max-width: none; gap: 6px; }
  .cgk-pui10-hero-btn { min-height: 30px; padding: 0 10px; font-size: 12px; }
  .cgk-pui10-hero__product-image img { padding: 0; }
  .cgk-pui10-card { padding: 18px; }
  .cgk-pui10-card__image {
    width: 106px;
    height: 106px;
    flex-basis: 106px;
  }
}


/* Pagine pulite Descrizione / Recensioni */
body.cgk-pui10-standalone-panel {
  background: #f4f6f8;
  color: #1f3047;
}

.cgk-pui10-panel-page {
  min-height: 100vh;
  padding: 42px 20px;
  box-sizing: border-box;
}

.cgk-pui10-panel-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  padding: 34px 40px 42px;
  box-shadow: 0 18px 42px rgba(20,35,55,.10);
  box-sizing: border-box;
}

.cgk-pui10-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: #ff6a21;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
}

.cgk-pui10-panel-shell h1 {
  margin: 0 0 24px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  color: #1f3047;
}

.cgk-pui10-panel-content {
  font-size: 17px;
  line-height: 1.7;
}

.cgk-pui10-panel-content p {
  margin: 0 0 18px;
}

body.cgk-pui10-standalone-panel .woocommerce-tabs {
  display: block !important;
}

@media (max-width: 640px) {
  .cgk-pui10-panel-page { padding: 24px 14px; }
  .cgk-pui10-panel-shell { padding: 24px 20px 30px; border-radius: 16px; }
}

/* v1.1.5 - Prezzo prodotto/variante nella Hero, a sinistra della miniatura */
.cgk-pui10-hero__product-side {
  position: absolute;
  right: 0;
  bottom: 36px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  z-index: 2;
}

.cgk-pui10-hero__product-side .cgk-pui10-hero__product-image {
  position: static;
  right: auto;
  bottom: auto;
  flex: 0 0 150px;
}

.cgk-pui10-hero-price {
  color: #fff;
  font-weight: 800;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.05;
  text-align: right;
  text-shadow: 0 8px 24px rgba(0,0,0,.48);
  white-space: nowrap;
  margin-bottom: 8px;
}

.cgk-pui10-hero-price .amount,
.cgk-pui10-hero-price bdi {
  color: #fff;
}

.cgk-pui10-hero-price small,
.cgk-pui10-hero-price .woocommerce-Price-currencySymbol {
  color: rgba(255,255,255,.95);
}

@media (max-width: 768px) {
  .cgk-pui10-hero__product-side {
    bottom: 18px;
    gap: 12px;
  }
  .cgk-pui10-hero__product-side .cgk-pui10-hero__product-image {
    flex-basis: 120px;
  }
  .cgk-pui10-hero-price {
    font-size: 18px;
    margin-bottom: 6px;
  }
}

@media (max-width: 480px) {
  .cgk-pui10-hero__product-side {
    right: 0;
    bottom: 14px;
    gap: 8px;
  }
  .cgk-pui10-hero__product-side .cgk-pui10-hero__product-image {
    flex-basis: 92px;
  }
  .cgk-pui10-hero-price {
    font-size: 14px;
    max-width: 140px;
    white-space: normal;
  }
}

/* v1.1.6 - Rifinitura Hero finale: titolo meno invasivo, più respiro verticale, distanza descrizione/pulsanti. */


/* v1.1.9 - Hero prodotto full-width: compatibilità WordPress standard / WooCommerce puro.
   Mantiene il contenuto centrato ma forza il banner a uscire dal container del tema. */
body.single-product .site-main,
body.single-product .content-area,
body.single-product div.product {
  overflow: visible !important;
}

body.single-product .cgk-pui10-hero {
  width: 100vw !important;
  max-width: 100vw !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  min-height: 360px;
  background-size: cover !important;
  background-position: center center !important;
}

body.single-product .cgk-pui10-hero__inner {
  width: min(1180px, calc(100vw - 48px));
  min-height: 360px;
}

body.single-product .cgk-pui10-hero__title {
  padding-left: 0;
  max-width: calc(100% - 210px);
}

@media (max-width: 768px) {
  body.single-product .cgk-pui10-hero { min-height: 260px; }
  body.single-product .cgk-pui10-hero__inner { width: calc(100vw - 28px); min-height: 260px; }
  body.single-product .cgk-pui10-hero__title { max-width: calc(100% - 150px); }
}

@media (max-width: 480px) {
  body.single-product .cgk-pui10-hero { min-height: 220px; }
  body.single-product .cgk-pui10-hero__inner { width: calc(100vw - 22px); min-height: 220px; }
  body.single-product .cgk-pui10-hero__title { max-width: 100%; font-size: 28px; }
}

/* v1.1.8 - Layout prodotto a due colonne: immagine sinistra, contenuti a destra, rigo commerciale sotto */
.cgk-pui10-product-layout {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  column-gap: 30px;
  align-items: start;
}

.cgk-pui10-product-layout > .cgk-pui10-card__image {
  grid-column: 1;
  grid-row: 1;
}

.cgk-pui10-card__content {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.cgk-pui10-card__content .cgk-pui10-card__intro {
  display: block;
  margin: 0 0 22px;
  padding: 0 0 22px;
  border-bottom: 1px solid rgba(31,48,71,.10);
}

.cgk-pui10-card__content .cgk-pui10-card__body {
  width: 100%;
}

.cgk-pui10-card__renderer .variations,
.cgk-pui10-card__renderer .woocommerce-variation-description,
.cgk-pui10-card__renderer .single_variation,
.cgk-pui10-card__renderer .woocommerce-variation,
.cgk-pui10-card__renderer form.cart > .variations,
.cgk-pui10-card__renderer form.cart > .single_variation_wrap {
  max-width: 100%;
}

.cgk-pui10-card__renderer .cgk-ccc-commercial-row,
.cgk-pui10-card__renderer .cgk-ccc-rc-wrap,
.cgk-pui10-card__renderer .cgk-ccc-selected-options,
.cgk-pui10-card__renderer form.cart > button.single_add_to_cart_button,
.cgk-pui10-card__renderer form.cart > .button {
  margin-left: calc(-132px - 30px);
  width: calc(100% + 132px + 30px);
  max-width: none;
}

.cgk-pui10-card__renderer .cgk-ccc-commercial-row,
.cgk-pui10-card__renderer .cgk-ccc-rc-wrap {
  margin-top: 24px;
}

@media (max-width: 768px) {
  .cgk-pui10-product-layout {
    display: block;
  }
  .cgk-pui10-product-layout > .cgk-pui10-card__image {
    margin-bottom: 16px;
  }
  .cgk-pui10-card__renderer .cgk-ccc-commercial-row,
  .cgk-pui10-card__renderer .cgk-ccc-rc-wrap,
  .cgk-pui10-card__renderer .cgk-ccc-selected-options,
  .cgk-pui10-card__renderer form.cart > button.single_add_to_cart_button,
  .cgk-pui10-card__renderer form.cart > .button {
    margin-left: 0;
    width: 100%;
  }
}


/* v1.2.1 - Immagine prodotto dentro il box principale, layout unificato */
.cgk-pui10-product-layout {
  display: block !important;
}

.cgk-pui10-card__content {
  display: block !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

.cgk-pui10-card__intro {
  display: flex !important;
  align-items: flex-start !important;
  gap: 24px !important;
  margin: 0 0 24px !important;
  padding: 0 0 22px !important;
  border-bottom: 1px solid rgba(31,48,71,.10) !important;
}

.cgk-pui10-card__image {
  flex: 0 0 116px !important;
  width: 116px !important;
  height: 116px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid rgba(31,48,71,.12) !important;
  box-shadow: 0 10px 22px rgba(20,35,55,.06) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.cgk-pui10-card__image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  padding: 8px !important;
  box-sizing: border-box !important;
}

.cgk-pui10-card__body {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.cgk-pui10-card__renderer .cgk-ccc-commercial-row,
.cgk-pui10-card__renderer .cgk-ccc-rc-wrap,
.cgk-pui10-card__renderer .cgk-ccc-selected-options,
.cgk-pui10-card__renderer form.cart > button.single_add_to_cart_button,
.cgk-pui10-card__renderer form.cart > .button {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 768px) {
  .cgk-pui10-card__intro {
    gap: 16px !important;
  }
  .cgk-pui10-card__image {
    flex-basis: 96px !important;
    width: 96px !important;
    height: 96px !important;
  }
}

@media (max-width: 520px) {
  .cgk-pui10-card__intro {
    flex-direction: column !important;
  }
}


/* Product UI 1.2.2 - normalizzazione tema/WooCommerce senza toccare CCC */
body.single-product .woocommerce-breadcrumb,
body.single-product nav.woocommerce-breadcrumb {
  display: none !important;
}

body.single-product .wp-site-blocks,
body.single-product main,
body.single-product .site-main {
  margin-top: 0;
}

body.single-product .cgk-pui10-card__renderer > .summary {
  padding-top: 0 !important;
}

body.single-product .cgk-pui10-card__renderer .product_title,
body.single-product .cgk-pui10-card__renderer .woocommerce-product-details__short-description,
body.single-product .cgk-pui10-card__renderer .price {
  display: none !important;
}

body.single-product .cgk-pui10-card__intro + .cgk-pui10-card__renderer {
  margin-top: 0;
}

@media (max-width: 782px) {
  .cgk-pui10-card {
    width: min(100% - 24px, 1180px);
    padding: 18px 16px 22px;
    border-radius: 18px;
  }

  .cgk-pui10-card__intro {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 18px;
  }

  .cgk-pui10-card__image {
    flex-basis: 92px;
    width: 92px;
    height: 92px;
    border-radius: 14px;
  }
}

/* v1.3.0 - Renderer Engine: Product UI diventa il template prodotto.
   Il tema mantiene solo header/footer; WooCommerce/CCC vengono renderizzati dentro la card. */
body.single-product .cgk-pui10-renderer-page {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
}

body.single-product .cgk-pui10-renderer-page > .cgk-pui10-hero {
  margin-top: 0 !important;
}

body.single-product .cgk-pui10-renderer-summary {
  width: 100%;
  margin: 0;
  padding: 0;
}

body.single-product .cgk-pui10-renderer-summary .summary,
body.single-product .cgk-pui10-renderer-summary form.cart,
body.single-product .cgk-pui10-renderer-summary .variations_form {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  clear: both !important;
}

body.single-product .cgk-pui10-renderer-after {
  width: min(1180px, calc(100% - 40px));
  margin: 26px auto 56px;
  padding: 0;
}

body.single-product .cgk-pui10-renderer-after .related.products,
body.single-product .cgk-pui10-renderer-after .upsells.products {
  margin-top: 0;
}

body.single-product .cgk-pui10-renderer-after .woocommerce-tabs {
  display: none !important;
}

/* Evita spazi fantasma dei template prodotto standard quando il tema prova comunque a stilare il contenitore. */
body.single-product .wp-site-blocks > .cgk-pui10-renderer-page,
body.single-product .site > .cgk-pui10-renderer-page {
  margin-block-start: 0 !important;
}


/* v1.3.11 Stable Candidate: controlli admin e migrazione campi in test protetto. */
body.single-product .cgk-pui10-hero {
  min-height: var(--cgk-pui-hero-height, 360px) !important;
}
body.single-product .cgk-pui10-hero__inner {
  min-height: var(--cgk-pui-hero-height, 360px) !important;
}
body.single-product .cgk-pui10-card {
  width: min(var(--cgk-pui-card-width, 1180px), calc(100% - 40px)) !important;
  margin-top: var(--cgk-pui-card-top, 34px) !important;
}

/* Hook Safe: non rimuoviamo più gli hook WooCommerce, ma nascondiamo solo le parti già ridisegnate dalla card. */
.cgk-pui10-card__renderer > .product_title,
.cgk-pui10-card__renderer > .woocommerce-product-rating,
.cgk-pui10-card__renderer > .price,
.cgk-pui10-card__renderer > .woocommerce-product-details__short-description {
  display: none !important;
}

/* Evita che eventuali wrapper WooCommerce residui allarghino o spostino la card. */
.cgk-pui10-card__renderer .summary.entry-summary {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  clear: both !important;
}


/* v1.4.1 - Contenimento responsive scheda: la larghezza percentuale decide la scheda,
   CCC resta invariato ma può scorrere orizzontalmente dentro il renderer se un campo è troppo largo. */
body.single-product .cgk-pui10-card {
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.single-product .cgk-pui10-card__renderer {
  max-width: 100% !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
body.single-product .cgk-pui10-card__renderer * {
  box-sizing: border-box;
}
@media (max-width: 480px) {
  body.single-product .cgk-pui10-card__renderer table,
  body.single-product .cgk-pui10-card__renderer .variations,
  body.single-product .cgk-pui10-card__renderer form.cart {
    max-width: 100% !important;
  }
}

/* v1.4.6 - Product UI mobile shell: solo contenitore/scheda, CCC invariato. */
@media (max-width: 480px) {
  body.single-product .cgk-pui10-card {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    overflow: hidden !important;
  }

  body.single-product .cgk-pui10-card__intro {
    margin-bottom: 10px !important;
    padding-bottom: 14px !important;
  }

  body.single-product .cgk-pui10-card__body h2 {
    margin-bottom: 8px !important;
  }

  body.single-product .cgk-pui10-card__body p {
    line-height: 1.45 !important;
  }

  body.single-product .cgk-pui10-card__renderer {
    margin-top: 8px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Product UI prepara il contenitore: i colori e la grafica commerciale restano CCC. */
  body.single-product .cgk-pui10-card__renderer > *:first-child {
    margin-top: 0 !important;
  }
}

/* RC24.25.5 — Hero categoria/prodotto: centratura uniforme e rapporto 1600×544. */
body.single-product .cgk-pui10-hero {
  background-repeat: no-repeat !important;
  background-position: 50% 50% !important;
  min-height: clamp(420px, 34vw, 650px) !important;
}
body.single-product .cgk-pui10-hero__inner {
  min-height: clamp(420px, 34vw, 650px) !important;
}
@media (min-width: 1025px) {
  body.single-product .cgk-pui10-hero {
    background-size: 100% auto !important;
  }
}
@media (max-width: 1024px) {
  body.single-product .cgk-pui10-hero {
    min-height: 390px !important;
    background-size: cover !important;
    background-position: 50% 50% !important;
  }
  body.single-product .cgk-pui10-hero__inner {
    min-height: 390px !important;
  }
}
@media (max-width: 768px) {
  body.single-product .cgk-pui10-hero {
    min-height: 280px !important;
    background-position: 50% 50% !important;
  }
  body.single-product .cgk-pui10-hero__inner {
    min-height: 280px !important;
    padding-top: 24px !important;
  }
  body.single-product .cgk-pui10-hero__title {
    max-width: calc(100% - 118px) !important;
    font-size: clamp(25px, 7vw, 32px) !important;
    line-height: 1.04 !important;
  }
}
@media (max-width: 480px) {
  body.single-product .cgk-pui10-hero {
    min-height: 250px !important;
    background-size: cover !important;
    background-position: 50% 50% !important;
  }
  body.single-product .cgk-pui10-hero__inner {
    min-height: 250px !important;
    width: calc(100vw - 24px) !important;
    padding-top: 20px !important;
  }
  body.single-product .cgk-pui10-hero__title {
    max-width: calc(100% - 104px) !important;
    font-size: 26px !important;
  }
}

/* RC24.25.6: governance titolo Hero prodotto. */
.cgk-pui10-hero__title--hidden{display:none!important;}

/* RC24.25.6: stesso punto focale della Hero categoria. */
body.single-product .cgk-pui10-hero{background-position:50% 50%!important;background-repeat:no-repeat!important;}

/* RC24.25.8 — Hero categoria e Hero prodotto con la stessa geometria.
 * Le regole hanno specificità maggiore del CSS responsive configurabile di Product UI,
 * così il contenitore prodotto replica realmente altezza, rapporto e punto focale della categoria. */
@media (min-width:1025px){
  html body.single-product .cgk-pui10-hero{
    height:clamp(420px,34vw,650px)!important;
    min-height:clamp(420px,34vw,650px)!important;
    background-size:100% auto!important;
    background-position:50% 50%!important;
    background-position-x:50%!important;
    background-position-y:50%!important;
  }
  html body.single-product .cgk-pui10-hero__inner{
    height:100%!important;
    min-height:100%!important;
  }
}
@media (min-width:769px) and (max-width:1024px){
  html body.single-product .cgk-pui10-hero{
    height:390px!important;
    min-height:390px!important;
    background-size:cover!important;
    background-position:50% 50%!important;
    background-position-x:50%!important;
    background-position-y:50%!important;
  }
  html body.single-product .cgk-pui10-hero__inner{
    height:100%!important;
    min-height:100%!important;
  }
}
@media (max-width:768px){
  html body.single-product .cgk-pui10-hero{
    height:280px!important;
    min-height:280px!important;
    background-size:cover!important;
    background-position:50% 50%!important;
    background-position-x:50%!important;
    background-position-y:50%!important;
  }
  html body.single-product .cgk-pui10-hero__inner{
    height:100%!important;
    min-height:100%!important;
  }
}
@media (max-width:480px){
  html body.single-product .cgk-pui10-hero{
    height:250px!important;
    min-height:250px!important;
  }
}

/* RC24.26 — Unified Hero Engine.
 * Categoria e prodotto condividono la stessa geometria e lo stesso punto focale.
 * Le vecchie regolazioni Product UI restano salvate, ma non alterano più il contenitore Hero. */
html body .cgk-unified-hero-engine{
  --cgk-unified-hero-height:clamp(420px,34vw,650px);
  --cgk-unified-hero-bg-size:100% auto;
  width:100vw!important;
  max-width:100vw!important;
  min-height:var(--cgk-unified-hero-height)!important;
  height:var(--cgk-unified-hero-height)!important;
  background-size:var(--cgk-unified-hero-bg-size)!important;
  background-position:50% 50%!important;
  background-repeat:no-repeat!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
html body.single-product .cgk-unified-hero-engine .cgk-pui10-hero__inner{
  min-height:100%!important;
  height:100%!important;
  box-sizing:border-box!important;
}
@media (min-width:769px) and (max-width:1024px){
  html body .cgk-unified-hero-engine{
    --cgk-unified-hero-height:390px;
    --cgk-unified-hero-bg-size:cover;
  }
}
@media (max-width:768px){
  html body .cgk-unified-hero-engine{
    --cgk-unified-hero-height:280px;
    --cgk-unified-hero-bg-size:cover;
  }
}
@media (max-width:480px){
  html body .cgk-unified-hero-engine{
    --cgk-unified-hero-height:250px;
  }
}

.cgk-pui10-hero-total-wrap .cgk-pui10-hero-price{display:block!important;margin-top:3px;margin-bottom:8px;}

body.single-product.cgk-ccc-rc-hide-price .cgk-pui10-hero-total-wrap{display:none!important;}


/* RC24.32.0 — UI Refinement Step 1
 * Hero prodotto più compatta e miniatura più leggibile sullo sfondo. */
html body.single-product .cgk-unified-hero-engine{
  --cgk-unified-hero-height:clamp(340px,25vw,420px)!important;
}
html body.single-product .cgk-pui10-hero__product-image,
html body.single-product .cgk-pui10-hero__product-side .cgk-pui10-hero__product-image{
  border:3px solid rgba(255,255,255,.96)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.34),0 0 0 1px rgba(255,255,255,.18)!important;
  box-sizing:border-box!important;
}
@media (min-width:769px) and (max-width:1024px){
  html body.single-product .cgk-unified-hero-engine{
    --cgk-unified-hero-height:330px!important;
  }
}
@media (max-width:768px){
  html body.single-product .cgk-unified-hero-engine{
    --cgk-unified-hero-height:260px!important;
  }
}
@media (max-width:480px){
  html body.single-product .cgk-unified-hero-engine{
    --cgk-unified-hero-height:230px!important;
  }
}

/* RC24.32.1 — UI Refinement Step 1B
 * Ulteriore riduzione dell'altezza Hero prodotto, senza modificare il layout interno. */
html body.single-product .cgk-unified-hero-engine{
  --cgk-unified-hero-height:clamp(300px,22vw,340px)!important;
}
@media (min-width:769px) and (max-width:1024px){
  html body.single-product .cgk-unified-hero-engine{
    --cgk-unified-hero-height:290px!important;
  }
}
@media (max-width:768px){
  html body.single-product .cgk-unified-hero-engine{
    --cgk-unified-hero-height:240px!important;
  }
}
@media (max-width:480px){
  html body.single-product .cgk-unified-hero-engine{
    --cgk-unified-hero-height:210px!important;
  }
}

/* RC24.32.2 — UI Refinement Step 2
   Centratura verticale e orizzontale dei contenuti descrittivi.
   Intervento esclusivamente grafico: nessuna modifica alla logica WooCommerce/CCC. */
body.single-product .cgk-pui10-card__intro {
  align-items: center !important;
}

body.single-product .cgk-pui10-card__body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-self: stretch !important;
  text-align: center !important;
}

body.single-product .cgk-pui10-card__body h2,
body.single-product .cgk-pui10-card__body p {
  width: 100% !important;
  max-width: none !important;
  text-align: center !important;
}

/* Descrizione della variante selezionata. */
body.single-product .cgk-pui10-card__renderer .woocommerce-variation-description {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 68px;
  text-align: center !important;
}

body.single-product .cgk-pui10-card__renderer .woocommerce-variation-description > * {
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

/* Prodotti composti: immagine e contenuti centrati tramite Flexbox. */
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-head {
  display: flex !important;
  align-items: center !important;
}

body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-text {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-self: stretch !important;
  text-align: center !important;
}

body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product-title,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc p {
  width: 100%;
  text-align: center !important;
}

@media (max-width: 520px) {
  body.single-product .cgk-pui10-card__intro {
    align-items: center !important;
  }

  body.single-product .cgk-pui10-card__image {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-head {
    flex-direction: column !important;
  }
}

/* RC24.32.3 — UI Refinement Step 3
 * Ripristino del flusso verticale, rimozione del link "Svuota" e compattazione spazi. */
body.single-product .cgk-pui10-card__renderer form.variations_form,
body.single-product .cgk-pui10-card__renderer .single_variation_wrap,
body.single-product .cgk-pui10-card__renderer .single_variation,
body.single-product .cgk-pui10-card__renderer .woocommerce-variation,
body.single-product .cgk-pui10-card__renderer .woocommerce-variation-description {
  display:flex !important;
  flex-direction:column !important;
  width:100% !important;
}
body.single-product .cgk-pui10-card__renderer .reset_variations {
  display:none !important;
}
body.single-product .cgk-pui10-card {
  margin-top:12px !important;
  padding-top:16px !important;
  padding-bottom:16px !important;
}
body.single-product .cgk-pui10-card__intro {
  margin-bottom:10px !important;
  padding-bottom:10px !important;
}
body.single-product .cgk-pui10-card__renderer table.variations,
body.single-product .cgk-pui10-card__renderer .woocommerce-variation-description,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-rc-wrap,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-composites,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-options-gallery {
  margin-top:10px !important;
  margin-bottom:10px !important;
}
body.single-product .cgk-pui10-card__renderer .woocommerce-variation-description {
  min-height:0 !important;
  padding-top:4px !important;
  padding-bottom:4px !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-head {
  flex-direction:column !important;
  align-items:center !important;
  text-align:center !important;
}

/* RC24.32.4 — UI Refinement Step 4
 * Compattazione verticale mirata della scheda prodotto.
 * Nessuna modifica alla logica WooCommerce, varianti, composti o checkout. */
body.single-product .cgk-pui10-card{
  margin-top:4px !important;
  margin-bottom:20px !important;
  padding:14px 20px 18px !important;
}
body.single-product .cgk-pui10-card__intro{
  gap:16px !important;
  margin-bottom:8px !important;
  padding-bottom:8px !important;
}
body.single-product .cgk-pui10-card__image{
  flex-basis:104px !important;
  width:104px !important;
  height:104px !important;
}
body.single-product .cgk-pui10-card__body h2{
  margin-bottom:4px !important;
}
body.single-product .cgk-pui10-card__renderer form.cart,
body.single-product .cgk-pui10-card__renderer form.variations_form,
body.single-product .cgk-pui10-card__renderer .single_variation_wrap,
body.single-product .cgk-pui10-card__renderer .single_variation,
body.single-product .cgk-pui10-card__renderer .woocommerce-variation{
  margin-top:0 !important;
  margin-bottom:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  gap:0 !important;
}
body.single-product .cgk-pui10-card__renderer table.variations{
  margin:0 0 4px !important;
  border-spacing:0 !important;
}
body.single-product .cgk-pui10-card__renderer table.variations tr{
  margin:0 !important;
}
body.single-product .cgk-pui10-card__renderer table.variations td,
body.single-product .cgk-pui10-card__renderer table.variations th{
  padding:2px 4px !important;
}
body.single-product .cgk-pui10-card__renderer .woocommerce-variation-description{
  margin:4px 0 6px !important;
  padding:0 !important;
  line-height:1.45 !important;
}
body.single-product .cgk-pui10-card__renderer .woocommerce-variation-description p{
  margin:0 !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-rc-wrap,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-commercial-row,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-composites,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-options-gallery,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-selected-options{
  margin-top:6px !important;
  margin-bottom:6px !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product{
  margin-top:4px !important;
  margin-bottom:4px !important;
  padding-top:8px !important;
  padding-bottom:8px !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-head{
  gap:6px !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc p{
  margin-top:2px !important;
  margin-bottom:2px !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-options-gallery{
  padding-top:10px !important;
  padding-bottom:10px !important;
}
@media (max-width:768px){
  body.single-product .cgk-pui10-card{
    margin-top:2px !important;
    padding:12px 14px 16px !important;
  }
  body.single-product .cgk-pui10-card__intro{
    gap:10px !important;
    margin-bottom:6px !important;
    padding-bottom:6px !important;
  }
  body.single-product .cgk-pui10-card__image{
    flex-basis:88px !important;
    width:88px !important;
    height:88px !important;
  }
}

/* RC24.32.5 — UI Normalization Step 5
 * Ritmo verticale uniforme e prodotti composti in assetto orizzontale:
 * miniatura a sinistra, contenuti e rigo commerciale flex centrati. */
body.single-product .cgk-pui10-card{
  margin-top:0 !important;
  margin-bottom:14px !important;
  padding:10px 16px 14px !important;
}
body.single-product .cgk-pui10-card__intro{
  gap:12px !important;
  margin:0 0 6px !important;
  padding:0 0 6px !important;
}
body.single-product .cgk-pui10-card__body h2,
body.single-product .cgk-pui10-card__body p{
  margin-top:0 !important;
  margin-bottom:3px !important;
}
body.single-product .cgk-pui10-card__renderer table.variations{
  margin:0 !important;
}
body.single-product .cgk-pui10-card__renderer .woocommerce-variation-description{
  margin:2px 0 4px !important;
  padding:0 !important;
  min-height:0 !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-rc-wrap,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-commercial-row,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-composites,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-options-gallery,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-selected-options{
  margin-top:4px !important;
  margin-bottom:4px !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-commercial-row{
  padding-top:8px !important;
  padding-bottom:8px !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-composites,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-composites-inside-main{
  width:100% !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:10px 14px !important;
  margin:4px 0 !important;
  padding:8px 10px !important;
  min-height:0 !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-head,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact .cgk-ccc-linked-head{
  display:flex !important;
  flex:1 1 330px !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:10px !important;
  margin:0 !important;
  min-width:240px !important;
  text-align:left !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-thumb,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact .cgk-ccc-linked-thumb{
  width:58px !important;
  height:58px !important;
  flex:0 0 58px !important;
  margin:0 !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-text{
  display:flex !important;
  flex:1 1 auto !important;
  flex-direction:column !important;
  justify-content:center !important;
  align-items:flex-start !important;
  min-width:0 !important;
  text-align:left !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product-title,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc p{
  width:100% !important;
  margin:0 !important;
  text-align:left !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc{
  margin-top:2px !important;
  line-height:1.35 !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact .cgk-ccc-linked-row{
  display:flex !important;
  flex:1 1 520px !important;
  align-items:center !important;
  justify-content:center !important;
  flex-wrap:wrap !important;
  gap:8px 12px !important;
  margin:0 !important;
  padding:7px 8px !important;
  min-width:280px !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-custom-fields,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-vars-area{
  margin:2px 0 0 !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-block-title{
  margin:5px 0 !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-options-gallery{
  padding-top:7px !important;
  padding-bottom:7px !important;
}
@media (max-width:768px){
  body.single-product .cgk-pui10-card{
    padding:9px 12px 12px !important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact{
    gap:8px !important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-head,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact .cgk-ccc-linked-head{
    flex-basis:100% !important;
    min-width:0 !important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact .cgk-ccc-linked-row{
    flex-basis:100% !important;
    min-width:0 !important;
  }
}

/* RC24.32.6 — UI Normalization Step 6
 * Prodotto composto nuovamente in colonna:
 * testata con miniatura a sinistra, rigo commerciale sotto, entrambi centrati. */
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact{
  flex-direction:column !important;
  align-items:stretch !important;
  flex-wrap:nowrap !important;
  gap:6px !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-head,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact .cgk-ccc-linked-head{
  width:100% !important;
  flex:0 0 auto !important;
  min-width:0 !important;
}
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row,
body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact .cgk-ccc-linked-row{
  width:100% !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  justify-content:center !important;
}


/* RC24.32.7 — UI Options Centering Step 7
 * Solo centratura grafica del blocco "Prodotti opzioni".
 */
body.cgk-ccc-rc-active.single-product .cgk-ccc-options-gallery-title{
  text-align:center!important;
}
body.cgk-ccc-rc-active.single-product .cgk-ccc-options-gallery-grid{
  justify-content:center!important;
  align-items:stretch!important;
}
body.cgk-ccc-rc-active.single-product .cgk-ccc-gallery-selected-options{
  text-align:center!important;
}

/* RC24.36.1 — Correzione Hero prodotto dopo test mobile.
 * Riduzione prudente su desktop; geometria mobile protetta da sovrapposizioni.
 * Nessuna modifica a Product Builder, CCC, prezzi o logica commerciale. */
@media (min-width:1025px){
  html body.single-product .cgk-unified-hero-engine{
    --cgk-unified-hero-height:clamp(290px,20vw,320px)!important;
  }
}

@media (min-width:769px) and (max-width:1024px){
  html body.single-product .cgk-unified-hero-engine{
    --cgk-unified-hero-height:280px!important;
  }
}

/* Su mobile conserviamo l'altezza stabile già collaudata e disponiamo
 * costo/prezzo sopra la miniatura, liberando la fascia delle pillole. */
@media (max-width:768px){
  html body.single-product .cgk-unified-hero-engine{
    --cgk-unified-hero-height:240px!important;
  }
}

@media (max-width:480px){
  html body.single-product .cgk-unified-hero-engine{
    --cgk-unified-hero-height:210px!important;
  }
  html body.single-product .cgk-pui10-hero__product-side{
    right:4px!important;
    bottom:10px!important;
    width:96px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    gap:4px!important;
  }
  html body.single-product .cgk-pui10-hero-total-wrap{
    width:96px!important;
    max-width:96px!important;
    align-items:center!important;
    text-align:center!important;
  }
  html body.single-product .cgk-pui10-hero-total-label{
    width:96px!important;
    max-width:96px!important;
    margin:0 0 2px!important;
    font-size:10px!important;
    line-height:1.1!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    text-align:center!important;
  }
  html body.single-product .cgk-pui10-hero-total-wrap .cgk-pui10-hero-price{
    margin:0!important;
    font-size:13px!important;
    line-height:1.05!important;
    white-space:normal!important;
    text-align:center!important;
  }
  html body.single-product .cgk-pui10-hero__product-side .cgk-pui10-hero__product-image{
    width:86px!important;
    height:86px!important;
    flex:0 0 86px!important;
  }
  html body.single-product .cgk-pui10-hero__actions{
    left:0!important;
    right:104px!important;
    bottom:12px!important;
    max-width:calc(100% - 108px)!important;
    gap:5px!important;
    flex-wrap:nowrap!important;
  }
  html body.single-product .cgk-pui10-hero-btn,
  html body.single-product .cgk-pui10-hero__actions a.cgk-pui10-hero-btn{
    min-height:29px!important;
    padding:0 8px!important;
    font-size:11px!important;
    white-space:nowrap!important;
  }
}

/* RC24.36.2 — Product Builder mobile compact.
 * Solo layout: meno spazi verticali, peso tipografico più leggero e righi
 * commerciali organizzati in tre livelli. Nessuna modifica alla logica CCC. */
@media (max-width:768px){
  body.single-product .cgk-pui10-card{
    padding:8px 10px 12px!important;
    margin-bottom:10px!important;
  }
  body.single-product .cgk-pui10-card__intro{
    gap:6px!important;
    margin:0 0 4px!important;
    padding:0 0 5px!important;
  }
  body.single-product .cgk-pui10-card__body h2{
    font-size:22px!important;
    line-height:1.15!important;
    font-weight:700!important;
    margin:0 0 2px!important;
  }
  body.single-product .cgk-pui10-card__body p,
  body.single-product .cgk-pui10-card__renderer,
  body.single-product .cgk-pui10-card__renderer p{
    font-weight:400!important;
  }
  body.single-product .cgk-pui10-card__renderer table.variations th,
  body.single-product .cgk-pui10-card__renderer table.variations td{
    padding:2px!important;
  }
  body.single-product .cgk-pui10-card__renderer table.variations label{
    margin-bottom:3px!important;
    font-weight:650!important;
  }
  body.single-product .cgk-pui10-card__renderer .reset_variations,
  body.single-product .cgk-pui10-card__renderer a.reset_variations{
    display:none!important;
  }

  /* Rigo commerciale principale: 1) quantità + costo unitario,
     2) totale, 3) pillole. */
  body.cgk-ccc-rc-active.single-product .cgk-pui10-card__renderer .cgk-ccc-commercial-row{
    display:grid!important;
    grid-template-columns:88px minmax(0,1fr) minmax(0,1fr)!important;
    align-items:center!important;
    justify-items:center!important;
    gap:5px 7px!important;
    padding:8px!important;
    margin:4px 0!important;
  }
  body.cgk-ccc-rc-active.single-product .cgk-ccc-commercial-row > .quantity{
    grid-column:1!important;
    grid-row:1!important;
  }
  body.cgk-ccc-rc-active.single-product .cgk-ccc-commercial-row > .cgk-ccc-rc-unit{
    grid-column:2 / 4!important;
    grid-row:1!important;
    width:100%!important;
    text-align:center!important;
  }
  body.cgk-ccc-rc-active.single-product .cgk-ccc-commercial-row > .cgk-ccc-rc-total{
    grid-column:1 / -1!important;
    grid-row:2!important;
    width:100%!important;
    text-align:center!important;
  }
  body.cgk-ccc-rc-active.single-product .cgk-ccc-commercial-row > .cgk-ccc-rc-pill,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-commercial-row > .cgk-ccc-rc-quote-button{
    grid-row:3!important;
    align-self:center!important;
  }
  body.cgk-ccc-rc-active.single-product .cgk-ccc-commercial-row > .cgk-ccc-linked-composites-inside-main,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-commercial-row > .cgk-ccc-rc-add-panel{
    grid-column:1 / -1!important;
    width:100%!important;
  }

  /* Selettore quantità più piccolo. */
  body.cgk-ccc-rc-active.single-product .cgk-ccc-commercial-row .quantity.cgk-ccc-qty-normalized .cgk-ccc-qty-minus,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-commercial-row .quantity.cgk-ccc-qty-normalized .cgk-ccc-qty-plus,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-linked-quantity .cgk-ccc-linked-minus,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-linked-quantity .cgk-ccc-linked-plus{
    width:30px!important;
    height:34px!important;
    font-size:15px!important;
  }
  body.cgk-ccc-rc-active.single-product .cgk-ccc-commercial-row .quantity.cgk-ccc-qty-normalized input.qty,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-linked-quantity .cgk-ccc-linked-qty{
    width:36px!important;
    max-width:36px!important;
    height:34px!important;
    font-size:14px!important;
  }
  body.cgk-ccc-rc-active.single-product .cgk-ccc-rc-unit,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-rc-total,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-linked-row > span{
    font-size:12px!important;
    line-height:1.25!important;
    font-weight:400!important;
  }
  body.cgk-ccc-rc-active.single-product .cgk-ccc-rc-unit strong,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-rc-total strong,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-linked-row strong{
    font-weight:700!important;
  }
  body.cgk-ccc-rc-active.single-product .cgk-ccc-rc-pill,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-linked-row .cgk-ccc-rc-pill,
  body.cgk-ccc-rc-active.single-product .cgk-ccc-linked-row .cgk-ccc-pill{
    padding:4px 8px!important;
    font-size:11px!important;
    font-weight:650!important;
  }

  /* Prodotti composti: stesso schema a tre livelli. */
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact{
    padding:7px 8px!important;
    margin:3px 0!important;
    gap:4px!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-head{
    gap:7px!important;
    margin:0!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-thumb{
    width:46px!important;
    height:46px!important;
    flex:0 0 46px!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product-title{
    font-size:14px!important;
    line-height:1.2!important;
    font-weight:650!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc p{
    font-size:12px!important;
    line-height:1.3!important;
    margin:1px 0!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row{
    display:grid!important;
    grid-template-columns:88px minmax(0,1fr) minmax(0,1fr)!important;
    align-items:center!important;
    justify-items:center!important;
    gap:5px 7px!important;
    padding:7px!important;
    margin-top:4px!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > .cgk-ccc-linked-quantity{
    grid-column:1!important;
    grid-row:1!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > span:has(.cgk-ccc-linked-unit){
    grid-column:2 / 4!important;
    grid-row:1!important;
    width:100%!important;
    text-align:center!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > span:has(.cgk-ccc-linked-total){
    grid-column:1 / -1!important;
    grid-row:2!important;
    width:100%!important;
    text-align:center!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > .cgk-ccc-rc-pill,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > .cgk-ccc-pill,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > .cgk-ccc-rc-quote-button{
    grid-row:3!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > .cgk-ccc-rc-add-panel{
    grid-column:1 / -1!important;
    width:100%!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-block-title{
    margin:7px 0 4px!important;
    font-size:18px!important;
    line-height:1.2!important;
  }
}

/* RC24.36.3 — Correzione regressione layout prodotti composti mobile.
 * Ripristina il sottobox compatto: testata orizzontale e rigo commerciale
 * su tre fasce leggibili, senza colonne strette o testo verticale. */
@media (max-width:768px){
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    width:100%!important;
    min-width:0!important;
    gap:6px!important;
    padding:8px!important;
    margin:4px 0!important;
    box-sizing:border-box!important;
  }

  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-head,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact .cgk-ccc-linked-head{
    display:flex!important;
    flex-direction:row!important;
    align-items:flex-start!important;
    width:100%!important;
    gap:8px!important;
    margin:0!important;
    text-align:left!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-thumb{
    width:48px!important;
    height:48px!important;
    flex:0 0 48px!important;
    margin:0!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-text{
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    min-width:0!important;
    text-align:left!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product-title,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-desc p{
    width:100%!important;
    text-align:left!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }

  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact .cgk-ccc-linked-row{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    grid-auto-flow:row!important;
    align-items:center!important;
    justify-items:center!important;
    width:100%!important;
    min-width:0!important;
    gap:5px 8px!important;
    padding:7px!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > .cgk-ccc-linked-quantity{
    grid-column:1!important;
    grid-row:1!important;
    justify-self:center!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > span:nth-of-type(1){
    grid-column:2!important;
    grid-row:1!important;
    width:100%!important;
    text-align:center!important;
    white-space:normal!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > span:nth-of-type(2){
    grid-column:1 / -1!important;
    grid-row:2!important;
    width:100%!important;
    text-align:center!important;
    white-space:normal!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > .cgk-ccc-rc-pill,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > .cgk-ccc-pill,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > .cgk-ccc-rc-quote-button{
    grid-row:3!important;
    grid-column:auto!important;
    width:auto!important;
    max-width:100%!important;
    white-space:normal!important;
  }
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > .cgk-ccc-rc-add-panel{
    grid-column:1 / -1!important;
    width:100%!important;
  }
}

/* RC24.36.4 — Fix mirato prodotto composto SYNC dentro il rigo principale.
 * Il box SYNC è figlio diretto del rigo commerciale principale, che su mobile
 * usa una griglia a tre colonne. Forziamo il SYNC a occupare l'intera riga. */
@media (max-width:768px){
  body.cgk-ccc-rc-active.single-product .cgk-pui10-card__renderer
  .cgk-ccc-commercial-row > .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact{
    grid-column:1 / -1!important;
    grid-row:auto!important;
    justify-self:stretch!important;
    align-self:stretch!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:4px 0 0!important;
    box-sizing:border-box!important;
  }

  body.cgk-ccc-rc-active.single-product .cgk-pui10-card__renderer
  .cgk-ccc-commercial-row > .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact
  > .cgk-ccc-linked-head,
  body.cgk-ccc-rc-active.single-product .cgk-pui10-card__renderer
  .cgk-ccc-commercial-row > .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact
  > .cgk-ccc-linked-row{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
}

/* RC24.36.5 — Compattazione finale Product Builder mobile.
 * Recupera larghezza utile riducendo di circa il 40% i padding laterali
 * del box generale e dei sottobox composti, senza alterare la logica. */
@media (max-width:768px){
  body.single-product .cgk-pui10-card{
    padding-left:6px!important;
    padding-right:6px!important;
  }

  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact{
    padding-left:5px!important;
    padding-right:5px!important;
  }

  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row,
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-product.cgk-ccc-linked-sync-compact .cgk-ccc-linked-row{
    padding-left:4px!important;
    padding-right:4px!important;
    gap:4px 6px!important;
  }

  body.cgk-ccc-rc-active.single-product .cgk-pui10-card__renderer .cgk-ccc-commercial-row{
    padding-left:5px!important;
    padding-right:5px!important;
    gap:4px 6px!important;
  }

  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > span:nth-of-type(1),
  body.single-product .cgk-pui10-card__renderer .cgk-ccc-linked-row > span:has(.cgk-ccc-linked-unit){
    font-size:11px!important;
    line-height:1.18!important;
  }
}
