/* UCOCEKO Theme New V1.6.1 — universal responsive hardening. */
:root{
 --uco161-page:1440px;
 --uco161-content:1240px;
 --uco161-reading:760px;
 --uco161-gutter:clamp(14px,3vw,40px);
 --uco161-header-h:76px;
 --uco161-bottom-h:72px;
 --uco161-safe-top:env(safe-area-inset-top,0px);
 --uco161-safe-bottom:env(safe-area-inset-bottom,0px);
 --uco161-touch:46px;
}
html{max-inline-size:100%;overflow-x:clip!important;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body.ucoceko-theme-v161{max-inline-size:100%;min-inline-size:0;overflow-x:clip!important}
body.ucoceko-theme-v161 *,body.ucoceko-theme-v161 *::before,body.ucoceko-theme-v161 *::after{box-sizing:border-box}
body.ucoceko-theme-v161 :where(main,section,article,aside,header,footer,nav,div,form,fieldset,label,ul,ol,li){min-inline-size:0}
body.ucoceko-theme-v161 :where(img,picture,video,canvas,svg,iframe){max-inline-size:100%;height:auto}
body.ucoceko-theme-v161 :where(p,a,span,strong,small,td,th,label){overflow-wrap:anywhere}
body.ucoceko-theme-v161 :where(input,select,textarea,button){max-inline-size:100%;font:inherit}
body.ucoceko-theme-v161 :where(.uco22-container,.uco22-platform-container,.uco-page-hero__inner,.uco115-mega__shell){width:min(calc(100% - (2 * var(--uco161-gutter))),var(--uco161-content))!important;max-width:var(--uco161-content)!important;margin-inline:auto!important}

/* Avoid layout-breaking viewport-width children/decorations. */
body.ucoceko-theme-v161 :where(.uco22-site,.uco22-main,.uco22-home-hero,.uco-page-hero,.uco22-shop-hero,.uco115-footer,.uco500-footer,.woocommerce){max-inline-size:100%;overflow-x:clip}
body.ucoceko-theme-v161 :where([class*="__art"],[class*="__glow"],[class*="-leaf"],[class*="-pattern"],[class*="-wallpaper"]){max-inline-size:100%}

/* Fluid type; protects Huawei narrow logical viewports from giant titles. */
body.ucoceko-theme-v161 :is(.uco22-home-hero h1,.uco115-home-hero h1,.uco-page-hero h1,.uco22-shop-hero h1){font-size:clamp(2.35rem,7vw,5.9rem)!important;line-height:.98!important;text-wrap:balance}
body.ucoceko-theme-v161 :is(h2,.uco22-product-info h1){text-wrap:balance}

/* Header is allowed to shrink instead of pushing tools off-screen. */
body.ucoceko-theme-v161 .ucn11-header-inner{display:grid!important;grid-template-columns:minmax(130px,auto) minmax(0,1fr) auto!important;gap:clamp(10px,2vw,24px)!important;align-items:center!important}
body.ucoceko-theme-v161 .ucn11-header-brand{min-width:0;max-width:220px}
body.ucoceko-theme-v161 .ucn11-header-brand img{max-width:100%;height:auto;object-fit:contain}
body.ucoceko-theme-v161 .ucn11-nav{min-width:0;justify-content:center;gap:clamp(4px,1.1vw,16px)!important}
body.ucoceko-theme-v161 .ucn11-nav :is(a,button){min-width:0;white-space:nowrap}
body.ucoceko-theme-v161 .ucn11-tools{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:clamp(5px,1vw,10px)!important}
body.ucoceko-theme-v161 .ucn11-tools :is(a,button){flex:0 0 auto}

/* Universal responsive grids. */
body.ucoceko-theme-v161 :is(.uco22-product-grid,.products,.uco22-four-grid,.uco22-ecosystem-grid,.uco22-confidence-grid,.uco22-need-grid,.uco100-values-grid,.uco100-family-grid,.uco100-product-world-grid,.uco100-timeline-grid,.uco105-feature-grid,.uco500-op-cards,.uco400-journey__grid){
 display:grid!important;
 grid-template-columns:repeat(auto-fit,minmax(min(245px,100%),1fr))!important;
 gap:clamp(12px,2vw,24px)!important;
}
body.ucoceko-theme-v161 :is(.uco22-product-card,.products .product,.uco22-system-card,.uco22-dashboard-card,.uco400-space-card){min-width:0!important;max-width:100%!important;width:auto!important}
body.ucoceko-theme-v161 :is(.uco22-product-stage,.woocommerce-loop-product__link){max-width:100%}
body.ucoceko-theme-v161 .uco22-product-stage img,body.ucoceko-theme-v161 .products .product img{max-width:100%!important;height:auto!important;object-fit:contain}

/* Forms: two columns only where room genuinely exists. */
body.ucoceko-theme-v161 :is(.uco22-form-grid,.uco-form-grid,.woocommerce .form-row,.woocommerce-checkout .form-row){min-width:0}
body.ucoceko-theme-v161 :is(.uco22-form-grid,.uco-form-grid){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr))!important;gap:clamp(12px,2vw,20px)!important}
body.ucoceko-theme-v161 :where(input:not([type=checkbox]):not([type=radio]),select,textarea){width:100%;min-width:0;max-width:100%}
body.ucoceko-theme-v161 :where(button,.button,[role=button],summary){min-height:var(--uco161-touch)}

