/*
Theme Name: AllMyDNA Child
Theme URI: https://allmydna.ch/
Author: ALL MY DNA GmbH
Description: Child theme minimale per personalizzazioni locali del tema AllMyDNA.
Template: allmydna
Version: 1.2.6
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: allmydna-child
*/

.amd-primary-menu .amd-admin-menu-icon > a {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(50,168,191,.35);
  border-radius: 50%;
  color: #32a8bf;
  box-sizing: border-box;
}

.amd-primary-menu .amd-admin-menu-icon > a:hover {
  color: #fff;
  background: #32a8bf;
}

.amd-primary-menu .amd-admin-menu-icon svg {
  display: block;
}

/* ────────────────────────────────────────────────────────────────
 * Carrello e Checkout: restano pagine 100% native WooCommerce
 * (nessun template del tema assegnato, decisione deliberata per non
 * toccare il flusso d'acquisto). Il tema principale non carica più
 * amd-home.css qui (rompeva tabelle/liste/bottoni con il reset di
 * Tailwind), ma senza QUALCOSA il markup nativo di WooCommerce resta
 * troppo spoglio accanto al nostro header/footer personalizzati.
 * Queste regole danno il minimo di impaginazione coerente col resto
 * del sito, senza toccare i template di Cart/Checkout.
 * ──────────────────────────────────────────────────────────────── */
.woocommerce-cart .amd-standard-content,
.woocommerce-checkout .amd-standard-content { max-width: 900px; }

.woocommerce-cart h1.entry-title,
.woocommerce-checkout h1.entry-title { margin-bottom: 24px; }

.woocommerce-cart table.shop_table,
.woocommerce-checkout table.shop_table {
  width: 100%; border-collapse: collapse; border: 1px solid var(--amd-border);
  border-radius: 12px; overflow: hidden; margin-bottom: 24px;
}
.woocommerce-cart table.shop_table th,
.woocommerce-checkout table.shop_table th {
  background: #f8fafc; color: var(--amd-dark); font-weight: 700;
  text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--amd-border);
}
.woocommerce-cart table.shop_table td,
.woocommerce-checkout table.shop_table td {
  padding: 14px 16px; border-bottom: 1px solid var(--amd-border); vertical-align: middle;
}
.woocommerce-cart table.shop_table tr:last-child td { border-bottom: 0; }
.woocommerce-cart table.shop_table img { border-radius: 8px; }

.woocommerce-cart .quantity input.qty,
.woocommerce-checkout .quantity input.qty {
  width: 64px; padding: 8px; border: 1px solid var(--amd-border); border-radius: 8px;
}
.woocommerce-cart .coupon .input-text {
  padding: 10px 12px; border: 1px solid var(--amd-border); border-radius: 8px; margin-right: 8px;
}

.woocommerce-cart .button,
.woocommerce-checkout .button,
.woocommerce-checkout #place_order {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--amd-primary); color: #fff !important; border: 0; border-radius: 10px;
  padding: 12px 20px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.woocommerce-cart .button:hover,
.woocommerce-checkout .button:hover,
.woocommerce-checkout #place_order:hover { filter: brightness(1.06); }
.woocommerce-checkout #place_order { background: var(--amd-accent); font-size: 1rem; padding: 14px 24px; }

.woocommerce-cart .cart_totals,
.woocommerce-checkout #order_review {
  border: 1px solid var(--amd-border); border-radius: 12px; padding: 20px 24px; background: #fff;
}
.woocommerce-cart .cart_totals h2,
.woocommerce-checkout #order_review_heading {
  color: var(--amd-dark); font-size: 1.1rem; margin-top: 0;
}

.woocommerce-checkout .form-row { margin-bottom: 14px; }
.woocommerce-checkout .form-row label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--amd-text); }
.woocommerce-checkout .form-row .input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--amd-border); border-radius: 8px;
  box-sizing: border-box; font-size: .95rem;
}
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3 {
  color: var(--amd-dark); margin-top: 28px; margin-bottom: 14px;
}
.woocommerce-checkout .wc_payment_methods {
  list-style: none; margin: 0 0 16px; padding: 0;
}
.woocommerce-checkout .wc_payment_methods .wc_payment_method {
  border: 1px solid var(--amd-border); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px;
}

