html[data-preview-theme="dark-navy"]{--theme-bg:#141F2B;--theme-panel:#223244;--ink:#EFF3F7;--muted:#B5C6D8;--line:#465D74;--orange:#F76B1C;color-scheme:dark}
/* Local preview only: six palettes share the same orange accent. */
html[data-preview-theme] body{background:var(--theme-bg);color:var(--ink)}
html[data-preview-theme] :is(header,.header,.nav,.footer,.site-footer,.demofooter){background:var(--theme-bg);color:var(--ink)}
html[data-preview-theme] :is(.navlinks,.producttabs button,.producttabs button small,.intro,.chips,.sectionlabel,.technicalsection .support,.detailgrid p,.detailtop small,.technicalnote,.proof span,.quality p,.footer,.demofooter,.page-intro,.breadcrumb,.catalog-card small,.process-grid p,.contact-strip>span,.contact-grid p,.machine-feature p,.machine-details p,.machine-details li,.reference-controls span,.portal-main>p,.portal-cards p,.portal-status p,.site-footer address,.site-footer p,.hint){color:var(--muted)}
html[data-preview-theme] :is(.about-home p:not(.eyebrow),.corporate-grid article>p:not(.eyebrow),.values-grid p:not(.eyebrow)){color:var(--muted)}
html[data-preview-theme] :is(.production,.request,.corporate-highlight,.catalog-card,.portal-status,.product-placeholder,.producttabs button[aria-selected=true]){background:var(--theme-panel);color:var(--ink)}
html[data-preview-theme] :is(.btn.outline,.portal-link,.footer b,.site-footer b,.reference-controls button,.menu-toggle,.nav .language-toggle,.nav .language-options,.nav .language-options button,.requestform label){color:var(--ink)}
html[data-preview-theme] :is(.reference-controls button,.menu-toggle,.nav .language-toggle,.nav .language-options,.nav .language-options button,.requestform input,.requestform textarea,.requestform select){background:var(--theme-panel);border-color:var(--line)}
html[data-preview-theme] :is(.requestform input,.requestform textarea,.requestform select){color:var(--ink);color-scheme:light dark}
html[data-preview-theme] .requestform ::placeholder{color:var(--muted);opacity:1}
html[data-preview-theme] :is(.producttabs,.detailgrid,.detailgrid article,.technicalsection,.about-home,.page-heading,.values-grid,.contact-strip,.catalog-card,.portal-link,.quality,.machine-details,.site-footer){border-color:var(--line)}
html[data-preview-theme] :is(.btn,.reference-controls button:hover){background:var(--orange);color:#171B19}
html[data-preview-theme] .btn.outline{background:transparent;border-color:var(--line)}
html[data-preview-theme] :is(.eyebrow,.hero h1 em,.request h2 em,.navlinks a[aria-current=page],.catalog-card h3 span,.producttabs button[aria-selected=true] small){color:var(--orange)}
html[data-preview-theme] .reference-logos{scrollbar-color:var(--orange) var(--theme-panel)}
html[data-preview-theme] .visualbottom{background:var(--theme-panel);color:var(--ink)}
html[data-preview-theme] .visual.drawing{background-color:var(--theme-panel)}
/* Preserve source photographs and white reference logos on their own surfaces. */
.product-context{position:relative;width:100%;height:100%;isolation:isolate;overflow:hidden;background:transparent}
.product-context>img{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:contain;padding:18px}
.product-context-corner{position:absolute;left:0;top:0;width:46%;height:54%;z-index:0;overflow:hidden;opacity:.42;mask-image:radial-gradient(ellipse at top left,#000 0%,#000a 28%,transparent 74%);pointer-events:none}
.product-context-corner:before{content:'';position:absolute;inset:0;background-image:url('assets/product-context-backgrounds-small.webp');background-size:300% 200%;background-position:var(--context-position);filter:saturate(.6)}
.context-energy{--context-position:0% 0%}.context-fuel{--context-position:50% 0%}.context-electrical{--context-position:100% 0%}.context-workshop{--context-position:0% 100%}.context-logistics{--context-position:50% 100%}.context-construction{--context-position:100% 100%}
.product-context.is-opaque .product-context-corner{z-index:2;width:46%;height:25%;opacity:.42;mask-image:radial-gradient(ellipse at top left,#000 0%,#000a 28%,transparent 74%)}
.context-farm .product-context-corner:before{background-image:url('assets/agriculture-reference-three.jpg');background-size:800% 300%;background-position:43% 40%}
.visual>.product-context{position:absolute;inset:0}
.visual:has(>.product-context) .visualtop,.visual:has(>.product-context) .visualbottom{z-index:3}
.visual.cabin .product-context>img{padding:35px 18px 60px;background:transparent}
html[data-preview-theme] .catalog-grid .catalog-card.modern-product-card{background:transparent;border:0;color:var(--ink)}
.modern-product-card .catalog-card-image{height:290px;position:relative;border:1px solid var(--line);border-radius:24px 6px 48px 6px;background:transparent;overflow:hidden;transition:border-color .2s,transform .2s}
.modern-product-card .catalog-card-image>img{padding:18px;width:100%;height:100%;object-fit:contain}
.modern-product-card>div:last-child{padding:20px 0 8px}
.modern-product-card h3{margin:0;display:flex;align-items:center;gap:12px;font-size:24px;line-height:1.4}
.modern-product-card h3 span{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:0 0 40px;margin-left:auto;border:1px solid var(--line);border-radius:50%;color:var(--orange);transition:background .2s,color .2s}
.modern-product-card:hover .catalog-card-image{border-color:var(--orange);transform:translateY(-3px)}
.modern-product-card:hover h3 span{background:var(--orange);color:#17201b}
.modern-product-card:focus-visible{outline:2px solid var(--orange);outline-offset:6px;border-radius:24px 6px 0 0}
.catalog-card-image>.agriculture-slice{width:100%;height:100%;aspect-ratio:auto}
.modern-product-card .catalog-card-image:has(>.agriculture-slice){height:auto;aspect-ratio:1.7}
.visual>.agriculture-slice{position:absolute;inset:0;width:100%;height:100%;overflow:hidden}
.visual:has(>.agriculture-slice){background:transparent}
.visual:has(>.agriculture-slice) .visualtop,.visual:has(>.agriculture-slice) .visualbottom{z-index:1}
@media(max-width:700px){.modern-product-card .catalog-card-image{height:250px}.modern-product-card h3{font-size:22px}.catalog-grid:has(.modern-product-card){gap:34px}}
@media(prefers-reduced-motion:reduce){.modern-product-card .catalog-card-image,.modern-product-card h3 span,.modern-product-card img{transition:none;transform:none!important}}
html[data-preview-theme] .catalog-card:has(img[src*="-cutout"]){background:transparent}
html[data-preview-theme] :is(.visual,.product-gallery button,.gallery-modal):has(img[src*="-cutout"]){background:transparent}
html[data-preview-theme] .product-intro{color:var(--muted)}
html[data-preview-theme] .nav>a:first-child{background:transparent;padding:0;border-radius:0;justify-self:start;width:fit-content;max-width:100%}
html[data-preview-theme^="light"] .nav .logo{display:block;max-width:100%}
html[data-preview-theme^="light"] .language-options button:hover{background:var(--theme-bg)}
#theme-preview-picker{position:fixed;left:0;top:48%;z-index:1000;font:500 14px/1.5 'Manrope',sans-serif;color:var(--ink);filter:drop-shadow(0 3px 10px #0002)}
#theme-preview-picker summary{list-style:none;background:var(--theme-panel);border:1px solid var(--line);border-left:3px solid var(--orange);border-radius:0 6px 6px 0;padding:12px 8px;writing-mode:vertical-rl;cursor:pointer;min-height:64px;text-align:center}
#theme-preview-picker summary::-webkit-details-marker{display:none}
#theme-preview-picker>div{position:absolute;left:43px;top:0;width:245px;background:var(--theme-panel);border:1px solid var(--line);padding:18px;display:grid;gap:14px;border-radius:6px}
#theme-preview-picker select{width:100%;font:inherit;background:var(--theme-bg);color:var(--ink);border:1px solid var(--line);padding:10px 8px;min-height:44px}
#theme-preview-picker small{color:var(--muted);font-size:12px}
#theme-preview-picker .theme-preview-swatches{display:flex;gap:6px}
#theme-preview-picker .theme-preview-swatches span{height:28px;flex:1;border:1px solid var(--line);border-radius:3px}
#theme-preview-picker :focus-visible{outline:2px solid var(--orange);outline-offset:3px}
@media(max-width:700px){#theme-preview-picker{top:auto;bottom:22px}#theme-preview-picker>div{top:auto;bottom:0;width:min(245px,calc(100vw - 52px))}#theme-preview-picker summary{padding:10px 5px}#theme-preview-picker>div{left:37px}}

.context-wood .product-context-corner:before{background-image:url('assets/wood-depot-background.webp');background-size:cover;background-position:center}

/* Public light/dark switch: warm stone and midnight navy. */
#site-theme-toggle{position:fixed;left:16px;bottom:20px;z-index:1000;display:grid;place-items:center;width:42px;height:42px;padding:9px;border:1px solid var(--line);border-radius:50%;background:var(--theme-panel);color:var(--ink);cursor:pointer;box-shadow:0 3px 12px #0002}
#site-theme-toggle svg{width:22px;height:22px}
#site-theme-toggle:hover{border-color:var(--orange)}
#site-theme-toggle:focus-visible{outline:2px solid var(--orange);outline-offset:3px}
html[data-preview-theme="light-stone"] .requestform :is(input,textarea,select){color-scheme:light}
html[data-preview-theme="dark-navy"] .requestform :is(input,textarea,select){color-scheme:dark}

.nav>a:first-child{position:relative}.nav .logo{display:block}
html[data-preview-theme="dark-navy"] .nav>a:first-child:after{content:"";position:absolute;inset:0;background:url('assets/SAHMAKLOGO_WHITE.webp') center/100% 100% no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20159%2050%22%3E%3Cpath%20fill%3D%22white%22%20fill-rule%3D%22evenodd%22%20d%3D%22M0%200H50V50H0Z%20M43%2025a18%2018%200%201%200-36%200a18%2018%200%201%200%2036%200Z%22%2F%3E%3C%2Fsvg%3E") center/100% 100% no-repeat;pointer-events:none}
