/* Compact product layout; only appearance/order, no replacement of Shoptet's form. */
html.fs-v15-preview body.type-product .p-detail{max-width:1180px!important;padding:14px 18px 48px!important}
html.fs-v15-preview body.type-product #product-detail-form>.product-top{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:18px!important}
html.fs-v15-preview body.type-product #product-detail-form>.product-top>.p-image-wrapper,
html.fs-v15-preview body.type-product #product-detail-form>.product-top>.p-info-wrapper{align-self:start}
html.fs-v15-preview body.type-product #product-detail-form>.product-top>.p-image-wrapper{padding:10px!important}
html.fs-v15-preview body.type-product #product-detail-form>.product-top>.p-info-wrapper{padding:clamp(18px,2vw,26px)!important}
html.fs-v15-preview body.type-product .p-image-wrapper .p-image,
html.fs-v15-preview body.type-product .p-image-wrapper .p-image .p-main-image{height:410px;min-height:0!important;max-height:410px!important}
html.fs-v15-preview body.type-product .p-image-wrapper .p-image img{max-height:380px!important}
html.fs-v15-preview body.type-product .p-thumbnails-wrapper{margin-top:10px}
html.fs-v15-preview body.type-product .p-info-wrapper>.fs-v15-brand{display:block;float:none!important;margin:0 0 8px;color:#5b635e;font-size:14px;line-height:1.35}
html.fs-v15-preview body.type-product .p-info-wrapper>.fs-v15-brand a{color:inherit;text-decoration:none}
html.fs-v15-preview body.type-product .p-info-wrapper .p-detail-inner-header{display:flow-root!important;float:none!important;clear:both!important;height:auto!important;min-height:0!important;margin:0 0 8px!important;padding:0!important;border:0!important}
html.fs-v15-preview body.type-product .p-info-wrapper .p-detail-inner-header h1{display:block!important;float:none!important;clear:both!important;position:static!important;transform:none!important;width:auto!important;max-width:100%;height:auto!important;margin:0 0 8px!important;padding:0!important;font-size:clamp(27px,2.8vw,40px)!important;line-height:1.08!important;overflow-wrap:break-word}
html.fs-v15-preview body.type-product .p-info-wrapper .p-code{display:block;float:none!important;clear:both!important;margin-top:4px;font-size:13px;line-height:1.4}
html.fs-v15-preview body.type-product .p-info-wrapper .price-line{height:auto!important;min-height:0!important;margin:0 0 10px!important;padding:0!important}
html.fs-v15-preview body.type-product .p-info-wrapper .price-final{font-size:clamp(29px,2.8vw,38px)!important;line-height:1.12}
html.fs-v15-preview body.type-product .p-info-wrapper .p-detail-info{display:flex;flex-direction:column;align-items:stretch;gap:8px;float:none!important;clear:both!important;width:100%!important;height:auto!important;min-height:0!important;margin:0 0 12px!important;padding:0!important}
html.fs-v15-preview body.type-product .p-info-wrapper .p-short-description{float:none!important;clear:both!important;width:100%!important;height:auto!important;margin:0!important;padding:0!important;font-size:15px!important;line-height:1.48!important}
html.fs-v15-preview body.type-product .p-info-wrapper .p-short-description p{margin:0 0 6px!important}
html.fs-v15-preview body.type-product .p-info-wrapper .p-short-description a{font-size:15px!important;line-height:1.4!important}
html.fs-v15-preview body.type-product .p-info-wrapper .flags{position:static!important;float:none!important;margin:0 0 4px!important}
html.fs-v15-preview body.type-product .p-info-wrapper :is(.smart-perso-box,.fs-color-detail,.fs-variant-detail,#dkLabNoteMainWrapper,.fs-bundle-box){max-width:100%;box-sizing:border-box}
html.fs-v15-preview body.type-product .p-info-wrapper .smart-perso-box{margin:12px 0!important}
html.fs-v15-preview body.type-product .p-info-wrapper>.availability-value{margin:10px 0!important}
html.fs-v15-preview body.type-product .p-info-wrapper>.add-to-cart{margin:10px 0 16px!important;gap:10px}
html.fs-v15-preview body.type-product .p-info-wrapper>.add-to-cart .add-to-cart-button{min-height:50px}
/* Keep variable-length copy in normal flow; remove the legacy oversized buy-row padding. */
html.fs-v15-preview body.type-product .p-info-wrapper .detail-parameters{margin-top:14px!important}
html.fs-v15-preview body.type-product .p-info-wrapper>.add-to-cart{padding:10px 0!important;align-items:center!important;justify-content:flex-start!important}
html.fs-v15-preview body.type-product .p-info-wrapper>.add-to-cart .add-to-cart-button{flex:0 1 260px!important;width:min(100%,260px)!important;max-width:260px!important;min-height:52px!important;padding:8px 18px!important;white-space:normal}
html.fs-v15-preview body.type-product .p-info-wrapper>.add-to-cart .quantity{flex:0 0 120px!important}
/* Color plugin appends its selectors after the native buy row. Reorder visually, keep DOM/form intact. */
html.fs-v15-preview body.type-product.fs-color-product #product-detail-form .p-info-wrapper{display:flex!important;flex-direction:column!important;align-items:stretch}
html.fs-v15-preview body.type-product.fs-color-product .p-info-wrapper>.p-detail-inner-header{order:0}
html.fs-v15-preview body.type-product.fs-color-product .p-info-wrapper>.price-line{order:1}
html.fs-v15-preview body.type-product.fs-color-product .p-info-wrapper>.p-detail-info{order:2}
html.fs-v15-preview body.type-product.fs-color-product .p-info-wrapper>#dkLabNoteMainWrapper{order:3}
html.fs-v15-preview body.type-product.fs-color-product .p-info-wrapper>.smart-perso-box{order:4}
html.fs-v15-preview body.type-product.fs-color-product .p-info-wrapper>.fs-color-detail{order:5;margin:10px 0!important}
html.fs-v15-preview body.type-product.fs-color-product .p-info-wrapper>.availability-value{order:6}
html.fs-v15-preview body.type-product.fs-color-product .p-info-wrapper>.add-to-cart{order:7}
html.fs-v15-preview body.type-product.fs-color-product .p-info-wrapper>.social-buttons-wrapper{order:8}
html.fs-v15-preview body.type-product.fs-color-product .p-info-wrapper>p:empty{display:none}
@media(max-width:1000px){
  html.fs-v15-preview body.type-product #product-detail-form>.product-top{grid-template-columns:minmax(0,1fr)!important}
  html.fs-v15-preview body.type-product .p-image-wrapper .p-image,
  html.fs-v15-preview body.type-product .p-image-wrapper .p-image .p-main-image{height:350px;max-height:350px!important}
  html.fs-v15-preview body.type-product .p-image-wrapper .p-image img{max-height:330px!important}
}
@media(max-width:620px){
  html.fs-v15-preview body.type-product .p-detail{padding:8px 12px 34px!important}
  html.fs-v15-preview body.type-product #product-detail-form>.product-top>.p-info-wrapper{padding:16px!important}
  html.fs-v15-preview body.type-product .p-info-wrapper .p-detail-info{gap:6px!important;margin-bottom:8px!important}
  html.fs-v15-preview body.type-product .p-info-wrapper .detail-parameters{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;margin-top:8px!important;table-layout:fixed!important}
  html.fs-v15-preview body.type-product .p-info-wrapper .fs-compact-toggle{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;padding:0 14px!important}
  html.fs-v15-preview body.type-product .p-info-wrapper .fs-compact-toggle-label{min-width:0!important;font-size:13px!important;white-space:normal}
  html.fs-v15-preview body.type-product .p-info-wrapper .fs-compact-toggle-value{min-width:0!important;white-space:nowrap!important;font-size:12px!important}
  html.fs-v15-preview body.type-product .p-info-wrapper>.availability-value{margin:6px 0!important}
  html.fs-v15-preview body.type-product .p-image-wrapper .p-image,
  html.fs-v15-preview body.type-product .p-image-wrapper .p-image .p-main-image{height:290px;max-height:290px!important}
  html.fs-v15-preview body.type-product .p-image-wrapper .p-image img{max-height:270px!important}
  html.fs-v15-preview body.type-product .p-info-wrapper .p-detail-inner-header h1{font-size:clamp(27px,7vw,36px)!important}
  html.fs-v15-preview body.type-product .p-info-wrapper>.add-to-cart{display:grid!important;grid-template-columns:minmax(0,100px) minmax(0,1fr);align-items:center;gap:10px;padding:8px 0!important;margin:6px 0 10px!important}
  html.fs-v15-preview body.type-product .p-info-wrapper>.add-to-cart .quantity{width:100%!important;max-width:100%!important}
  html.fs-v15-preview body.type-product .p-info-wrapper>.add-to-cart .quantity{flex:0 1 auto!important}
  html.fs-v15-preview body.type-product .p-info-wrapper>.add-to-cart .add-to-cart-button{flex:1 1 auto!important;width:100%!important;max-width:none!important;min-width:0!important;min-height:50px!important;padding:8px 10px!important;font-size:13px!important;line-height:1.2!important;white-space:normal}
  html.fs-v15-preview body.type-product .p-info-wrapper>.social-buttons-wrapper{margin-top:18px!important;margin-bottom:16px!important}
}

/* Responsive detail: one real gallery first, then the complete information/form. */
@media(max-width:1000px){
  html.fs-v15-preview body.type-product #product-detail-form>.product-top{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:14px!important}
  html.fs-v15-preview body.type-product #product-detail-form>.product-top>.p-image-wrapper{order:-2!important;width:100%!important;max-width:100%!important;min-width:0!important}
  html.fs-v15-preview body.type-product #product-detail-form>.product-top>.p-info-wrapper{order:-1!important;width:100%!important;max-width:100%!important;min-width:0!important}
}
@media(max-width:360px){
  html.fs-v15-preview body.type-product .p-info-wrapper>.add-to-cart{grid-template-columns:minmax(0,86px) minmax(0,1fr);gap:6px}
}

/* V3 mobile: the variant plugin places a DIV inside Shoptet's table. Do not let
   the table's intrinsic width push the picker outside the product card. */
@media(max-width:620px){
  html.fs-v15-preview body.type-product .p-info-wrapper .detail-parameters:has(.fs-compact-variants),
  html.fs-v15-preview body.type-product .p-info-wrapper .detail-parameters:has(.fs-compact-variants)>tbody{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  html.fs-v15-preview body.type-product .p-info-wrapper .fs-compact-variants{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  html.fs-v15-preview body.type-product .p-info-wrapper .fs-compact-toggle{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;width:100%!important;min-width:0!important;max-width:100%!important;padding:0 12px!important;box-sizing:border-box!important}
  html.fs-v15-preview body.type-product .p-info-wrapper .fs-compact-toggle-label{flex:1 1 auto!important;min-width:0!important;font-size:13px!important;line-height:1.2!important}
  html.fs-v15-preview body.type-product .p-info-wrapper .fs-compact-toggle-value{flex:0 0 auto!important;white-space:nowrap!important;font-size:12px!important}
  html.fs-v15-preview body.type-product .p-info-wrapper .fs-compact-panel{width:100%!important;max-width:100%!important;box-sizing:border-box!important}
}

/* One responsive order for plain, size, colour, and personalized products.
   The V3 product script puts the gallery first in the DOM and moves only the
   static heading/brand; native Shoptet purchase fields stay in their form. */
@media(max-width:1000px){
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>.p-image-wrapper{order:-3!important;display:block!important;flex:none!important;width:100%!important;min-width:0!important;max-width:100%!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>.p-info-wrapper{order:-2!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;flex:none!important;width:100%!important;min-width:0!important;max-width:100%!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>*{order:30}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.fs-v15-brand{order:0!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.p-detail-inner-header{order:1!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>:is(.p-final-price-wrapper,.price-line){order:2!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.p-detail-info{order:3!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.p-short-description{order:4!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>#dkLabNoteMainWrapper{order:5!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.smart-perso-box{order:6!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>:is(.detail-parameters,.fs-compact-variants,.fs-color-detail,.fs-variant-detail,.fs-bundle-box){order:7!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.availability-value{order:8!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.add-to-cart{order:9!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.social-buttons-wrapper{order:10!important}
}

/* Bring the live Shoptet detail closer to the V15 mock without replacing its form. */
html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>.fs-v3-empty-heading-slot{display:none!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>:is(.p-image-wrapper,.p-info-wrapper){box-sizing:border-box;border:1px solid #dedfd9;background:#fff;box-shadow:none}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-image-wrapper .p-image{display:grid;place-items:center;background:#f4f4f0}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-thumbnails-wrapper{padding-top:8px}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper .p-detail-inner-header h1{font-style:italic!important;font-weight:900!important;letter-spacing:-.035em;text-transform:uppercase}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper .p-short-description{color:#59605a}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.availability-value{font-weight:700}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.add-to-cart .add-to-cart-button{border-radius:3px!important;font-weight:900!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper :is(.fs-compact-toggle,.fs-color-detail,.smart-perso-box){max-width:100%;box-sizing:border-box}
@media(min-width:1001px){
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top.fs-v3-two-column{display:grid!important;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)!important;align-items:start;gap:22px!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>:is(.p-image-wrapper,.p-info-wrapper){width:100%!important;min-width:0!important;max-width:100%!important}
}
@media(max-width:620px){
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top{gap:10px!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>.p-image-wrapper{padding:10px!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>.p-info-wrapper{padding:20px 16px!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-image-wrapper .p-image,
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-image-wrapper .p-image .p-main-image{height:320px;max-height:320px!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-image-wrapper .p-image img{max-height:300px!important}
}

/* Desktop details: title first, aligned cards, compact gallery without fake height. */
@media(min-width:1001px){
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top{align-items:start!important;row-gap:0!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>.p-info-wrapper{display:flex!important;flex-direction:column!important;align-self:start!important;min-height:0!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.p-detail-inner-header{order:-2!important;margin:0 0 8px!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.fs-v15-brand{order:-1!important;margin:0 0 8px!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-image-wrapper{align-self:start!important;height:auto!important;min-height:0!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-image-wrapper .p-image,
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-image-wrapper .p-main-image{height:380px!important;min-height:0!important;max-height:380px!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-image-wrapper .p-image img{max-height:360px!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified .p-thumbnails-wrapper{margin-top:8px!important;padding-top:0!important}
}
/* Separate Shoptet's brand label from flags and establish one content order.
   The gallery remains the first direct child on narrow screens. */
html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>.p-info-wrapper{display:flex!important;flex-direction:column!important;align-items:stretch!important;align-self:start!important;min-height:0!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>*{order:20}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.p-detail-inner-header{order:0!important;position:relative!important;z-index:1;margin:0 0 7px!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.fs-v15-brand{order:1!important;position:static!important;display:block!important;float:none!important;clear:both!important;transform:none!important;width:auto!important;height:auto!important;min-height:0!important;margin:0 0 9px!important;padding:0!important;color:#59605a;font-size:13px;line-height:1.35}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.fs-v15-brand a{position:static!important;display:inline!important;color:inherit!important;text-decoration:none}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>:is(.p-final-price-wrapper,.price-line){order:2!important;margin:0 0 10px!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.p-detail-info{order:3!important;position:static!important;display:block!important;width:100%!important;height:auto!important;min-height:0!important;margin:0 0 8px!important;padding:0!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.p-detail-info .flags{position:static!important;float:none!important;transform:none!important;margin:0!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.p-short-description{order:4!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>p[data-testid="productCardDescr"]{order:5!important;margin:4px 0 10px!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>:is(.smart-perso-box,#dkLabNoteMainWrapper){order:6!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>:is(.detail-parameters,.fs-compact-variants,.fs-color-detail,.fs-variant-detail,.fs-bundle-box){order:7!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.availability-value{order:8!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.add-to-cart{order:9!important}
html.fs-v15-preview body.type-product.fs-v3-product-unified .p-info-wrapper>.social-buttons-wrapper{order:10!important}
@media(max-width:1000px){
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>.p-image-wrapper{order:-2!important}
  html.fs-v15-preview body.type-product.fs-v3-product-unified #product-detail-form>.product-top>.p-info-wrapper{order:-1!important}
}