/* Testo/prezzi/etichette WooCommerce di default sono spesso grigio chiaro:
   su sfondo bianco, senza il resto della grafica del tema, si perdono. */
.woocommerce-cart,
.woocommerce-checkout { color: var(--amd-text); }
.woocommerce-cart .woocommerce-Price-amount,
.woocommerce-checkout .woocommerce-Price-amount,
.woocommerce-cart table.shop_table td,
.woocommerce-checkout table.shop_table td,
.woocommerce-checkout .wc_payment_methods label,
.woocommerce-checkout .shipping_method + label,
.woocommerce-cart .product-name a,
.woocommerce-checkout #order_review .cart-subtotal,
.woocommerce-checkout #order_review .order-total { color: var(--amd-text); }
.woocommerce-cart .product-name a { font-weight: 600; }
.woocommerce-checkout #order_review .order-total .woocommerce-Price-amount { color: var(--amd-dark); font-weight: 800; }
.woocommerce-cart .amd-standard-content a,
.woocommerce-checkout .amd-standard-content a:not(.button):not(#place_order) { color: var(--amd-primary); }
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-error,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-error {
  border-top-color: var(--amd-primary); color: var(--amd-text); background: #f8fafc;
  border-radius: 10px; padding: 14px 18px;
}
.woocommerce-checkout .woocommerce-additional-fields textarea,
.woocommerce-checkout .woocommerce-billing-fields textarea { color: var(--amd-text); }
.woocommerce-checkout .select2-selection,
.woocommerce-checkout .select2-selection__rendered { color: var(--amd-text) !important; }

/* WooCommerce 1.1.6: carrello e checkout più ampi e leggibili. */
.woocommerce-cart .amd-standard-content,
.woocommerce-checkout .amd-standard-content {
  width: min(1180px, calc(100% - 40px)); max-width: 1180px;
  padding-top: 64px; padding-bottom: 80px;
  font-family: Inter, Arial, sans-serif; font-size: 16px; line-height: 1.55;
}
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce { color: #17252a; font-size: 16px; }
.woocommerce-cart .woocommerce-cart-form { width: 100%; float: none; }
.woocommerce-cart table.shop_table {
  table-layout: auto; background: #fff; box-shadow: 0 8px 28px rgba(8,46,55,.06);
}
.woocommerce-cart table.shop_table th,
.woocommerce-cart table.shop_table td {
  padding: 18px 16px !important; color: #102f37 !important; font-size: 16px;
}
.woocommerce-cart table.shop_table th { font-size: 15px; font-weight: 800; }
.woocommerce-cart td.product-thumbnail { width: 92px; }
.woocommerce-cart td.product-thumbnail img { width: 70px !important; height: 70px !important; object-fit: cover; }
.woocommerce-cart td.product-name { min-width: 230px; }
.woocommerce-cart td.product-name a { color: #168da5 !important; font-size: 16px; font-weight: 750; }
.woocommerce-cart td.product-price,
.woocommerce-cart td.product-subtotal { white-space: nowrap; font-size: 17px; font-weight: 650; }
.woocommerce-cart .quantity input.qty {
  width: 72px !important; min-height: 46px; color: #102f37 !important;
  background: #fff !important; font-size: 16px; text-align: center;
}
.woocommerce-cart table.shop_table td.actions { padding: 16px !important; }
.woocommerce-cart table.shop_table td.actions .coupon { display: flex; align-items: center; gap: 10px; }
.woocommerce-cart .coupon .input-text {
  width: 230px !important; min-height: 46px; margin: 0 !important;
  color: #17252a !important; background: #fff !important; font-size: 15px;
}
.woocommerce-cart .coupon .input-text::placeholder { color: #64748b; opacity: 1; }
.woocommerce-cart .button,
.woocommerce-checkout .button,
.woocommerce-checkout #place_order {
  min-height: 46px; padding: 12px 22px !important; background: #239bb1 !important;
  color: #fff !important; font-family: Inter, Arial, sans-serif;
  font-size: 15px !important; font-weight: 750 !important; line-height: 1.2 !important; opacity: 1;
}
.woocommerce-cart .button:disabled,
.woocommerce-cart .button.disabled {
  background: #dce5e8 !important; color: #617179 !important;
  opacity: 1 !important; cursor: not-allowed;
}
.woocommerce-cart .cart-collaterals {
  display: flex; justify-content: flex-end; width: 100%; margin-top: 36px;
}
.woocommerce-cart .cart-collaterals .cart_totals {
  float: none; width: min(100%, 520px); padding: 28px 30px; box-sizing: border-box;
  box-shadow: 0 10px 32px rgba(8,46,55,.07);
}
.woocommerce-cart .cart_totals h2 { font-size: 25px; font-weight: 850; margin-bottom: 18px; }
.woocommerce-cart .cart_totals th,
.woocommerce-cart .cart_totals td { padding: 16px !important; font-size: 16px; vertical-align: top; }
.woocommerce-cart .cart_totals th { width: 38%; }
.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total td { font-size: 18px; font-weight: 850; }
.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
  width: 100%; min-height: 56px; box-sizing: border-box;
  background: linear-gradient(135deg,#32a8bf,#187d91) !important; font-size: 18px !important;
}
.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review,
.woocommerce-checkout #order_review_heading { font-family: Inter, Arial, sans-serif; }
.woocommerce-checkout #order_review { padding: 28px 30px; }
.woocommerce-checkout .form-row label { color: #173740 !important; font-size: 15px; font-weight: 700; }
.woocommerce-checkout .form-row .input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
  min-height: 48px; color: #17252a !important; background: #fff !important; font-size: 16px;
}
@media (max-width: 768px) {
  .woocommerce-cart .amd-standard-content,
  .woocommerce-checkout .amd-standard-content { width: min(100% - 24px, 1180px); padding-top: 38px; }
  .woocommerce-cart table.shop_table th,
  .woocommerce-cart table.shop_table td { font-size: 15px; }
  .woocommerce-cart table.shop_table td.actions .coupon { align-items: stretch; flex-direction: column; }
  .woocommerce-cart .coupon .input-text,
  .woocommerce-cart table.shop_table td.actions .coupon .button { width: 100% !important; }
  .woocommerce-cart .cart-collaterals .cart_totals { width: 100%; padding: 22px 18px; }
}

/* WooCommerce Cart Block (markup wc-block-*, distinto dal carrello classico). */
body.woocommerce-cart .amd-standard-content .entry-content,
body.woocommerce-checkout .amd-standard-content .entry-content {
  width: 100% !important; max-width: none !important; margin: 0 !important;
  color: #173740; font-family: Inter, Arial, sans-serif; font-size: 16px; line-height: 1.5;
}
body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-cart .wc-block-cart {
  width: 100% !important; max-width: none !important; margin: 0 auto !important;
  font-family: Inter, Arial, sans-serif; color: #173740;
}
body.woocommerce-cart .wc-block-components-sidebar-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, .9fr) !important;
  gap: 48px !important; align-items: start; width: 100% !important;
}
body.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-main,
body.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-sidebar {
  width: auto !important; max-width: none !important; margin: 0 !important;
  float: none !important;
}
body.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-main { padding: 0 !important; }
body.woocommerce-cart .wc-block-cart-items {
  width: 100% !important; border-spacing: 0; font-size: 16px;
}
body.woocommerce-cart .wc-block-cart-items th {
  padding: 0 0 14px !important; color: #31545d !important;
  font-size: 14px !important; font-weight: 800 !important; letter-spacing: .025em;
}
body.woocommerce-cart .wc-block-cart-items td {
  padding-top: 24px !important; padding-bottom: 24px !important;
  color: #173740 !important; vertical-align: top;
}
body.woocommerce-cart .wc-block-cart-item__image { width: 116px !important; padding-right: 18px !important; }
body.woocommerce-cart .wc-block-cart-item__image img {
  width: 96px !important; height: 96px !important; max-width: 96px !important;
  object-fit: cover; border-radius: 10px;
}
body.woocommerce-cart .wc-block-components-product-name {
  color: #168da5 !important; font-size: 18px !important;
  font-weight: 800 !important; line-height: 1.3 !important;
}
body.woocommerce-cart .wc-block-components-product-price,
body.woocommerce-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper {
  color: #173740 !important; font-size: 17px !important; font-weight: 700 !important;
}
body.woocommerce-cart .wc-block-components-product-metadata {
  max-width: 520px; color: #526a70 !important; font-size: 14px !important; line-height: 1.5;
}
body.woocommerce-cart .wc-block-components-quantity-selector {
  min-width: 124px; height: 46px; border: 1px solid #cbdadd !important;
  border-radius: 9px !important; background: #fff;
}
body.woocommerce-cart .wc-block-components-quantity-selector input {
  color: #173740 !important; font-size: 16px !important; font-weight: 700;
}
body.woocommerce-cart .wc-block-cart-item__remove-link {
  color: #557079 !important; font-size: 14px !important; text-decoration: underline;
}
body.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-sidebar {
  padding: 32px !important; border: 1px solid #dbe7e9;
  border-radius: 16px; background: #fff; box-shadow: 0 12px 34px rgba(8,46,55,.08);
  box-sizing: border-box;
}
body.woocommerce-cart .wc-block-cart__totals-title {
  margin: 0 !important; padding: 0 0 24px !important; color: #082e37 !important;
  font-size: 26px !important; font-weight: 850 !important; text-align: left !important;
}
body.woocommerce-cart .wc-block-components-totals-wrapper {
  margin: 0 !important; padding: 22px 0 !important; border-color: #d7e3e6 !important;
}
body.woocommerce-cart .wc-block-components-totals-item__label,
body.woocommerce-cart .wc-block-components-totals-item__value {
  color: #173740 !important; font-size: 16px !important;
}
body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-size: 20px !important; font-weight: 850 !important;
}
body.woocommerce-cart .wc-block-cart__submit-button {
  min-height: 56px; margin-top: 10px !important; border-radius: 10px !important;
  background: linear-gradient(135deg,#32a8bf,#187d91) !important;
  color: #fff !important; font-size: 17px !important; font-weight: 800 !important;
  text-decoration: none !important;
}
body.woocommerce-cart .wc-block-cart__submit-button span { color: #fff !important; }

@media (max-width: 900px) {
  body.woocommerce-cart .wc-block-components-sidebar-layout {
    grid-template-columns: minmax(0, 1fr) !important; gap: 30px !important;
  }
  body.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-sidebar { padding: 24px !important; }
}
@media (max-width: 600px) {
  body.woocommerce-cart .wc-block-cart-item__image { width: 80px !important; padding-right: 12px !important; }
  body.woocommerce-cart .wc-block-cart-item__image img {
    width: 68px !important; height: 68px !important; max-width: 68px !important;
  }
  body.woocommerce-cart .wc-block-components-product-name { font-size: 16px !important; }
  body.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-sidebar { padding: 20px 18px !important; }
}

/* Prodotto singolo 1.1.9: layout arioso e correlati uniformi. */
body.single-product main.site-main {
  width: min(1200px, calc(100% - 40px));
  padding-top: 64px; padding-bottom: 96px;
  font-family: Inter, Arial, sans-serif; color: #173740;
}
body.single-product .woocommerce-breadcrumb {
  margin: 0 0 30px; color: #64777d; font-size: 14px; line-height: 1.5;
}
body.single-product div.product {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  column-gap: 64px; row-gap: 56px; align-items: start;
}
body.single-product div.product::before,
body.single-product div.product::after { display: none !important; }
body.single-product div.product div.images,
body.single-product div.product div.summary {
  float: none !important; width: auto !important; margin: 0 !important;
}
body.single-product div.product div.images {
  padding: 18px; border: 1px solid #dfe8eb; border-radius: 20px;
  background: #fff; box-shadow: 0 12px 36px rgba(8,46,55,.07); box-sizing: border-box;
}
body.single-product div.product div.images img { border-radius: 13px; }
body.single-product div.product div.summary {
  padding: 10px 0 0; color: #415b62; font-size: 16px; line-height: 1.7;
}
body.single-product div.product .product_title {
  margin: 0 0 14px; color: #082e37; font-size: clamp(2rem,3.2vw,3rem);
  font-weight: 850; line-height: 1.12;
}
body.single-product div.product .summary .price {
  display: block; margin: 0 0 24px; color: #239bb1;
  font-size: 28px; font-weight: 850; line-height: 1.2;
}
body.single-product div.product .woocommerce-product-details__short-description {
  margin: 0 0 28px; color: #526a70; font-size: 16px; line-height: 1.75;
}
body.single-product div.product .woocommerce-product-details__short-description p { margin: 0 0 14px; }
body.single-product div.product form.cart {
  display: flex; align-items: stretch; gap: 14px; margin: 0 0 24px !important;
  padding: 22px; border: 1px solid #dfe8eb; border-radius: 14px; background: #f8fbfc;
}
body.single-product div.product form.cart::before,
body.single-product div.product form.cart::after { display: none !important; }
body.single-product div.product form.cart .quantity { float: none !important; margin: 0 !important; }
body.single-product div.product form.cart input.qty {
  width: 78px; min-height: 50px; padding: 10px; color: #173740;
  border: 1px solid #cbdadd; border-radius: 10px; background: #fff; font-size: 16px;
}
body.single-product div.product form.cart .single_add_to_cart_button {
  flex: 1; min-height: 50px; margin: 0 !important; padding: 13px 24px !important;
  border-radius: 10px; background: linear-gradient(135deg,#32a8bf,#187d91) !important;
  color: #fff !important; font-size: 16px; font-weight: 800;
}
body.single-product div.product .summary .product_meta {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid #dfe8eb;
  color: #64777d; font-size: 14px; line-height: 1.8;
}
body.single-product .summary #wc-stripe-payment-request-wrapper,
body.single-product .summary #wc-stripe-express-checkout-element,
body.single-product .summary .wc-stripe-product-checkout-container {
  width: 100%; margin: 18px 0 24px !important;
}
body.single-product div.product .summary .product_meta > span { display: block; }
body.single-product div.product .summary .product_meta a { color: #168da5; }
body.single-product div.product .woocommerce-tabs {
  grid-column: 1 / -1; width: 100%; margin: 0 !important; padding-top: 8px;
}
body.single-product div.product .woocommerce-tabs ul.tabs {
  margin: 0 0 0 !important; padding: 0 !important; border-bottom: 1px solid #dbe6e8;
}
body.single-product div.product .woocommerce-tabs ul.tabs::before { display: none !important; }
body.single-product div.product .woocommerce-tabs ul.tabs li {
  margin: 0 8px -1px 0 !important; padding: 0 !important;
  border: 1px solid #dbe6e8 !important; border-radius: 10px 10px 0 0 !important; background: #f6f9fa !important;
}
body.single-product div.product .woocommerce-tabs ul.tabs li a {
  padding: 13px 20px !important; color: #496168 !important; font-size: 15px; font-weight: 750;
}
body.single-product div.product .woocommerce-tabs ul.tabs li.active { background: #fff !important; }
body.single-product div.product .woocommerce-tabs .panel {
  margin: 0 !important; padding: 34px 38px; border: 1px solid #dbe6e8;
  border-top: 0; border-radius: 0 0 16px 16px; background: #fff;
  color: #415b62; font-size: 16px; line-height: 1.8;
}
body.single-product div.product .woocommerce-tabs .panel h2,
body.single-product div.product .woocommerce-tabs .panel h3 { color: #082e37; line-height: 1.3; }
body.single-product div.product .woocommerce-tabs .panel p { margin: 0 0 18px; }
body.single-product div.product .woocommerce-tabs .panel ul,
body.single-product div.product .woocommerce-tabs .panel ol { margin: 0 0 20px; padding-left: 24px; }
body.single-product div.product .related.products,
body.single-product div.product .upsells.products {
  grid-column: 1 / -1; width: 100%; margin: 0 !important; padding-top: 8px;
}
body.single-product .related.products > h2,
body.single-product .upsells.products > h2 {
  margin: 0 0 30px; color: #082e37; font-size: 30px; font-weight: 850;
}
body.single-product .related.products ul.products,
body.single-product .upsells.products ul.products {
  display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px;
  margin: 0 !important;
}
body.single-product .related.products ul.products::before,
body.single-product .related.products ul.products::after,
body.single-product .upsells.products ul.products::before,
body.single-product .upsells.products ul.products::after { display: none !important; }
body.single-product .related.products ul.products li.product,
body.single-product .upsells.products ul.products li.product {
  float: none !important; width: auto !important; min-width: 0; height: 100%; margin: 0 !important;
  padding: 0 0 22px !important; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #dfe8eb; border-radius: 18px; background: #fff;
  box-shadow: 0 10px 28px rgba(8,46,55,.07);
}
body.single-product .related.products ul.products li.product > a:first-child,
body.single-product .upsells.products ul.products li.product > a:first-child {
  display: flex; flex: 1; flex-direction: column; text-decoration: none;
}
body.single-product .related.products ul.products li.product img,
body.single-product .upsells.products ul.products li.product img {
  width: 100% !important; height: 210px !important; margin: 0 0 20px !important;
  object-fit: cover; background: #f4f9fa;
}
body.single-product .related.products .woocommerce-loop-product__title,
body.single-product .upsells.products .woocommerce-loop-product__title {
  min-height: 48px; padding: 0 20px !important; color: #173740 !important;
  font-size: 17px !important; font-weight: 800; line-height: 1.4;
}
body.single-product .related.products .price,
body.single-product .upsells.products .price {
  margin: 10px 20px 18px !important; color: #239bb1 !important; font-size: 19px !important; font-weight: 850;
}
body.single-product .related.products .button,
body.single-product .upsells.products .button {
  min-height: 48px; margin: auto 20px 0 !important; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: linear-gradient(135deg,#32a8bf,#187d91) !important;
  color: #fff !important; font-size: 15px; font-weight: 800; text-align: center;
}
@media (max-width: 980px) {
  body.single-product div.product { grid-template-columns: minmax(0,1fr); gap: 38px; }
  body.single-product div.product .woocommerce-tabs,
  body.single-product div.product .related.products,
  body.single-product div.product .upsells.products { grid-column: 1; }
  body.single-product .related.products ul.products,
  body.single-product .upsells.products ul.products { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  body.single-product main.site-main { width: min(100% - 24px,1200px); padding-top: 36px; }
  body.single-product div.product div.images { padding: 10px; border-radius: 14px; }
  body.single-product div.product form.cart { flex-direction: column; padding: 16px; }
  body.single-product div.product form.cart input.qty { width: 100%; box-sizing: border-box; }
  body.single-product div.product .woocommerce-tabs .panel { padding: 24px 18px; }
  body.single-product .related.products ul.products,
  body.single-product .upsells.products ul.products { grid-template-columns: minmax(0,1fr); }
}

/* Pagine operative e Gravity Forms: nessuna giustificazione forzata. */
body.amd-form-flow .amd-standard-content {
  width: min(1180px, calc(100% - 40px)); max-width: 1180px;
  padding-top: 70px; padding-bottom: 96px;
}
body.amd-form-flow .amd-standard-content .entry-content {
  width: 100%; max-width: none; margin: 0 auto;
  color: #334f57; font-family: Inter, Arial, sans-serif;
  font-size: 16px; line-height: 1.65;
}
body.amd-form-flow .entry-content p,
body.amd-form-flow .entry-content li,
body.amd-form-flow .entry-content label,
body.amd-form-flow .entry-content legend {
  text-align: left !important; text-justify: auto !important;
  word-spacing: normal !important; letter-spacing: normal;
}
body.amd-form-flow .entry-content > h1,
body.amd-form-flow .entry-content > h2 {
  color: #082e37; font-family: Inter, Arial, sans-serif;
  font-weight: 850; line-height: 1.18; text-align: center;
}
body.amd-form-flow .entry-content > h1 { margin: 0 0 54px; font-size: clamp(2.2rem,4vw,3.5rem); }
body.amd-form-flow .entry-content > h2 { margin-bottom: 36px; font-size: clamp(1.8rem,3vw,2.6rem); }

/* Le colonne introduttive restano card, ma senza testo stirato o fuori scala. */
body.amd-form-flow .entry-content > .wp-block-columns {
  display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 26px !important; align-items: stretch; width: 100%; margin: 0 0 44px !important;
}
body.amd-form-flow .entry-content > .wp-block-columns > .wp-block-column {
  min-width: 0; margin: 0 !important; padding: 28px 26px !important;
  box-sizing: border-box; overflow-wrap: normal; word-break: normal;
}
body.amd-form-flow .entry-content > .wp-block-columns > .wp-block-column h1,
body.amd-form-flow .entry-content > .wp-block-columns > .wp-block-column h2,
body.amd-form-flow .entry-content > .wp-block-columns > .wp-block-column h3,
body.amd-form-flow .entry-content > .wp-block-columns > .wp-block-column h4,
body.amd-form-flow .entry-content > .wp-block-columns > .wp-block-column p {
  margin: 0 !important; color: #102f37; font-family: Inter, Arial, sans-serif !important;
  font-size: clamp(1.15rem,1.7vw,1.45rem) !important; font-weight: 750;
  line-height: 1.4 !important; text-align: left !important;
  word-spacing: normal !important; white-space: normal;
}

body.amd-form-flow .gform_wrapper,
body.amd-form-flow .gform-theme {
  width: 100%; max-width: none; margin-top: 36px;
  color: #334f57; font-family: Inter, Arial, sans-serif;
}
body.amd-form-flow .gform_wrapper .gform_fields,
body.amd-form-flow .gform-theme .gform_fields { column-gap: 24px; row-gap: 24px; }
body.amd-form-flow .gform_wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.amd-form-flow .gform_wrapper select,
body.amd-form-flow .gform_wrapper textarea,
body.amd-form-flow .gform-theme input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.amd-form-flow .gform-theme select,
body.amd-form-flow .gform-theme textarea {
  width: 100%; min-height: 52px; box-sizing: border-box;
  color: #173740; background: #fff; font-family: Inter, Arial, sans-serif; font-size: 16px;
}
body.amd-form-flow .gform_wrapper .gfield_label,
body.amd-form-flow .gform-theme .gfield_label {
  color: #173740; font-size: 16px; font-weight: 750; line-height: 1.4;
}
body.amd-form-flow .gform_wrapper .gfield_description,
body.amd-form-flow .gform-theme .gfield_description {
  color: #597077; font-size: 14px; line-height: 1.55;
}

@media (max-width: 800px) {
  body.amd-form-flow .entry-content > .wp-block-columns {
    grid-template-columns: minmax(0,1fr); gap: 18px !important;
  }
  body.amd-form-flow .entry-content > .wp-block-columns > .wp-block-column { padding: 22px 20px !important; }
}
@media (max-width: 600px) {
  body.amd-form-flow .amd-standard-content {
    width: min(100% - 24px,1180px); padding-top: 42px; padding-bottom: 70px;
  }
  body.amd-form-flow .entry-content > h1 { margin-bottom: 36px; }
}

/* Dashboard Ambassador: usa lo spazio desktop disponibile. */
body.amd-page-ambassador-dashboard .amd-standard-content {
  width: min(1320px, calc(100% - 48px)); max-width: 1320px;
  padding-top: 72px; padding-bottom: 96px;
}
body.amd-page-ambassador-dashboard .amd-standard-content .entry-content {
  width: 100% !important; max-width: none !important; margin: 0 auto !important;
}
body.amd-page-ambassador-dashboard .entry-content > div,
body.amd-page-ambassador-dashboard .entry-content .wcu-user-coupon-page,
body.amd-page-ambassador-dashboard .entry-content #wcu-user-coupon-page,
body.amd-page-ambassador-dashboard .entry-content .coupon-affiliate-dashboard,
body.amd-page-ambassador-dashboard .entry-content .affiliate-dashboard {
  width: 100% !important; max-width: none !important; box-sizing: border-box;
}
@media (max-width: 782px) {
  body.amd-page-ambassador-dashboard .amd-standard-content {
    width: min(100% - 24px,1320px); padding-top: 44px; padding-bottom: 72px;
  }
}

/* Form Contatti: reCAPTCHA in linea immediatamente prima di Invia. */
.amd-gravity-contact .gform_footer.amd-contact-form-actions {
  display: flex !important; flex-direction: column; align-items: flex-end;
  justify-content: flex-start; gap: 24px; flex-wrap: nowrap;
  width: 100%; margin-top: 24px !important; padding: 0 !important;
}
.amd-gravity-contact .gform_footer.amd-contact-form-actions .gfield--type-captcha,
.amd-gravity-contact .gform_footer.amd-contact-form-actions .gfield_captcha {
  flex: 0 0 auto; width: auto !important; max-width: 100%;
  margin: 0 !important; padding: 0 !important;
}
.amd-gravity-contact .gform_footer.amd-contact-form-actions .ginput_container,
.amd-gravity-contact .gform_footer.amd-contact-form-actions .ginput_recaptcha {
  margin: 0 !important; padding: 0 !important;
}
.amd-gravity-contact .gform_footer.amd-contact-form-actions .amd-contact-captcha-slot {
  display: flex; justify-content: flex-end; width: 100%; min-height: 60px;
  margin: 0 !important; padding: 0 !important;
}
.amd-gravity-contact .gform_footer.amd-contact-form-actions .grecaptcha-badge {
  position: static !important; inset: auto !important; right: auto !important; bottom: auto !important;
  display: block !important; width: 256px !important; height: 60px !important;
  margin: 0 !important; transform: none !important; overflow: hidden;
  border-radius: 4px; box-shadow: 0 1px 5px rgba(0,0,0,.28) !important;
  visibility: visible !important; opacity: 1 !important;
}
.amd-gravity-contact .gform_footer.amd-contact-form-actions .grecaptcha-badge iframe {
  display: block; width: 256px !important; height: 60px !important;
}
.amd-gravity-contact .gform_footer.amd-contact-form-actions .gform_button,
.amd-gravity-contact .gform_footer.amd-contact-form-actions input[type="submit"] {
  flex: 0 0 auto; min-height: 52px; margin: 0 !important;
}
@media (max-width: 640px) {
  .amd-gravity-contact .gform_footer.amd-contact-form-actions {
    align-items: stretch; gap: 20px;
  }
  .amd-gravity-contact .gform_footer.amd-contact-form-actions .gfield--type-captcha,
  .amd-gravity-contact .gform_footer.amd-contact-form-actions .gfield_captcha,
  .amd-gravity-contact .gform_footer.amd-contact-form-actions .gform_button,
  .amd-gravity-contact .gform_footer.amd-contact-form-actions input[type="submit"] {
    width: 100% !important;
  }
  .amd-gravity-contact .gform_footer.amd-contact-form-actions .grecaptcha-badge {
    max-width: 100%; align-self: flex-start;
  }
  .amd-gravity-contact .gform_footer.amd-contact-form-actions .amd-contact-captcha-slot {
    justify-content: flex-start;
  }
}

/* Dashboard amministrativa: stessa larghezza della dashboard Ambassador. */
body.amd-page-admin-dashboard .amd-standard-content {
  width: min(1320px, calc(100% - 48px)); max-width: 1320px;
  padding-top: 72px; padding-bottom: 96px;
}
body.amd-page-admin-dashboard .amd-standard-content .entry-content {
  width: 100% !important; max-width: none !important; margin: 0 auto !important;
}
body.amd-page-admin-dashboard .entry-content > div,
body.amd-page-admin-dashboard .entry-content .admin-dashboard,
body.amd-page-admin-dashboard .entry-content #admin-dashboard {
  width: 100% !important; max-width: none !important; box-sizing: border-box;
}
@media (max-width: 782px) {
  body.amd-page-admin-dashboard .amd-standard-content {
    width: min(100% - 24px,1320px); padding-top: 44px; padding-bottom: 72px;
  }
}
