/* +PHARMA v3.78.0 — Full-width responsive single product + 3-image gallery */

/* Product page uses the full available viewport, with controlled gutters. */
.single-product .pp-shop-page{
  padding:28px 0 72px!important;
  overflow-x:hidden!important;
}
.single-product .pp-shop-page>.pp-shell{
  width:calc(100% - 48px)!important;
  max-width:none!important;
  margin-inline:auto!important;
  padding:0!important;
}
.single-product .woocommerce{
  width:100%!important;
  max-width:none!important;
}
.single-product .woocommerce .woocommerce-breadcrumb{
  width:100%!important;
  margin:0 0 22px!important;
}

/* Main product split: gallery + information. */
.single-product .woocommerce div.product{
  display:grid!important;
  grid-template-columns:minmax(0,1.02fr) minmax(460px,.98fr)!important;
  gap:clamp(30px,4vw,72px)!important;
  align-items:start!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}
.single-product .woocommerce div.product div.images,
.single-product .woocommerce div.product div.summary{
  float:none!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
}

/* Clean gallery card. */
.single-product .woocommerce div.product div.images.woocommerce-product-gallery{
  position:relative!important;
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr)!important;
  grid-template-rows:auto!important;
  column-gap:18px!important;
  padding:18px!important;
  border:1px solid #d9e1df!important;
  border-radius:22px!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:none!important;
}

/* WooCommerce FlexSlider viewport / main stage. */
.single-product .woocommerce-product-gallery .flex-viewport,
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper{
  grid-column:2!important;
  grid-row:1!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  border-radius:16px!important;
  background:#f7f9f8!important;
  overflow:hidden!important;
}
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image a{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:clamp(520px,57vw,820px)!important;
  max-height:820px!important;
  margin:0!important;
  background:#f7f9f8!important;
}
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-height:820px!important;
  aspect-ratio:1/1!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:0 auto!important;
  padding:clamp(8px,1.4vw,20px)!important;
}

