main :is(nav.product-section-buttons, nav.product-jump, nav.product-sections) > a[href$="#description"],
main a.product-description-link[href$="#description"],
main :is(nav.product-section-buttons, nav.product-jump, nav.product-sections):has(> a[href$="#description"]):not(:has(> a:not([href$="#description"]), > button)) {
  display: none !important;
}

html body :is(main, #main) .mol-doctor-entry details > summary.mol-doctor-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid #a5b89b !important;
  border-radius: 8px;
  background: #edf2e8;
  color: #153d31 !important;
  text-decoration: none !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

html body :is(main, #main) .mol-doctor-entry details > summary.mol-doctor-link:hover {
  background: #e1ead9;
}

html body :is(main, #main) .mol-doctor-entry details > summary.mol-doctor-link::after {
  content: "+";
  flex: none;
}

html body :is(main, #main) .mol-doctor-entry details[open] > summary.mol-doctor-link::after {
  content: "−";
}

/* Leave space for the full add-to-cart label and quantity in package rows. */
html body #main :is(#purchase, #purchase-2, .indication-purchase) .mol-pdp-options {
  --mol-package-action-width: 156px;
}

html:lang(ka) body #main :is(#purchase, #purchase-2, .indication-purchase) .mol-pdp-options {
  --mol-package-action-width: 174px;
}

@media (max-width: 360px) {
  html body #main :is(#purchase, #purchase-2, .indication-purchase) .mol-pdp-options {
    --mol-package-action-width: 132px;
  }

  html:lang(ka) body #main :is(#purchase, #purchase-2, .indication-purchase) .mol-pdp-options {
    --mol-package-action-width: 154px;
  }
}

/* The package rows provide the product's purchase controls. */
#main :is(.product-detail, .full-product, .page-hero, .solution-hero):has(.mol-pdp-options > .mol-card-package-row)
  :is(.product-summary, .product-detail-copy, .page-hero-copy, .solution-hero-copy, .product-actions) > a[data-mol-buy][href$="#purchase"],
#main :is(.product-detail, .full-product, .page-hero, .solution-hero):has(.mol-pdp-options > .mol-card-package-row)
  :is(.product-summary, .product-detail-copy, .page-hero-copy, .solution-hero-copy, .product-actions) > a[data-mol-buy][href$="#purchase-2"] {
  display: none !important;
}

@media (max-width: 680px) {
  html body #main :is(#purchase, #purchase-2) .mol-pdp-options > .mol-card-package-row {
    column-gap: 4px !important;
    padding-inline: 6px !important;
  }

  html body #main :is(#purchase, #purchase-2) .mol-card-package-row > .cms-package-label {
    font-size: clamp(12px, 3.55vw, 14px) !important;
    white-space: normal !important;
  }

  html body #main :is(#purchase, #purchase-2) .mol-card-package-row > :is(b, .cms-package-value) {
    font-size: clamp(12px, 3.55vw, 14px) !important;
    white-space: nowrap !important;
  }

  html body #main :is(#purchase, #purchase-2) .mol-card-package-row :is(.cms-price-current, .storefront-current-price, .storefront-product-status) {
    max-width: none;
    white-space: nowrap !important;
  }

  html body #main :is(#purchase, #purchase-2) .mol-card-controls {
    width: var(--mol-package-action-width) !important;
  }

  html body #main :is(#purchase, #purchase-2) .mol-card-controls > a:is(.preorder-whatsapp, .mol-card-cart-add) {
    width: 100% !important;
    padding-inline: 6px !important;
  }

  html body #main :is(#purchase, #purchase-2) .mol-card-count-compact {
    font-size: 12px !important;
    padding-inline: 3px;
  }
}

@media (max-width: 360px) {
  html body #main :is(#purchase, #purchase-2) .mol-pdp-options > .mol-card-package-row {
    column-gap: 3px !important;
    padding-inline: 5px !important;
  }

  html body #main :is(#purchase, #purchase-2) .mol-card-controls > a:is(.preorder-whatsapp, .mol-card-cart-add) {
    gap: 4px;
    padding-inline: 4px !important;
  }

  html body #main :is(#purchase, #purchase-2) .mol-card-count-compact {
    padding-inline: 2px;
  }
}

/* Keep doctor support aligned with the entire purchase panel. */
html body #main .mol-doctor-entry--purchase {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100%;
}
html body #main .product-purchase + .mol-doctor-entry--purchase {
  max-width: 42rem;
}
html body #main .mol-doctor-entry--purchase > details {
  width: 100% !important;
}
html body #main .mol-doctor-entry--purchase > details > summary.mol-doctor-link {
  display: flex !important;
  box-sizing: border-box;
  width: 100% !important;
  min-height: 52px;
}

/* Compact related cards keep the image beside the heading, while package
   controls use the entire card. Long Georgian pack labels keep whole words. */
