/* Growshop product-page conversion layer (child theme, loaded after every
   registered sheet so it can correct measured layout defects without an
   !important war against the module layers).
   Owner: pdp_conversion, 2026-09-20. Scope: child-theme CSS/templates only.
   No JavaScript: the product page stays correct with scripting disabled.

   Verified defects this file corrects (measurements in
   docs/seo-conversion-20260920/PDP.md):
     1. Header lockup rendered 326x78 px at a 1265 px viewport (header 201 px tall).
     2. The manufacturer artwork rendered at its natural size - 300x300 for
        Plagron, 640x640 for CANNA - inside the 587 px info column. On the variant
        product it squeezed the H1 into a 0 px line box and pushed the add-to-cart
        button to y=1208 in a 712 px viewport.
     3. The approved delivery facts ("Livraison en France", minimum order) lived
        only in the header and footer, not next to the purchase control.

   The manufacturer mark becomes a compact, factual brand chip (native "Brand"
   string + manufacturer name + link to the brand page). Those image files are
   transparent frames around a wordmark - 242x39 art inside a 300x300 frame,
   616x199 inside 640x640 - so no single CSS box size renders every brand
   legibly and cropping would need per-brand assumptions. The chip needs no
   image, adds no layout shift and keeps a 44 px touch target.

   Untouched on purpose: #add-to-cart-or-refresh form fields, combination radio
   inputs, the native stock badge, AJAX refresh targets, gallery, thumbnails,
   product tabs and every recommendation item (kept, only made more compact). */

/* ---------- 1. Header lockup: gentle reduction, same proportions ---------- */
#gs-header .gs-header-main{grid-template-columns:minmax(0,240px) minmax(260px,1fr) auto;padding-block:var(--gs-space-3)}
#gs-header .gs-logo img{width:100%;max-width:240px;max-height:58px}

/* ---------- 2. Product header: compact brand chip beside the title ---------- */
body#product:has(#gs-header) .product-manufacturer-next,
body#product:has(#gs-header) .product-manufacturer-below{float:none!important;margin:0!important}
body#product:has(#gs-header) .gs-brand-chip{
  display:inline-flex;align-items:center;gap:var(--gs-space-2);
  min-height:44px;padding:6px var(--gs-space-4);
  border:1px solid var(--gs-line);border-radius:var(--gs-radius-pill);
  background:var(--gs-white);color:var(--gs-ink);
  font-family:var(--gs-font-body);font-size:14px;line-height:1.4;text-decoration:none;
}
body#product:has(#gs-header) .gs-brand-chip:hover,
body#product:has(#gs-header) .gs-brand-chip:focus-visible{border-color:var(--gs-forest);text-decoration:none}
body#product:has(#gs-header) .gs-brand-chip__label{
  font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--gs-muted);
}
body#product:has(#gs-header) .gs-brand-chip__name{font-size:14px;font-weight:600;white-space:nowrap}

@media(min-width:768px){
  body#product:has(#gs-header) .product_header_container{
    display:flex;flex-wrap:wrap;align-items:center;
    gap:var(--gs-space-2) var(--gs-space-4);
    padding-bottom:var(--gs-space-3);
  }
  body#product:has(#gs-header) .product_header_container>.page-title{
    order:1;flex:1 1 320px;min-width:0;margin:0!important;
  }
  body#product:has(#gs-header) .product-manufacturer-next{order:2;display:inline-flex;align-items:center}
  body#product:has(#gs-header) .product-manufacturer-below{order:3;flex:1 1 100%;margin-top:var(--gs-space-2)!important}
}

/* ---------- 3. Approved delivery facts next to the purchase control ---------- */
body#product:has(#gs-header) .gs-pdp-facts{
  display:flex;flex-wrap:wrap;gap:6px 18px;
  margin:var(--gs-space-3) 0 0;padding:0;list-style:none;
  font-family:var(--gs-font-body);font-size:13px;line-height:1.5;color:var(--gs-muted);
}
body#product:has(#gs-header) .gs-pdp-facts li{display:flex;align-items:center;gap:8px}
body#product:has(#gs-header) .gs-pdp-facts li+li::before{
  content:"";width:3px;height:3px;border-radius:50%;background:var(--gs-line-strong);
}

/* ---------- 4. Recommendation sidebar: same items, smaller footprint ---------- */
@media(min-width:768px){
  body#product:has(#gs-header) #main-product-wrapper .product-accessories-sidebar .block-title{
    font-size:18px;line-height:1.35;margin-bottom:var(--gs-space-3);
  }
  body#product:has(#gs-header) #main-product-wrapper .product-accessories-sidebar .thumbnail-container{
    flex:0 0 64px;max-width:64px;
  }
  body#product:has(#gs-header) #main-product-wrapper .product-accessories-sidebar .thumbnail-container img{
    width:56px;height:62px;object-fit:contain;
  }
  body#product:has(#gs-header) #main-product-wrapper .product-accessories-sidebar .product-title{
    font-size:14px;line-height:1.35;margin-bottom:2px;
  }
  body#product:has(#gs-header) #main-product-wrapper .product-accessories-sidebar .product-price{
    font-size:15px;
  }
}

/* ---------- Responsive ---------- */
@media(max-width:1199px){
  #gs-header .gs-header-main{grid-template-columns:minmax(0,216px) minmax(220px,1fr) auto}
  #gs-header .gs-logo img{max-width:216px;max-height:52px}
}
@media(max-width:991px){
  #gs-header .gs-header-main{grid-template-columns:1fr auto}
  #gs-header .gs-logo img{max-width:184px;max-height:46px}
}
@media(max-width:767px){
  #gs-header .gs-logo img{max-width:168px;max-height:42px}
  body#product:has(#gs-header) .product-manufacturer-next{
    grid-column:1/-1;grid-row:2;display:block;justify-self:start;
  }
  body#product:has(#gs-header) .gs-brand-chip{padding:5px var(--gs-space-3)}
}
@media(max-width:359px){
  #gs-header .gs-logo img{max-width:148px;max-height:38px}
}
