/* ===== PullHype – Product Layout Amazon (v1.3.2) =====
   Galleria stabile (tutte le slide visibili) + colonna piena. Niente aspect-ratio forzata.
*/
:root{
  --phx-text:#0f172a;
  --phx-muted:#6b7280;
  --phx-accent:#2866B1;
  --phx-accent-600:#1f5593;
  --phx-border:#e5e7eb;
  --phx-sale:#ef4444;
  --phx-ok:#10b981;
  --phx-radius:14px;
  --phx-shadow:0 6px 24px rgba(2,6,23,.10);
}

.phx-pla-wrap{ max-width:1400px; margin:0 auto; padding:0 0px; box-sizing:border-box; }

/* Grid 4 | 5 | 3 */
.phx-pla-grid{ display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:28px; align-items:start; }
.phx-pla-grid .phx-gallery{ grid-column:1 / span 4; }
.phx-pla-grid .phx-center{  grid-column:5 / span 5; }
.phx-pla-grid .phx-buybox{  grid-column:10 / span 3; }

/* ===== GALLERY SAFE RULES ===== */
.phx-gallery .woocommerce-product-gallery{ border:1px solid var(--phx-border); border-radius:var(--phx-radius); padding:10px; box-shadow:var(--phx-shadow); background:#fff; }
.phx-gallery .woocommerce-product-gallery,
.phx-gallery .woocommerce-product-gallery__wrapper,
.phx-gallery .woocommerce-product-gallery__image,
.phx-gallery .woocommerce-product-gallery__image a{ width:100%; height:auto; }
.phx-gallery .woocommerce-product-gallery__image{ display:block; }
.phx-gallery .woocommerce-product-gallery__image img{
  width:100% !important;
  height:auto !important;
  max-width:100% !important;
  display:block;
  object-fit:contain;
  opacity:1 !important; /* se lo script non inizializza, non resta trasparente */
  visibility:visible !important;
}
/* Flexslider compat */
.phx-gallery .flex-viewport{ max-height:none !important; height:auto !important; }
.phx-gallery .slides{ display:block; }
.phx-gallery .slides > li{ margin:0; }
.phx-gallery .flex-control-thumbs{ display:flex; flex-wrap:wrap; gap:8px; padding:6px; }
.phx-gallery .flex-control-thumbs li{ margin:0; }

/* Sale pill */
.woocommerce span.onsale{ background:var(--phx-sale); padding:.4em .6em; border-radius:999px; min-height:auto; min-width:auto; line-height:1; font-weight:800; }

/* Title + bullets */
.phx-title .product_title{ font-size:clamp(26px,2.6vw,36px); line-height:1.15; margin:2px 0 10px; letter-spacing:-.2px; }
.phx-rating .woocommerce-product-rating{ display:flex; align-items:center; gap:8px; margin:2px 0 14px; }
.phx-rating .woocommerce-review-link{ font-size:.9rem; color:var(--phx-muted); }
.phx-bullets{ margin:6px 0 0; padding-left:22px; }
.phx-bullets li{ list-style:disc; margin:8px 0; font-size:1rem; }
.phx-shortdesc{ color:var(--phx-muted); }

/* Buybox */
.phx-card{ background:#fff; border:1px solid var(--phx-border); border-radius:var(--phx-radius); padding:16px; box-shadow:var(--phx-shadow); }
.phx-card + .phx-card{ margin-top:16px; }
.phx-card-buybox{ position:relative; overflow:hidden; }
.phx-chip{ display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; font-size:.8rem; font-weight:800; }
.phx-chip-sale{ position:absolute; top:12px; right:12px; background:rgba(239,68,68,.1); color:#b91c1c; border:1px solid rgba(239,68,68,.2); }
.phx-price-strong .price{ font-size:1.6rem; font-weight:900; margin:4px 0 8px; }
.phx-price-strong del{ opacity:.55; }
.phx-stock{ color:var(--phx-ok); font-weight:700; margin-bottom:6px; }
.phx-low-stock{ color:#b45309; background:#fff7ed; border:1px dashed #fed7aa; border-radius:10px; padding:6px 10px; font-size:.9rem; margin-bottom:10px; }

.phx-addtocart form.cart{ display:grid; grid-template-columns:1fr; gap:12px; }
.phx-addtocart .quantity{ display:flex; align-items:center; gap:8px; }
.phx-addtocart .quantity input[type=number]{ width:96px; height:44px; border:1px solid var(--phx-border); border-radius:10px; padding:0 10px; }
.single_add_to_cart_button{ height:48px; border-radius:12px; font-weight:900; letter-spacing:.3px; background:var(--phx-accent); }
.single_add_to_cart_button:hover,
.single_add_to_cart_button:focus-visible{ background:var(--phx-accent-600); }

/* Trust */
.phx-trust{ display:grid; grid-template-columns:1fr 1fr; gap:10px 12px;}
.phx-trust li{ display:flex; align-items:center; gap:8px; font-size:.95rem; color:var(--phx-text); line-height:1.3; }
.phx-trust svg{ color:var(--phx-accent); flex:0 0 auto; }

/* Add-ons */
.phx-card-addons .phx-card-h{ font-size:1.6rem; font-weight:900; margin:0 0 15px; color: #D93025;}
.phx-card-addons{ overflow:hidden; }
.phx-addons-list{ display:grid; grid-template-columns:1fr; gap:12px; }
.phx-addon{ display:grid; grid-template-columns:88px 1fr; gap:12px; align-items:center; padding:10px; border:1px solid var(--phx-border); border-radius:12px; box-sizing:border-box; }
.phx-addon-thumb img{ border-radius:10px; }
.phx-addon-body{ min-width:0; }
.phx-addon-title{ display:block; font-weight:800; line-height:1.2; margin-bottom:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.phx-addon-prices{ display:flex; align-items:center; gap:10px; margin-bottom:10px; margin-top:10px; flex-wrap:wrap; }
.phx-addon-prices .phx-old{ text-decoration:line-through; opacity:.5; }
.phx-addon-prices .phx-new{ font-weight:900; }
.phx-addon-prices .phx-badge{ font-size:.8rem; background:#fff7ed; color:#b45309; border:1px solid #fed7aa; border-radius:999px; padding:2px 8px; }
.phx-addon-form .button{ width:100%; height:38px; border-radius:10px; }
.phx-addons-note{ margin-top:8px; font-size:.9rem; color:var(--phx-muted); }
.phx-addons-desc{ margin: 0px 0 14px; color:#000; font-size:.95rem; line-height:1.35; }
/* Hide default summary */
.single-product .summary.entry-summary{ display:none; }

/* Responsive */
@media (max-width: 1180px){
  .phx-pla-grid{ gap:22px; }
  .phx-pla-grid .phx-gallery{ grid-column:1 / span 12; order:1; }
  .phx-pla-grid .phx-center{  grid-column:1 / span 7; order:2; }
  .phx-pla-grid .phx-buybox{  grid-column:8 / span 5; order:3; }
}
@media (max-width: 768px){
  .phx-pla-grid{ grid-template-columns:1fr; gap:18px; }
  .phx-pla-grid .phx-gallery,
  .phx-pla-grid .phx-center,
  .phx-pla-grid .phx-buybox{ grid-column:auto; }
}

/* === v1.3.3: Force Woo image wrapper to full width inside our layout === */
/* Raising specificity beyond (1,3,2) by prefixing with body.phx-pla-active */
body.phx-pla-active.woocommerce #content div.product div.images,
body.phx-pla-active.woocommerce div.product div.images,
body.phx-pla-active.woocommerce-page #content div.product div.images,
body.phx-pla-active.woocommerce-page div.product div.images{
  width:100% !important;
  float:none !important;
  margin:0 !important;
}

/* ===== v1.3.4 — Brand & Polish for PullHype =====
   Primary: #D93025  | Text: #202124  | Accent/Badge: #FFB300
*/
:root{
  --phx-text:#202124;
  --phx-muted:#5f6368;
  --phx-accent:#D93025;      /* CTA e highlight */
  --phx-accent-600:#c1271d;  /* hover CTA */
  --phx-border:#e6e6e6;
  --phx-sale:#D93025;        /* pill “In offerta” */
  --phx-ok:#0f9d58;          /* verde Google-ish */
  --phx-amber:#FFB300;       /* badge sconto */
  --phx-amber-ink:#8a5a00;
}

/* Titolo e tipografia */
.phx-title .product_title{
  color:var(--phx-text);
  letter-spacing:-.3px;
}
.phx-bullets li{ color:var(--phx-text); }
.phx-shortdesc{ color:var(--phx-muted); }

/* Prezzi */
.phx-price-strong .price{ color:var(--phx-text); }
.phx-price-strong del, .phx-addon-prices .phx-old{ color:#9aa0a6; }

/* CTA buttons */
.single_add_to_cart_button,
.phx-addon-form .button{
  background:var(--phx-accent) !important;
  border-color:var(--phx-accent) !important;
}
.single_add_to_cart_button:hover,
.phx-addon-form .button:hover{
  background:var(--phx-accent-600) !important;
  border-color:var(--phx-accent-600) !important;
}

/* Trust icons */
.phx-trust svg{ color:var(--phx-amber); }
.phx-chip-sale{ background:rgba(217,48,37,.08); color:#9f1e16; border-color:rgba(217,48,37,.25); }

/* Add-on cards: show FULL titles, never ellipsize, and ensure "Aggiungi" text never clips */
.phx-addon-body{ min-width:0; }
.phx-addon-title{
  white-space:normal;         /* no ellipsis */
  overflow:visible;
  display:block;
}
.phx-addon-form .button{
  white-space:nowrap;         /* keep "Aggiungi" readable */
  width:100%;
}

/* Amber discount badge */
.phx-addon-prices .phx-badge{
  background:rgba(255,179,0,.18);
  color:var(--phx-amber-ink);
  border:1px solid rgba(255,179,0,.4);
}

/* Tabs / section headings (optional) */
.woocommerce div.product .woocommerce-tabs .panel h2,
.woocommerce-Tabs-panel h2{
  color:var(--phx-text);
}

/* Minor spacing */
.phx-card-buybox{ padding-top:22px; }

/* v1.7.0 — UI tweaks per request */

/* 1) Gallery with no white background */
.phx-gallery .woocommerce-product-gallery{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 2) Center column chip + price + stock */
.phx-col.phx-center .phx-chip{ margin-bottom:8px; }
.phx-center-price .price{ font-size:1.2rem; font-weight:800; margin:0 0 4px; }
.phx-center-stock{ color:var(--phx-ok); font-weight:700; margin-bottom:10px; }

/* 3) Buybox: price stack + chip left under price */
.phx-price-stack{ display:flex; flex-direction:column; gap:4px; }
.phx-price-stack .phx-price-regular{ opacity:.6; text-decoration:line-through; font-weight:600; }
.phx-price-stack .phx-price-sale{ font-size:1.6rem; font-weight:900; line-height:1; }
.phx-chip-left{ display:inline-flex; margin:6px 0 8px 0; }

/* 4) Hide quantity controls in buybox */
.phx-buybox .quantity{ display:none !important; }

/* 5) ETA block styling */
.phx-eta{ background:#fff7ed; border:1px dashed #fed7aa; border-radius:12px; padding:8px 10px; margin:8px 0 10px; font-size:.95rem; }
.phx-eta strong{ margin-right:6px; }
.phx-eta-countdown{ font-weight:900; }

/* Thumbnail spacing fine-tune */
.phx-gallery .flex-control-thumbs{ gap:10px; }

/* v1.7.2 safe UI patch */
/* 1) Center price stack sizing like buybox */
.phx-center .price del,
.phx-center-price .phx-price-regular{ display:block; opacity:.6; text-decoration:line-through; font-weight:600; }
.phx-center .price ins,
.phx-center-price .phx-price-sale{ display:block; font-size:1.6rem; font-weight:900; line-height:1; }

/* 3) Disponibilità rossa colonna 2 */
.phx-col.phx-center .stock{ color:#d93025 !important; font-weight:800; margin:6px 0 12px; }

/* 5) Bullet marker rosso */
.phx-bullets li::marker{ color:#d93025; }
.phx-article-info{ margin:18px 0 8px; font-weight:900; color:var(--phx-text); }

/* 6 & 8 & 9) Buybox: unico chip sopra prezzo, niente stock sotto ETA, CTA fullwidth */
.phx-card-buybox .phx-stock{ display:none !important; }
.phx-card-buybox .single_add_to_cart_button{ width:100% !important; display:block; height:60px; font-size:1.05rem; font-weight:900; border-radius:14px; }
.phx-card-buybox form.cart{ grid-template-columns:1fr !important; }

/* Gallery senza fondo bianco (se non già attivo) */
.phx-gallery .woocommerce-product-gallery{ background:transparent!important; border:none!important; box-shadow:none!important; }

/* v1.7.3 — Center price "mediano" style */
.phx-med-pricebox{ margin:4px 0 10px; }
.phx-med-row{ display:flex; align-items:flex-end; gap:12px; }
.phx-med-discount{ color:#D93025; font-weight:900; font-size:1.6rem; }
.phx-med-price{ font-weight:900; font-size:2.4rem; line-height:1; }
.phx-med-price .phx-med-dec{ font-size:.55em; vertical-align:top; font-weight:800; }
.phx-med-baseline{ color:#555; margin-top:6px; font-weight:600; }
.phx-med-baseline del{ opacity:.6; }
.phx-med-i{ display:inline-flex; width:18px; height:18px; border-radius:50%; background:#ECEFF1; color:#455A64; font-weight:800; justify-content:center; align-items:center; font-size:.75rem; margin-left:8px; }

/* v1.7.4 — article heading tweaks */
.phx-article-info{
  margin: 12px 0 8px !important;
  font-size: 22px !important;
  font-family: inherit !important;
}

/* v1.7.5 — tweaks */
.phx-card-buybox .phx-chip.phx-chip-sale{ margin-bottom:8px; }
.phx-card-buybox .phx-price-strong{ margin-top:2px; }
.phx-eta strong{ display:none; } /* se presente, nascondi 'Consegna stimata:' etichette legacy */

/* v1.7.6 — chip adjustments */
/* Nascondi chip 'In offerta' nella colonna 2 */
.phx-col.phx-center .phx-chip.phx-chip-sale{ display:none !important; }
/* Mostra chip in buybox a sinistra sopra il prezzo */
.phx-card-buybox .phx-chip.phx-chip-sale{ display:inline-flex; align-self:flex-start; margin-bottom:8px; position:relative; right:auto; left:auto; }

/* v1.7.6-accordion-e2 — accordion & related styling */
.phx-accordion{ margin-top:24px; display:flex; flex-direction:column; gap:10px; }
.phx-acc-item{ background:#fff; border-radius:14px; box-shadow:0 2px 12px rgba(0,0,0,.06); overflow:hidden; }
.phx-acc-summary{ list-style:none; cursor:pointer; padding:14px 18px; font-weight:800; position:relative; }
.phx-acc-summary::-webkit-details-marker{ display:none; }
.phx-acc-summary::after{ content:'›'; position:absolute; right:18px; top:50%; transform:translateY(-50%) rotate(90deg); opacity:.6; transition:transform .25s ease; font-size:18px; }
.phx-acc-item[open] .phx-acc-summary::after{ transform:translateY(-50%) rotate(-90deg); opacity:.8; }
.phx-acc-panel{ padding:16px 18px 18px; border-top:1px solid #f0f0f0; }

.single-product .woocommerce-tabs,
.single-product .wc-tabs-wrapper{ display:none !important; }

.phx-related{ margin-top:28px; }
.phx-related .phx-card-h{ margin-bottom:10px; }
@media (max-width: 1024px){ .phx-related{ margin-top:22px; } }

/* === Full-width add-ons row (moved from buybox) === */
.phx-pla-addons-row{
  margin: 50px 0 0;
}
/* Re-use the existing card styles; we only ensure consistent spacing */
.phx-pla-addons-row .phx-card-addons{
  box-shadow: var(--phx-shadow);
  border: 1px solid var(--phx-border);
  border-radius: var(--phx-radius);
  padding: 16px;
  background: #fff;
}
/* On wide screens, show add-ons in 2 columns for better scanning */
@media (min-width: 1024px){
  .phx-pla-addons-row .phx-addons-list{
    grid-template-columns: 1fr 1fr;
  }
}

/* === Limit visible "Aggiungi e risparmia" items by viewport (1/2/3) === */
.phx-pla-addons-row .phx-addons-list > .phx-addon-item{ display:none; }
.phx-pla-addons-row .phx-addons-list > .phx-addon-item:nth-child(-n+1){ display:block; }

/* Tablet: show 2 items and 2 columns */
@media (min-width: 768px){
  .phx-pla-addons-row .phx-addons-list{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .phx-pla-addons-row .phx-addons-list > .phx-addon-item:nth-child(-n+2){ display:block; }
}

/* Desktop: show 3 items and 3 columns */
@media (min-width: 1024px){
  .phx-pla-addons-row .phx-addons-list{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .phx-pla-addons-row .phx-addons-list > .phx-addon-item:nth-child(-n+3){ display:block; }
}

/* === UX fix: centrare testo pulsanti "Aggiungi" negli addons === */
.phx-pla-addons-row .phx-addon-form .button{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  line-height:1;
  height:40px;
  border-radius:9px !important;
}

/* === Border radius uniforme per tutti i pulsanti dell'impaginato === */
.phx-pla-wrap .button,
.phx-pla-wrap button,
.phx-pla-wrap input[type="submit"],
.phx-pla-addons-row .button,
.single_add_to_cart_button{
  border-radius:9px !important;
}

/* === Badge sconto (left) troppo basso: alzalo e allinealo meglio === */
.phx-pla-wrap .phx-chip.phx-chip-sale.phx-chip-left{
  line-height:1;
  margin-top:-4px;      /* tira su il badge */
  margin-bottom:6px;    /* evita che tocchi il prezzo */
  align-self:center;    /* se in flex, centra verticalmente */
}
@media (min-width:1024px){
  .phx-pla-wrap .phx-chip.phx-chip-sale.phx-chip-left{ margin-top:-6px; }
}

.woocommerce div.product form.cart {
    margin-bottom: 0em !important;
}



.phx-low30-data{ display:none !important; }

/* dimensione righe baseline */
.single-product .phx-med-pricebox .phx-med-baseline,
.single-product .phx-med-pricebox .phx-med-low30{
  font-size: 11px !important;
  line-height: 1.25 !important;
}

/* LISTINO: prezzo rosso e sempre sbarrato */
.single-product .phx-med-pricebox .phx-med-regular del,
.single-product .phx-med-pricebox .phx-med-regular del *{
  color: #D93025 !important;
  opacity: 1 !important;
  font-weight: 700 !important;
  text-decoration: line-through !important;
  text-decoration-thickness: 1px;
}

/* LOW30: prezzo rosso e sempre sbarrato */
.single-product .phx-med-pricebox .phx-med-low30-price,
.single-product .phx-med-pricebox .phx-med-low30-price *{
  color: #D93025 !important;
  opacity: 1 !important;
  font-weight: 700 !important;
  text-decoration: line-through !important;
  text-decoration-thickness: 1px;
}