/* Woo tables scroll inside themselves on constrained screens. */
body.ucoceko-theme-v161 .woocommerce{min-width:0;max-width:100%}
@media(max-width:900px){body.ucoceko-theme-v161 .woocommerce :is(table,.shop_table){display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;white-space:nowrap}}

/* Overlays use dynamic viewport units and cannot protrude. */
body.ucoceko-theme-v161 :is(.uco22-drawer,.uco22-mini-cart__panel,.uco22-search__panel){max-width:100dvw!important;max-height:100dvh!important}
body.ucoceko-theme-v161 .uco22-drawer{height:100dvh!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
body.ucoceko-theme-v161 .uco22-mini-cart__panel{height:100dvh!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
body.ucoceko-theme-v161 .uco22-search__panel{max-height:min(92dvh,900px)!important;overflow-y:auto!important;overflow-x:hidden!important}

/* Footer is intrinsically responsive. */
body.ucoceko-theme-v161 :is(.uco22-footer__grid,.uco100-footer__grid,.uco500-footer__top,.uco115-footer__grid){grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr))!important;gap:clamp(18px,3vw,38px)!important}
body.ucoceko-theme-v161 .uco115-footer__newsletter form{width:100%;max-width:100%}

/* Compact desktop before tablet: stop nav collision early. */
@media (min-width:1025px) and (max-width:1260px){
 :root{--uco161-gutter:22px}
 body.ucoceko-theme-v161 .ucn11-header-inner{grid-template-columns:minmax(120px,170px) minmax(0,1fr) auto!important}
 body.ucoceko-theme-v161 .ucn11-nav{gap:5px!important}
 body.ucoceko-theme-v161 .ucn11-nav :is(a,button){font-size:11px!important;padding-inline:7px!important}
 body.ucoceko-theme-v161 .ucn11-tools .uco22-round{width:40px!important;height:40px!important;min-width:40px!important}
 body.ucoceko-theme-v161 .uco115-mega__grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr)!important}
 body.ucoceko-theme-v161 .uco115-mega__visual{display:none!important}
}

/* Tablet: dedicated composition. */
@media (min-width:783px) and (max-width:1024px){
 :root{--uco161-gutter:clamp(18px,3vw,28px);--uco161-bottom-h:72px}
 body.ucoceko-theme-v161 .ucn11-header-inner{grid-template-columns:minmax(130px,1fr) auto!important}
 body.ucoceko-theme-v161 .ucn11-nav{display:none!important}
 body.ucoceko-theme-v161 .uco22-menu-toggle{display:flex!important}
 body.ucoceko-theme-v161 :is(.uco22-home-hero__grid,.uco115-home-hero__grid,.uco22-category-editorial__grid,.uco22-app-band__grid){grid-template-columns:1fr 1fr!important;gap:clamp(20px,4vw,42px)!important}
 body.ucoceko-theme-v161 .uco22-product-grid,body.ucoceko-theme-v161 .products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.ucoceko-theme-v161 .uco22-mini-cart__panel{width:min(560px,86dvw)!important}
 body.ucoceko-theme-v161 .uco22-drawer{width:min(430px,76dvw)!important}
}

