/* POPSTER v3.10 - Only curated homepage, ADV landing, post-payment confirmation. */
/* Homepage: desktop 4x2, mobile 2x4. */
body.home .popster-home-products-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
body.home .popster-home-collections-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
body.home .popster-home-collections-grid .collection-card{min-width:0}
@media(max-width:767px){
  body.home .popster-home-products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  body.home .popster-home-collections-grid{display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;padding-bottom:14px;scrollbar-width:thin;}
  body.home .popster-home-collections-grid .collection-card{flex:0 0 calc((100% - 12px)/1.5);max-width:calc((100% - 12px)/1.5);scroll-snap-align:start;}
}
/* ADV landing is isolated by a root class: never change shop/category/checkout layout. */
.popster-adv{--popster-adv-ink:#22201e;--popster-adv-surface:#f7f3ed;color:var(--popster-adv-ink)}
.popster-adv__hero{background:#f8f4ee;padding:clamp(64px,8vw,108px) 0;position:relative;overflow:hidden}
.popster-adv__hero:after{content:"";position:absolute;right:-8vw;top:-25%;width:min(55vw,690px);height:140%;border-radius:50%;background:radial-gradient(circle,#f1d8c3 0,rgba(241,216,195,0) 70%);pointer-events:none}
.popster-adv__hero-inner{position:relative;z-index:1;max-width:1160px}
.popster-adv__eyebrow{display:block;text-transform:uppercase;letter-spacing:.14em;font-weight:700;font-size:11px;margin-bottom:17px}
.popster-adv__hero h1{font-size:clamp(38px,6vw,78px);line-height:1.08;max-width:780px;margin:0 0 18px;letter-spacing:-.045em;color:inherit}
.popster-adv__hero h1 em{font-style:italic;color:#b35f40}
.popster-adv__hero p{font-size:clamp(16px,1.8vw,20px);line-height:1.5;margin:0 0 28px;max-width:580px}
.popster-adv__hero-actions{display:flex;gap:13px;flex-wrap:wrap}
.popster-adv__outline{border:1px solid #3e3833!important;color:#2c2926!important;background:transparent!important}
.popster-adv__products,.popster-adv__categories{padding-top:clamp(38px,6vw,72px);padding-bottom:clamp(38px,6vw,72px)}
.popster-adv__products-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.popster-adv__categories{background:#f8f6f2}
.popster-adv__categories-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.popster-adv__categories-grid .collection-card{min-width:0}
.popster-adv__empty{border:1px dashed #b7a997;border-radius:12px;padding:24px;background:#fffaf3}
.popster-adv__bottom{text-align:center;background:#20201f;color:#fff;padding:65px 20px}
.popster-adv__bottom h2{color:inherit;font-size:clamp(26px,3.5vw,42px);margin:0 0 10px}
.popster-adv__bottom p{margin:0 0 25px}
@media(max-width:767px){
  .popster-adv__hero{padding:52px 0 58px}
  .popster-adv__hero h1{font-size:clamp(34px,9.5vw,48px)}
  .popster-adv__hero-actions .btn{flex:1 1 auto;text-align:center}
  .popster-adv__products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .popster-adv__categories-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}
/* Thank-you page: style ONLY the post-order confirmation. Do not touch checkout form/payment. */
.popster-thankyou{max-width:1160px;margin:32px auto 72px;padding:0 18px;color:#242322}
.popster-thankyou__hero{background:#f7f5f0;border:1px solid #e8e5dc;border-radius:20px;padding:clamp(24px,4vw,54px);text-align:center}
.popster-thankyou__hero--failed{background:#fff6f3;border-color:#f2cbc0}
.popster-thankyou__mark{display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;background:#e0efe5;color:#246039;font-size:34px;font-weight:700;margin:0 auto 17px}
.popster-thankyou__hero--failed .popster-thankyou__mark{background:#ffe4db;color:#a23618}
.popster-thankyou__eyebrow{display:block;font-size:12px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;margin-bottom:7px}
.popster-thankyou h1{font-size:clamp(27px,4vw,44px);margin:0 0 10px;line-height:1.15}
.popster-thankyou__hero p{max-width:520px;margin:0 auto;line-height:1.55;color:#575452}
.popster-thankyou__overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0 28px}
.popster-thankyou__overview>div{background:#fff;border:1px solid #e7e3db;border-radius:12px;padding:18px;overflow-wrap:anywhere}
.popster-thankyou__overview span{display:block;font-size:12px;color:#666;margin-bottom:7px}
.popster-thankyou__overview strong{display:block;font-size:15px;color:#23211f}
.popster-thankyou__woocommerce-content .woocommerce-order-details,.popster-thankyou__woocommerce-content .woocommerce-customer-details{background:#fff;border:1px solid #e7e3db;border-radius:14px;padding:clamp(16px,3vw,28px);margin:20px 0;overflow:hidden}
.popster-thankyou__woocommerce-content h2{font-size:clamp(21px,3vw,27px);margin:0 0 14px}
.popster-thankyou__woocommerce-content table{width:100%;border-collapse:collapse;table-layout:auto}
.popster-thankyou__woocommerce-content th,.popster-thankyou__woocommerce-content td{padding:13px 10px;border-bottom:1px solid #eeeae4;vertical-align:middle;line-height:1.45}
.popster-thankyou__woocommerce-content tfoot tr:last-child td,.popster-thankyou__woocommerce-content tfoot tr:last-child th{border-bottom:0}
.popster-thankyou__product{display:inline-flex;align-items:center;gap:12px;text-align:left}
.popster-thankyou__product-thumb{width:62px;height:76px;object-fit:cover;border-radius:6px;flex-shrink:0}
.popster-thankyou__woocommerce-content address{font-style:normal;line-height:1.8;overflow-wrap:anywhere}
.popster-thankyou__actions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:26px}
.popster-thankyou__outline{border:1px solid #444;background:transparent;color:#333}
@media(max-width:767px){
  .popster-thankyou{margin:18px auto 45px;padding:0 12px}
  .popster-thankyou__overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .popster-thankyou__overview>div{padding:12px}
  .popster-thankyou__woocommerce-content .woocommerce-order-details,.popster-thankyou__woocommerce-content .woocommerce-customer-details{padding:12px}
  .popster-thankyou__woocommerce-content table{font-size:13px}
  .popster-thankyou__woocommerce-content th,.popster-thankyou__woocommerce-content td{padding:10px 5px;overflow-wrap:anywhere}
  .popster-thankyou__product{gap:7px}
  .popster-thankyou__product-thumb{width:40px;height:52px}
}

/* POPSTER v3.10.1 - homepage category cards: image 4:5, title and count BELOW image.
   Scoped to homepage only: WooCommerce/shop, landing ADV and other grids unchanged. */
body.home .popster-home-collections-grid .collection-card {
  display:block;
  aspect-ratio:auto;
  overflow:visible;
  border-radius:0;
  min-width:0;
  text-decoration:none;
}
body.home .popster-home-collections-grid .collection-card__img {
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:4/5;
  object-fit:cover;
  object-position:center;
  border-radius:12px;
  transform:none;
}
body.home .popster-home-collections-grid .collection-card:hover .collection-card__img {
  transform:none;
}
body.home .popster-home-collections-grid .collection-card__overlay {
  position:static;
  inset:auto;
  padding:13px 1px 0;
  background:transparent;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:flex-start;
  text-align:left;
  min-width:0;
}
body.home .popster-home-collections-grid .collection-card__tag {
  color:var(--color-primary,#e65d3d);
  font-size:10px;
  font-weight:700;
  letter-spacing:.12em;
  margin:0 0 5px;
}
body.home .popster-home-collections-grid .collection-card__name {
  color:var(--color-text,#222);
  font-size:clamp(21px,2.2vw,27px);
  line-height:1.18;
  margin:0 0 6px;
  overflow-wrap:anywhere;
}
body.home .popster-home-collections-grid .collection-card__count {
  color:var(--color-text-light,#666);
  font-size:14px;
  line-height:1.3;
}
@media(max-width:767px) {
  /* Full-bleed horizontal gallery: cards reach the edges of the phone viewport. */
  body.home .collections > .container {
    width:100%;
    max-width:none;
    padding-left:0;
    padding-right:0;
    margin-left:0;
    margin-right:0;
  }
  body.home .collections .section-header {
    padding-left:16px;
    padding-right:16px;
    margin-bottom:24px;
  }
  body.home .popster-home-collections-grid {
    display:flex;
    width:100%;
    max-width:100%;
    gap:12px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:0 0 18px;
    margin:0;
    scroll-snap-type:x mandatory;
    scroll-padding-left:0;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  body.home .popster-home-collections-grid::-webkit-scrollbar {display:none}
  body.home .popster-home-collections-grid .collection-card {
    flex:0 0 83vw;
    width:83vw;
    max-width:83vw;
    scroll-snap-align:start;
  }
  body.home .popster-home-collections-grid .collection-card__img {
    border-radius:0;
  }
  body.home .popster-home-collections-grid .collection-card__overlay {
    padding:13px 14px 0;
  }
  body.home .popster-home-collections-grid .collection-card__name {
    font-size:23px;
  }
}

/* POPSTER v3.10.2: la CTA 'Visualizza categorie' lascia visibile
   il titolo della sezione quando l'header sticky copre la pagina. */
body.home #collezioni { scroll-margin-top: 92px; }

/* Pulsante finale Home: identico allo stile precedente, ma con testo e link editabili. */
body.home .popster-home-banner-button{font-size:16px;padding:16px 40px}