html body #main #purpose-related :is(.card-prices, .cms-package-prices)
  > .mol-card-package-row > :is(.cms-package-label, span:first-child) {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

@media (max-width: 680px) {
  html body #main #purpose-related[data-purpose-related] .card-link {
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) !important;
    align-items: start;
    gap: 0 12px;
    padding: 14px !important;
  }

  html body #main #purpose-related[data-purpose-related] .card-info {
    display: contents !important;
  }

  html body #main #purpose-related[data-purpose-related] .card-image {
    grid-column: 1;
    grid-row: 1 / span 2;
    height: 114px;
    padding: 0;
  }

  html body #main #purpose-related[data-purpose-related] .card-image img.poster {
    height: 108px;
    max-height: 108px;
  }

  html body #main #purpose-related[data-purpose-related] .category-label {
    grid-column: 2;
    grid-row: 1;
    margin: 2px 0 6px;
  }

  html body #main #purpose-related[data-purpose-related] .card-info h3 {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    margin: 0 0 12px;
    align-self: start;
  }

  html body #main #purpose-related[data-purpose-related] .card-prices {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 12px;
    padding-top: 12px;
  }

  html body #main #purpose-related[data-purpose-related] .card-details {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  html body #main #purpose-related .purpose-related-card {
    --related-image-height: 114px;
    --related-image-padding: 0px;
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) !important;
    align-items: start;
    gap: 0 12px;
    padding: 14px !important;
  }

  html body #main #purpose-related .purpose-related-info {
    display: contents !important;
  }

  html body #main #purpose-related .purpose-related-image {
    grid-column: 1;
    grid-row: 1;
    background: none;
  }

  html body #main #purpose-related .purpose-related-info h3 {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    margin: 0 0 12px;
    align-self: start;
  }

  html body #main #purpose-related .purpose-related-info > .cms-package-prices {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 12px;
    padding-top: 12px;
  }

  html body #main #purpose-related .purpose-related-details {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

/* The existing named layer contains important package-grid rules. Extend
   that same layer so they cannot force narrow columns in related cards. */
@layer molisan-package-columns {
/* Price and pack share the first line; the equally sized action spans
   the second line. This remains readable at320px and large counters. */
html body #main #purpose-related :is(.card-prices, .cms-package-prices):has(> .mol-card-package-row) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  gap: 12px 10px !important;
}

html body #main #purpose-related .mol-card-package-row {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  gap: 8px 10px !important;
  padding: 0 0 12px !important;
}

html body #main #purpose-related .mol-card-package-row > :is(.cms-package-label, span:first-child) {
  grid-column: 1 !important;
  grid-row: 1 !important;
  white-space: normal !important;
  font-size: 14px !important;
}

html body #main #purpose-related .mol-card-package-row > :is(b, .cms-package-value) {
  grid-column: 2 !important;
  grid-row: 1 !important;
  max-width: none;
  white-space: nowrap !important;
}

html body #main #purpose-related .mol-card-controls {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  width: 100% !important;
}

html body #main #purpose-related .mol-card-controls > a:is(.preorder-whatsapp, .mol-card-cart-add) {
  width: 100% !important;
}
}

/* Owner mobile detail layout, 16.11.2026: compact bottle and native Doctor spacing. */
@layer molisan-package-columns {
@media (max-width:1099px) {
  html body #main :is(.product-detail-copy,.product-summary,.page-hero-copy,.solution-hero-copy):has(> #purchase [data-mol-pack-choice]):has(> #purchase + .mol-doctor-entry--purchase) > #purchase .mol-pack-choice[data-mol-pack-choice] {
    grid-auto-rows:auto!important;
  }
  html body #main :is(.product-detail-copy,.product-summary,.page-hero-copy,.solution-hero-copy):has(> #purchase [data-mol-pack-choice]):has(> #purchase + .mol-doctor-entry--purchase) > #purchase {
    padding-bottom:0!important;
    margin-bottom:0!important;
  }
  html body #main :is(.product-detail-copy,.product-summary,.page-hero-copy,.solution-hero-copy):has(> #purchase [data-mol-pack-choice]):has(> #purchase + .mol-doctor-entry--purchase) > #purchase + .mol-doctor-entry--purchase {
    margin-top:12px!important;
  }
  html body #main :is(.product-detail-copy,.product-summary,.page-hero-copy,.solution-hero-copy):has(> #purchase [data-mol-pack-choice]):has(> #purchase + .mol-doctor-entry--purchase) > #purchase + .mol-doctor-entry--purchase > details {
    margin-top:0!important;
  }
}
@media (max-width:650px) {
  html body #main .product-detail.full-product:has(> .product-summary > .eyebrow > .product-category-link:is([href$="/solutions.html"],[href$="/solutions/"])) {row-gap:10px!important;}
  html body #main .product-detail.full-product:has(> .product-summary > .eyebrow > .product-category-link:is([href$="/solutions.html"],[href$="/solutions/"])) > .product-summary > .eyebrow {margin-bottom:4px!important;}
  html body #main .product-detail.full-product:has(> .product-summary > .eyebrow > .product-category-link:is([href$="/solutions.html"],[href$="/solutions/"])) > .product-summary > h1 {margin-bottom:10px!important;}
  html body #main .product-detail.full-product:has(> .product-summary > .eyebrow > .product-category-link:is([href$="/solutions.html"],[href$="/solutions/"])) > .product-summary #purchase .order-box {margin-top:12px!important;padding-top:8px!important;}

  html body #main .product-detail.full-product:has(> .product-summary > .eyebrow > .product-category-link:is([href$="/solutions.html"],[href$="/solutions/"])) > .product-visual {
    height:180px!important;
    height:clamp(140px,calc(100svh - 560px),220px)!important;
    min-height:0!important;
    padding:10px!important;
  }
  html body #main .product-detail.full-product:has(> .product-summary > .eyebrow > .product-category-link:is([href$="/solutions.html"],[href$="/solutions/"])) > .product-visual > .zoom-link {
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    padding:0!important;
  }
  html body #main .product-detail.full-product:has(> .product-summary > .eyebrow > .product-category-link:is([href$="/solutions.html"],[href$="/solutions/"])) > .product-visual > .zoom-link > img {
    width:auto!important;
    height:100%!important;
    min-height:0!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
  }
}
}

