/* SUNMONT-PRODUCT-PAGE-TEMPLATE / R2-APPROVED-UX-01.
 * Scoped reference rollout: CMS89 and native Shoptet8764. Field values stay native. */
:is(#sm-product-reference,body[data-sm-reference="retail-8764"],body[data-sm-reference="c80-config"]){--sm-green:#82b000;--sm-dark:#20261c;--sm-paper:#fff;--sm-soft:#f4f7ef;--sm-line:#dce3d7;--sm-grey:#61685d;--sm-link:#577629;color:var(--sm-dark);font-family:inherit;line-height:1.55;color-scheme:light}
#sm-product-reference *,[data-sm-dialog] *,body[data-sm-reference] .sm-mobile-action *{box-sizing:border-box}
#sm-product-reference{max-width:1280px;margin:auto;padding:24px 30px 34px;background:#fff}
#sm-product-reference .sm-hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:30px;align-items:start}
#sm-product-reference .sm-photo{display:block;width:100%;aspect-ratio:1.12;border:0;padding:0;overflow:hidden;background:#f4f7ef;border-radius:10px;cursor:zoom-in}
#sm-product-reference .sm-photo img{display:block;width:100%;height:100%;object-fit:cover}
#sm-product-reference h1,body[data-sm-reference="retail-8764"] .p-detail-inner-header h1{font-size:clamp(28px,3.6vw,42px);line-height:1.1;letter-spacing:-1.5px;font-weight:650;margin:12px 0 18px;color:#20261c;text-transform:none;overflow-wrap:anywhere}
#sm-product-reference .sm-lead{font-size:16px;color:#4f5749;margin:0 0 24px}
#sm-product-reference .sm-action-card{background:#f4f7ef;border-radius:9px;padding:19px;color:#20261c}
#sm-product-reference .sm-action-card h2{font-size:17px;line-height:1.3;margin:0 0 5px;letter-spacing:-.2px}
#sm-product-reference .sm-action-card p{font-size:12px;color:#61685d;margin:0 0 15px}
#sm-product-reference .sm-button,[data-sm-dialog] .sm-button,.sm-mobile-action .sm-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:46px;border:1px solid #dce3d7;border-radius:6px;padding:12px 17px;background:#fff;color:#20261c;font:600 14px/1.3 inherit;text-decoration:none;cursor:pointer}
#sm-product-reference .sm-primary,.sm-mobile-action .sm-primary{background:#82b000;border-color:#82b000;color:#20261c;width:100%}
#sm-product-reference .sm-secondary-actions{display:flex;gap:14px;flex-wrap:wrap;margin:16px 0}
#sm-product-reference .sm-link{display:inline-flex;align-items:center;min-height:44px;padding:6px 0;border:0;background:none;color:#577629;font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
#sm-product-reference .sm-fine{font-size:12px;color:#61685d;border-top:1px solid #dce3d7;padding-top:15px}
#sm-product-reference .sm-section-nav{display:flex;gap:23px;flex-wrap:wrap;padding:23px 0 15px;border-bottom:1px solid #dce3d7;margin-top:16px;font-size:13px}
#sm-product-reference .sm-section-nav a{color:#577629;min-height:44px;display:inline-flex;align-items:center}
#sm-product-reference :focus-visible,[data-sm-dialog] :focus-visible,.sm-mobile-action :focus-visible,body[data-sm-reference="retail-8764"] #content :focus-visible{outline:3px solid #577629;outline-offset:3px}
body[data-sm-reference="cms-89"] [aria-label="Obsah riešenia"]{max-width:1280px;margin:auto;padding-top:15px}
body[data-sm-reference="cms-89"] [aria-label="Obsah riešenia"] h2{font-size:25px;line-height:1.25;letter-spacing:-.5px}
body[data-sm-reference="cms-89"] [aria-label="Obsah riešenia"] h3{font-size:20px;line-height:1.3}
body[data-sm-reference="cms-89"] [aria-label="Obsah riešenia"] table{width:100%;border-collapse:collapse}
body[data-sm-reference="cms-89"] [aria-label="Obsah riešenia"] td{padding:12px 8px;border-bottom:1px solid #dce3d7;overflow-wrap:anywhere}
[data-sm-dialog]{padding:0;border:1px solid #dce3d7;border-radius:12px;color:#20261c;background:#fff;width:min(1280px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 40px);overflow:auto}
[data-sm-dialog]::backdrop{background:#20261cbb}
[data-sm-dialog] .sm-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-bottom:1px solid #dce3d7;background:#fff;position:sticky;top:0;z-index:3}
[data-sm-dialog] .sm-dialog-head h2{font-size:18px;line-height:1.3;margin:0}
#sm-config-dialog iframe{width:100%;height:calc(100dvh - 135px)!important;min-height:200px;border:0;border-radius:0!important;display:block}
#sm-gallery-dialog img{display:block;width:100%;max-height:calc(100dvh - 150px);object-fit:contain}
.sm-mobile-action{display:none}
/* Native retail adapter: no duplicate price, variant, stock or cart controls. */
body[data-sm-reference="retail-8764"] #content{width:100%;max-width:none;padding:24px 30px}
body[data-sm-reference="retail-8764"] .sidebar{display:none}
body[data-sm-reference="retail-8764"] .content-wrapper-in{max-width:1280px;margin:auto;display:block}
body[data-sm-reference="retail-8764"] .product-top{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:30px;margin:0;align-items:start}
body[data-sm-reference="retail-8764"] .product-top>.col-xs-12{width:auto;min-width:0;padding:0;float:none}
body[data-sm-reference="retail-8764"] .product-top>.col-xs-12:first-child{grid-column:2;grid-row:2}
body[data-sm-reference="retail-8764"] .p-image-wrapper{grid-column:1;grid-row:1 / span 2;background:#f4f7ef;border-radius:10px;overflow:hidden}
body[data-sm-reference="retail-8764"] .p-image img{width:100%;max-height:540px;object-fit:contain}
body[data-sm-reference="retail-8764"] .p-info-wrapper{grid-column:2;grid-row:1}
body[data-sm-reference="retail-8764"] .p-detail-inner-header{margin:0}
body[data-sm-reference="retail-8764"] .p-code{color:#61685d;font-size:12px}
body[data-sm-reference="retail-8764"] .p-short-description{font-size:16px;color:#4f5749;margin:16px 0 22px}
body[data-sm-reference="retail-8764"] .sm-native-action{background:#f4f7ef;padding:19px;border-radius:9px}
body[data-sm-reference="retail-8764"] .p-final-price-wrapper{margin:0 0 10px}
body[data-sm-reference="retail-8764"] .price-final{font-size:30px;line-height:1.25;color:#20261c}
body[data-sm-reference="retail-8764"] .availability-value{margin:0 0 17px}
body[data-sm-reference="retail-8764"] .add-to-cart{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
body[data-sm-reference="retail-8764"] .add-to-cart-button{background:#82b000;border:1px solid #82b000;color:#20261c;border-radius:6px;min-height:46px;font-size:14px;flex:1;text-transform:none}
body[data-sm-reference="retail-8764"] .quantity input{min-height:46px;font-size:16px}
body[data-sm-reference="retail-8764"] #description{line-height:1.65;overflow-wrap:anywhere}
body[data-sm-reference="retail-8764"] #description h3{font-size:23px;line-height:1.3;letter-spacing:-.5px;margin-top:28px;text-transform:none}
body[data-sm-reference="retail-8764"] .p-detail-tabs{margin-top:30px;border-bottom:1px solid #dce3d7}
/* Existing C80 draft engine remains byte-identical; only presentation is adapted. */
body[data-sm-reference="c80-config"]{--green:#82b000;--ink:#20261c;--soft:#f4f7ef;--line:#dce3d7;--sm-action:#82b000;--sm-ink:#20261c;--sm-muted:#61685d;--sm-accent:#577629;--sm-focus:#577629;background:#fff}
body[data-sm-reference="c80-config"] main{max-width:1160px;margin:16px auto}
body[data-sm-reference="c80-config"] .stage.phase-start,body[data-sm-reference="c80-config"] .stage.phase-config{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:24px}
body[data-sm-reference="c80-config"] .pin{grid-column:1;grid-row:1 / span 2;top:10px}
body[data-sm-reference="c80-config"] #controls{grid-column:2;grid-row:1}
body[data-sm-reference="c80-config"] .summary{grid-column:2;grid-row:2;position:static;max-height:none}
body[data-sm-reference="c80-config"] .panel{box-shadow:none;border-radius:10px;background:#f4f7ef}
body[data-sm-reference="c80-config"] .btn,body[data-sm-reference="c80-config"] .opt{border-radius:6px;min-height:44px}
body[data-sm-reference="c80-config"] .page-sections,body[data-sm-reference="c80-config"] #mobilePrice{display:none}
@media(max-width:700px){
 #sm-product-reference{padding:20px 18px 28px}
 #sm-product-reference .sm-hero{grid-template-columns:1fr;gap:24px}
 #sm-product-reference .sm-photo{aspect-ratio:1.5;max-height:280px}
 #sm-product-reference h1,body[data-sm-reference="retail-8764"] .p-detail-inner-header h1{font-size:31px;letter-spacing:-1px}
 #sm-product-reference .sm-lead,body[data-sm-reference="retail-8764"] .p-short-description{font-size:15px}
 #sm-product-reference .sm-action-card{padding:17px}
 #sm-product-reference .sm-section-nav{gap:13px 19px;font-size:12px}
 [data-sm-dialog]{width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}
 [data-sm-dialog] .sm-dialog-head{padding:10px 12px}
 [data-sm-dialog] .sm-dialog-head h2{font-size:16px}
 #sm-config-dialog iframe{height:calc(100dvh - 76px)!important}
 .sm-mobile-action:not([hidden]){display:flex;position:fixed;bottom:0;left:0;right:0;z-index:45;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #dce3d7;background:#fff;padding:10px 18px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -4px 18px #20261c10;font-size:12px;color:#20261c}
 .sm-mobile-action .sm-button{width:auto;flex:none}
 body[data-sm-bar-visible]{padding-bottom:100px}
 body[data-sm-reference="retail-8764"] #content{padding:20px 18px}
 body[data-sm-reference="retail-8764"] .product-top{grid-template-columns:1fr;gap:20px}
 body[data-sm-reference="retail-8764"] .p-image-wrapper{grid-column:1;grid-row:1}
 body[data-sm-reference="retail-8764"] .p-image img{height:230px!important;object-fit:contain}
 body[data-sm-reference="retail-8764"] .p-info-wrapper{grid-column:1;grid-row:2}
 body[data-sm-reference="retail-8764"] .product-top>.col-xs-12:first-child{grid-column:1;grid-row:3}
 body[data-sm-reference="retail-8764"] .add-to-cart{flex-wrap:wrap}
 body[data-sm-reference="retail-8764"] .add-to-cart-button{min-width:140px}
 body[data-sm-reference="retail-8764"] .sm-native-action{padding:17px}
 body[data-sm-reference="c80-config"] .stage.phase-start,body[data-sm-reference="c80-config"] .stage.phase-config{display:flex;flex-direction:column;gap:12px}
 body[data-sm-reference="c80-config"] .stage>*{width:100%;min-width:0}
 body[data-sm-reference="c80-config"] .pin{position:sticky;top:0;padding:10px;max-height:none;overflow:visible}
 body[data-sm-reference="c80-config"] .pin .technical{min-height:0;background:white}
 body[data-sm-reference="c80-config"] .pin svg{max-height:125px!important;min-height:80px}
 body[data-sm-reference="c80-config"] .inputgrid{gap:8px}
 body[data-sm-reference="c80-config"] .ghead .step-summary{width:100%;flex-basis:100%;text-align:left}
 body[data-sm-reference="c80-config"] main{padding:0 10px 16px}
}
@media(prefers-reduced-motion:reduce){#sm-product-reference *,[data-sm-dialog] *,body[data-sm-reference] .sm-mobile-action *{scroll-behavior:auto;transition:none}}

/* Respect hidden state despite author-level flex/display rules. */
#sm-product-reference [hidden],[data-sm-dialog] [hidden],.sm-mobile-action[hidden]{display:none!important}