/* Mobile and small tablets. */
@media(max-width:782px){
 :root{--uco161-gutter:clamp(12px,4vw,20px);--uco161-header-h:68px;--uco161-bottom-h:68px}
 body.ucoceko-theme-v161 .uco22-announcement .uco22-container{width:100%!important;padding-inline:var(--uco161-gutter)!important}
 body.ucoceko-theme-v161 .ucn11-header-inner{grid-template-columns:minmax(110px,1fr) auto!important;width:100%!important;padding-inline:var(--uco161-gutter)!important}
 body.ucoceko-theme-v161 .ucn11-nav{display:none!important}
 body.ucoceko-theme-v161 .ucn11-header-brand{max-width:min(48vw,180px)}
 body.ucoceko-theme-v161 .ucn11-tools{gap:4px!important}
 body.ucoceko-theme-v161 .ucn11-tools :is(.uco22-round,.uco22-menu-toggle){width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important}
 body.ucoceko-theme-v161 .ucn11-tools>a.uco22-round{display:none!important}
 body.ucoceko-theme-v161 :is(.uco22-home-hero__grid,.uco115-home-hero__grid,.uco22-category-editorial__grid,.uco22-app-band__grid,.uco22-contact-grid){grid-template-columns:1fr!important}
 body.ucoceko-theme-v161 :is(.uco22-product-grid,.products){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 body.ucoceko-theme-v161 .uco22-product-card,body.ucoceko-theme-v161 .products .product{min-width:0!important}
 body.ucoceko-theme-v161 .uco22-mobile-bottom{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;left:8px!important;right:8px!important;bottom:calc(8px + var(--uco161-safe-bottom))!important;width:auto!important;border-radius:18px!important;overflow:hidden}
 body.ucoceko-theme-v161 .uco22-mobile-bottom :is(a,button){min-width:0!important;min-height:56px!important;padding-inline:2px!important;position:relative}
 body.ucoceko-theme-v161 .uco22-mobile-bottom span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.ucoceko-theme-v161 .uco115-footer{padding-bottom:calc(var(--uco161-bottom-h) + var(--uco161-safe-bottom) + 28px)!important;margin-bottom:0!important}
 body.ucoceko-theme-v161 .uco500-footer__bottom{margin-bottom:0!important;padding-bottom:0!important}
 body.ucoceko-theme-v161 .uco115-help{bottom:calc(var(--uco161-bottom-h) + var(--uco161-safe-bottom) + 18px)!important}
 body.ucoceko-theme-v161 :is(.uco400-privacy,.uco13-cookie-reopen){bottom:calc(var(--uco161-bottom-h) + var(--uco161-safe-bottom) + 14px)!important}
 body.ucoceko-theme-v161 .uco22-drawer{width:min(390px,calc(100dvw - 10px))!important;height:calc(100dvh - 10px)!important;max-height:calc(100dvh - 10px)!important;inset:5px auto 5px 5px!important;border-radius:20px!important}
 body.ucoceko-theme-v161 .uco22-mini-cart__panel{width:100dvw!important;height:100dvh!important;border-radius:0!important;padding-bottom:calc(18px + var(--uco161-safe-bottom))!important}
 body.ucoceko-theme-v161 .uco22-search__panel{width:calc(100dvw - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:8px!important;border-radius:18px!important}
 body.ucoceko-theme-v161 .uco115-footer__newsletter{text-align:center!important}
 body.ucoceko-theme-v161 .uco115-footer__newsletter :is(h2,h3,p,input,input::placeholder){text-align:center!important}
}

/* Narrow phones: single-column product layout avoids crushed Huawei widths. */
@media(max-width:390px){
 :root{--uco161-gutter:12px}
 body.ucoceko-theme-v161 :is(.uco22-product-grid,.products){grid-template-columns:1fr!important}
 body.ucoceko-theme-v161 .ucn11-tools :is(.uco22-round,.uco22-menu-toggle){width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}
 body.ucoceko-theme-v161 .ucn11-header-brand{max-width:42vw}
 body.ucoceko-theme-v161 .uco22-mini-item{grid-template-columns:62px minmax(0,1fr) 38px!important}
}

/* Short landscape viewport: reduce chrome instead of hiding content beneath it. */
@media(max-height:540px) and (orientation:landscape){
 :root{--uco161-header-h:56px;--uco161-bottom-h:56px}
 body.ucoceko-theme-v161 .uco22-announcement{display:none!important}
 body.ucoceko-theme-v161 .ucn11-header{min-height:56px!important}
 body.ucoceko-theme-v161 .uco22-mobile-bottom{min-height:54px!important;height:54px!important}
 body.ucoceko-theme-v161 .uco22-mobile-bottom span{display:none!important}
 body.ucoceko-theme-v161 .uco22-drawer,body.ucoceko-theme-v161 .uco22-mini-cart__panel{height:100dvh!important;max-height:100dvh!important;inset-block:0!important}
}

/* Touch-first devices: do not rely on hover and keep comfortable targets. */
@media(hover:none) and (pointer:coarse){
 body.ucoceko-theme-v161 :where(a,button,input,select,textarea,summary){-webkit-tap-highlight-color:transparent}
 body.ucoceko-theme-v161 :where(button,.button,[role=button],summary){min-height:48px}
 body.ucoceko-theme-v161 :is(.uco22-product-card,.products .product){transform:none!important}
}

/* VisualViewport keyboard handling. */
body.ucoceko-theme-v161.uco161-keyboard-open :is(.uco22-mobile-bottom,.uco115-help,.uco400-privacy,.uco13-cookie-reopen){display:none!important}
body.ucoceko-theme-v161.uco161-keyboard-open .uco115-footer{padding-bottom:22px!important}

/* Local debug mode: ?uco_layout_debug=1 for logged-in admins; JS marks actual overflow offenders. */
body.ucoceko-theme-v161.uco161-layout-debug [data-uco161-overflow="1"]{outline:3px solid #ff4d4d!important;outline-offset:-3px!important}

@media(prefers-reduced-motion:reduce){body.ucoceko-theme-v161 *,body.ucoceko-theme-v161 *::before,body.ucoceko-theme-v161 *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