/* Owner-approved compact photo heroes: exactly15 products, mobile only,16.11.2026. */
@layer molisan-package-columns{
@media(max-width:650px){
html body #main .product-detail:has(> .product-detail-copy > #purchase:is([data-purchase-product="MOL-AGRO-SILVER"],[data-purchase-product="MOL-ALOE-VERA"],[data-purchase-product="MOL-AQUASOL"],[data-purchase-product="MOL-BETHLEHEM"],[data-purchase-product="MOL-LOTION"],[data-purchase-product="MOL-NANO-COPPER"],[data-purchase-product="MOL-NANO-GOLD"],[data-purchase-product="MOL-NANO-SILVER"],[data-purchase-product="MOL-NANO-ZINC"],[data-purchase-product="MOL-RECTOVAG-ANT"],[data-purchase-product="MOL-BLUE"],[data-purchase-product="MOL-LUXURY-GOLD-WATER"],[data-purchase-product="MOL-CLASSIC"])) > .product-detail-visual{box-sizing:border-box!important;height:180px!important;height:clamp(140px,calc(100svh - 560px),220px)!important;min-height:0!important;max-height:220px!important;padding:10px!important;display:flex!important;align-items:center!important;justify-content:center!important;}
html body #main .product-detail:has(> .product-detail-copy > #purchase:is([data-purchase-product="MOL-AGRO-SILVER"],[data-purchase-product="MOL-ALOE-VERA"],[data-purchase-product="MOL-AQUASOL"],[data-purchase-product="MOL-BETHLEHEM"],[data-purchase-product="MOL-LOTION"],[data-purchase-product="MOL-NANO-COPPER"],[data-purchase-product="MOL-NANO-GOLD"],[data-purchase-product="MOL-NANO-SILVER"],[data-purchase-product="MOL-NANO-ZINC"],[data-purchase-product="MOL-RECTOVAG-ANT"],[data-purchase-product="MOL-BLUE"],[data-purchase-product="MOL-LUXURY-GOLD-WATER"],[data-purchase-product="MOL-CLASSIC"])) > .product-detail-visual > img{box-sizing:border-box!important;width:auto!important;height:100%!important;min-height:0!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;}
html body #main .product-detail.full-product:is([data-order-product="aquasol"],[data-order-product="agro-silver"]){row-gap:10px!important;}
html body #main .product-detail.full-product:is([data-order-product="aquasol"],[data-order-product="agro-silver"]) > .product-summary > .eyebrow{margin-bottom:4px!important;}
html body #main .product-detail.full-product:is([data-order-product="aquasol"],[data-order-product="agro-silver"]) > .product-summary > h1{margin-bottom:10px!important;}
html body #main .product-detail.full-product:is([data-order-product="aquasol"],[data-order-product="agro-silver"]) > .product-summary > #purchase .order-box{margin-top:12px!important;padding-top:8px!important;}
html body #main .product-detail.full-product:is([data-order-product="aquasol"],[data-order-product="agro-silver"]) > .product-visual{box-sizing:border-box!important;height:180px!important;height:clamp(140px,calc(100svh - 560px),220px)!important;min-height:0!important;max-height:220px!important;padding:10px!important;}
html body #main .product-detail.full-product:is([data-order-product="aquasol"],[data-order-product="agro-silver"]) > .product-visual > .zoom-link{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;height:100%!important;min-height:0!important;max-height:100%!important;padding:0!important;}
html body #main .product-detail.full-product:is([data-order-product="aquasol"],[data-order-product="agro-silver"]) > .product-visual > .zoom-link > img{box-sizing:border-box!important;width:auto!important;height:100%!important;min-height:0!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;}
}
}