/* Three-image thumbnail rail. */
.single-product .woocommerce-product-gallery .flex-control-thumbs{
  grid-column:1!important;
  grid-row:1!important;
  align-self:start!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
  width:92px!important;
  margin:0!important;
  padding:0!important;
  list-style:none!important;
  max-height:none!important;
  overflow:visible!important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li{
  float:none!important;
  width:92px!important;
  height:92px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid #d7e0de!important;
  border-radius:12px!important;
  overflow:hidden!important;
  background:#fff!important;
  cursor:pointer!important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li:nth-child(n+4){
  display:none!important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  padding:5px!important;
  margin:0!important;
  object-fit:contain!important;
  object-position:center!important;
  border:0!important;
  border-radius:10px!important;
  opacity:.68!important;
  transition:opacity .18s ease,box-shadow .18s ease!important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active,
.single-product .woocommerce-product-gallery .flex-control-thumbs img:hover{
  opacity:1!important;
  box-shadow:inset 0 0 0 2px #4A7671!important;
}
.single-product .woocommerce-product-gallery__trigger{
  top:34px!important;
  right:34px!important;
  z-index:8!important;
  width:42px!important;
  height:42px!important;
  border-radius:50%!important;
  background:#fff!important;
  border:1px solid #d9e1df!important;
  box-shadow:0 8px 24px rgba(40,70,66,.08)!important;
}

/* Product information column. */
.single-product .woocommerce div.product div.summary{
  padding:8px 0 0!important;
}
.single-product .woocommerce div.product .product_title{
  margin:0 0 18px!important;
  font-size:clamp(42px,4vw,72px)!important;
  line-height:.92!important;
  letter-spacing:-.045em!important;
  color:#284642!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}
.single-product .pp-product-facts{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  margin:18px 0 22px!important;
}
.single-product .pp-product-facts span{
  min-width:0!important;
  width:100%!important;
  min-height:96px!important;
  padding:14px 16px!important;
  border-left:0!important;
  border-radius:10px!important;
  background:#eef1f0!important;
  line-height:1.45!important;
}
.single-product .woocommerce div.product p.price,
.single-product .woocommerce div.product span.price{
  display:block!important;
  margin:20px 0!important;
  font-size:20px!important;
  font-weight:800!important;
  color:#2f6e67!important;
}
.single-product .woocommerce-product-details__short-description,
.single-product .pp-single-long-description,
.single-product .pp-single-long-copy{
  width:100%!important;
  max-width:none!important;
  text-align:left!important;
  font-size:16px!important;
  line-height:1.75!important;
  color:#5a6e6b!important;
  overflow-wrap:break-word!important;
}
.single-product .woocommerce div.product form.cart{
  width:100%!important;
  max-width:none!important;
  display:grid!important;
  grid-template-columns:112px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:stretch!important;
  margin:26px 0 0!important;
}
.single-product .woocommerce div.product form.cart .quantity,
.single-product .woocommerce div.product form.cart .single_add_to_cart_button{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}
.single-product .woocommerce div.product .quantity .qty{
  width:100%!important;
  height:52px!important;
  border-radius:12px!important;
}
.single-product .woocommerce div.product form.cart .single_add_to_cart_button{
  min-height:52px!important;
  border-radius:12px!important;
  background:#4A7671!important;
  color:#fff!important;
}

/* Full-width content beneath the two primary columns. */
.single-product .pp-science-panel,
.single-product .woocommerce-tabs,
.single-product .related.products,
.single-product .upsells.products{
  grid-column:1 / -1!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
.single-product .pp-science-panel{
  margin-top:28px!important;
}

/* Tablet: keep two columns but reduce gallery rail and title. */
@media (max-width:1180px){
  .single-product .pp-shop-page>.pp-shell{width:calc(100% - 32px)!important}
  .single-product .woocommerce div.product{
    grid-template-columns:minmax(0,1fr) minmax(390px,.9fr)!important;
    gap:30px!important;
  }
  .single-product .woocommerce div.product div.images.woocommerce-product-gallery{
    grid-template-columns:78px minmax(0,1fr)!important;
    gap:12px!important;
    padding:14px!important;
  }
  .single-product .woocommerce-product-gallery .flex-control-thumbs{width:78px!important;gap:10px!important}
  .single-product .woocommerce-product-gallery .flex-control-thumbs li{width:78px!important;height:78px!important}
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image a{min-height:500px!important}
  .single-product .woocommerce div.product .product_title{font-size:clamp(38px,4.6vw,58px)!important}
}

/* Mobile / small tablet: full-width stacked layout, gallery with 3 thumbnails below. */
@media (max-width:820px){
  .single-product .pp-shop-page{padding:14px 0 50px!important}
  .single-product .pp-shop-page>.pp-shell{width:calc(100% - 20px)!important;max-width:none!important}
  .single-product .woocommerce .woocommerce-breadcrumb{margin-bottom:12px!important;font-size:10px!important;text-align:left!important}
  .single-product .woocommerce div.product{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:22px!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  .single-product .woocommerce div.product div.images.woocommerce-product-gallery{
    display:flex!important;
    flex-direction:column!important;
    gap:10px!important;
    width:100%!important;
    padding:10px!important;
    border-radius:16px!important;
  }
  .single-product .woocommerce-product-gallery .flex-viewport,
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper{
    order:1!important;
    width:100%!important;
    border-radius:12px!important;
  }
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image a{
    width:100%!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:1/1!important;
  }
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img{
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    aspect-ratio:1/1!important;
    object-fit:contain!important;
    padding:6px!important;
  }
  .single-product .woocommerce-product-gallery .flex-control-thumbs{
    order:2!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
  }
  .single-product .woocommerce-product-gallery .flex-control-thumbs li{
    width:100%!important;
    height:auto!important;
    aspect-ratio:1/1!important;
    border-radius:10px!important;
  }
  .single-product .woocommerce-product-gallery__trigger{top:22px!important;right:22px!important}
  .single-product .woocommerce div.product div.summary{
    width:100%!important;
    max-width:none!important;
    padding:0 2px!important;
    text-align:left!important;
  }
  .single-product .woocommerce div.product .product_title{
    margin:0 0 14px!important;
    font-size:clamp(34px,10.5vw,48px)!important;
    line-height:.95!important;
    text-align:left!important;
    overflow-wrap:break-word!important;
  }
  .single-product .pp-product-facts{
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin:14px 0 18px!important;
  }
  .single-product .pp-product-facts span{min-height:0!important;padding:12px 14px!important}
  .single-product .woocommerce div.product form.cart{
    grid-template-columns:96px minmax(0,1fr)!important;
    gap:8px!important;
    margin-top:20px!important;
  }
  .single-product .woocommerce-product-details__short-description,
  .single-product .pp-single-long-description,
  .single-product .pp-single-long-copy{
    font-size:15px!important;
    line-height:1.65!important;
  }
  .single-product .pp-science-panel{
    grid-template-columns:1fr!important;
    gap:14px!important;
    margin-top:16px!important;
    padding-top:28px!important;
  }
  .single-product .pp-science-panel .pp-wide{grid-column:1!important}
  .single-product .pp-science-panel>div{padding:22px!important;border-radius:14px!important}
  .single-product .woocommerce-tabs ul.tabs{width:100%!important;overflow-x:auto!important;white-space:nowrap!important}
}

@media (max-width:480px){
  .single-product .pp-shop-page>.pp-shell{width:calc(100% - 16px)!important}
  .single-product .woocommerce div.product form.cart{grid-template-columns:1fr!important}
  .single-product .woocommerce div.product form.cart .quantity,
  .single-product .woocommerce div.product form.cart .single_add_to_cart_button{width:100%!important}
  .single-product .woocommerce div.product .product_title{font-size:clamp(31px,10vw,42px)!important}
}

/* ==========================================================
   v3.78 — deterministic custom gallery (no FlexSlider dependency)
   ========================================================== */
.single-product .woocommerce div.product .pp378-gallery{
  position:relative!important;
  display:grid!important;
  grid-template-columns:96px minmax(0,1fr)!important;
  grid-template-areas:"thumbs stage"!important;
  gap:16px!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:16px!important;
  border:1px solid #d9e1df!important;
  border-radius:22px!important;
  background:#fff!important;
  overflow:visible!important;
}
.single-product .pp378-gallery-stage{
  grid-area:stage!important;
  position:relative!important;
  display:grid!important;
  place-items:center!important;
  min-width:0!important;
  width:100%!important;
  aspect-ratio:1/1!important;
  min-height:520px!important;
  max-height:820px!important;
  border-radius:16px!important;
  background:#f7f9f8!important;
  overflow:hidden!important;
}
.single-product .pp378-gallery-main{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:820px!important;
  padding:clamp(10px,1.6vw,24px)!important;
  object-fit:contain!important;
  object-position:center!important;
  cursor:zoom-in!important;
  transition:opacity .16s ease!important;
}
.single-product .pp378-gallery-thumbs{
  grid-area:thumbs!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  align-content:start!important;
  gap:12px!important;
  width:96px!important;
}
.single-product .pp378-thumb{
  appearance:none!important;
  display:grid!important;
  place-items:center!important;
  width:96px!important;
  height:96px!important;
  padding:5px!important;
  margin:0!important;
  border:1px solid #d7e0de!important;
  border-radius:12px!important;
  background:#fff!important;
  cursor:pointer!important;
  overflow:hidden!important;
  box-shadow:none!important;
}
.single-product .pp378-thumb img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  border-radius:8px!important;
}
.single-product .pp378-thumb.is-active{
  border-color:#4A7671!important;
  box-shadow:inset 0 0 0 1px #4A7671!important;
}
.single-product .pp378-gallery-zoom{
  position:absolute!important;
  top:16px!important;
  right:16px!important;
  z-index:3!important;
  width:42px!important;
  height:42px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid #d9e1df!important;
  border-radius:50%!important;
  background:#fff!important;
  color:#284642!important;
  font-size:22px!important;
  line-height:1!important;
  cursor:pointer!important;
}
.single-product .pp378-gallery-empty{
  display:grid!important;
  place-items:center!important;
  min-height:420px!important;
}
.single-product .pp378-lightbox[hidden]{display:none!important}
.single-product .pp378-lightbox{
  position:fixed!important;
  inset:0!important;
  z-index:999999!important;
  display:grid!important;
  place-items:center!important;
  padding:24px!important;
  background:rgba(18,31,29,.92)!important;
}
.single-product .pp378-lightbox img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:min(92vw,1400px)!important;
  max-height:90vh!important;
  object-fit:contain!important;
  border-radius:12px!important;
  background:#fff!important;
}
.single-product .pp378-lightbox-close{
  position:fixed!important;
  top:18px!important;
  right:22px!important;
  z-index:2!important;
  width:44px!important;
  height:44px!important;
  border:1px solid rgba(255,255,255,.35)!important;
  border-radius:50%!important;
  background:rgba(255,255,255,.1)!important;
  color:#fff!important;
  font-size:32px!important;
  line-height:1!important;
  cursor:pointer!important;
}
html.pp378-lightbox-open{overflow:hidden!important}

@media (max-width:1180px){
  .single-product .woocommerce div.product .pp378-gallery{
    grid-template-columns:78px minmax(0,1fr)!important;
    gap:12px!important;
    padding:12px!important;
  }
  .single-product .pp378-gallery-thumbs{width:78px!important;gap:10px!important}
  .single-product .pp378-thumb{width:78px!important;height:78px!important}
  .single-product .pp378-gallery-stage{min-height:440px!important}
}

@media (max-width:820px){
  .single-product .woocommerce div.product .pp378-gallery{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-areas:"stage" "thumbs"!important;
    gap:10px!important;
    width:100%!important;
    padding:10px!important;
    border-radius:16px!important;
  }
  .single-product .pp378-gallery-stage{
    width:100%!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:1/1!important;
    border-radius:12px!important;
  }
  .single-product .pp378-gallery-main{
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    padding:6px!important;
  }
  .single-product .pp378-gallery-thumbs{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
  }
  .single-product .pp378-thumb{
    width:100%!important;
    height:auto!important;
    aspect-ratio:1/1!important;
    border-radius:10px!important;
  }
  .single-product .pp378-gallery-zoom{top:12px!important;right:12px!important}
  .single-product .pp378-lightbox{padding:12px!important}
  .single-product .pp378-lightbox img{max-width:96vw!important;max-height:88dvh!important}
}