/* Product reading boundaries: compact outer spacing; native content and controls preserved. */
@layer molisan-package-columns {
  /* Molisan article template: the reading row follows the completed photo
     and purchase row. Set row-gap only; preserve the desktop column gap. */
  html body[data-product-reading][data-section="products"][data-layout="product-detail"] #main > article.product-detail:has(> .product-detail-copy > #purchase[data-purchase-product]):has(> .product-description-content > #description.original-product-description) {
    row-gap:24px!important;
    padding-bottom:24px!important;
  }
  html body[data-product-reading][data-section="products"][data-layout="product-detail"] #main > article.product-detail:has(> .product-detail-copy > #purchase[data-purchase-product]):has(> .product-description-content > #description.original-product-description) > .product-description-content > #description.original-product-description {
    padding-block:0!important;
  }
  html body[data-product-reading][data-section="products"][data-layout="product-detail"] #main > article.product-detail:has(> .product-detail-copy > #purchase[data-purchase-product]):has(> .product-description-content > #description.original-product-description) > .product-description-content > #description.original-product-description > .detail-accordions > details:first-child {
    margin-top:0!important;
  }
  html body[data-product-reading][data-section="products"][data-layout="product-detail"] #main > article.product-detail:has(> .product-detail-copy > #purchase[data-purchase-product]):has(> .product-description-content > #description.original-product-description) > .product-description-content > #description.original-product-description > .detail-accordions > details:last-child {
    margin-bottom:0!important;
  }
  html body[data-product-reading][data-section="products"][data-layout="product-detail"] #main > article.product-detail:has(> .product-detail-copy > #purchase[data-purchase-product]):has(> .product-description-content > #description.original-product-description) > .product-description-content > .product-actions {
    margin-top:16px!important;
  }
  html body[data-product-reading][data-section="products"][data-layout="product-detail"] #main > article.product-detail:has(> .product-detail-copy > #purchase[data-purchase-product]):has(> .product-description-content > #description.original-product-description) + section.reviews-related.profile-reviews[data-profile-kind="product"] {
    margin-top:0!important;
    padding-top:16px!important;
  }

  /* Molisan page-hero template: retain its complete image/intro flow above
     the reading article. Only the completed reading article's footer and
     the immediately following product reviews receive compact spacing. */
  html body[data-product-reading][data-section="products"] #main > section.page-hero:has(> .page-hero-copy > #purchase[data-purchase-product]) + article.content-shell:has(> #description.original-product-description):has(> .product-actions) {
    padding-bottom:24px!important;
  }
  html body[data-product-reading][data-section="products"] #main > section.page-hero:has(> .page-hero-copy > #purchase[data-purchase-product]) + article.content-shell:has(> #description.original-product-description):has(> .product-actions) > .product-actions {
    margin-top:16px!important;
  }
  html body[data-product-reading][data-section="products"] #main > section.page-hero:has(> .page-hero-copy > #purchase[data-purchase-product]) + article.content-shell:has(> #description.original-product-description):has(> .product-actions) + section.reviews-related.profile-reviews[data-profile-kind="product"] {
    margin-top:0!important;
    padding-top:16px!important;
  }

  /* Molisani summaries contain genuine currency/contact text after Doctor.
     Keep that content and its native spacing. Trim only the completed
     panel's outer bottom padding and the following description margin. */
  html body.product-page[data-product-reading] #main > .wrap:has(> #description.full-details) > .product-detail.full-product[data-order-product]:has(> .product-summary > #purchase [data-mol-pack-choice]) {
    padding-bottom:12px!important;
  }
  html body.product-page[data-product-reading] #main > .wrap:has(> .product-detail.full-product[data-order-product] > .product-summary > #purchase [data-mol-pack-choice]) > #description.full-details {
    margin-top:12px!important;
  }

  @media (max-width:680px) {
    html body[data-product-reading][data-section="products"][data-layout="product-detail"] #main > article.product-detail:has(> .product-detail-copy > #purchase[data-purchase-product]):has(> .product-description-content > #description.original-product-description) {
      row-gap:16px!important;
    }
    html body[data-product-reading][data-section="products"][data-layout="product-detail"] #main > article.product-detail:has(> .product-detail-copy > #purchase[data-purchase-product]):has(> .product-description-content > #description.original-product-description) > .product-detail-copy > .mol-doctor-entry--purchase:last-child {
      margin-bottom:0!important;
    }
  }
}
