/* =========================================================
   StraganUI 0.28.6 — FULL RESPONSIVE PASS
   Loaded last on the public frontend. This file intentionally contains only
   cross-surface responsive corrections; existing desktop layouts stay owned by
   their feature stylesheets.
   Audited target classes: 320/360/375/390/412/430, phone landscape,
   768/820/1024, 1280/1366/1440, 1920/2560+.
   ========================================================= */

/* ---------- Global containment / long-content safety ---------- */
body.straganui-active :is(p,a,span,strong,small,td,th,dd,address,label){overflow-wrap:anywhere}
body.straganui-active :is(img,svg,video,iframe){max-width:100%}
body.straganui-active main,
body.straganui-active article,
body.straganui-active .site-main,
body.straganui-active .entry-content,
body.straganui-active .woocommerce{min-width:0}

/* Footer link wrappers were introduced in 0.28.6. Keep them visually identical
   to the former direct-link desktop markup. */
.so-footer__links{display:flex;min-width:0;flex-direction:column;align-items:flex-start;gap:5px}
.so-footer__toggle{display:none!important}

/* ---------- Touch / iOS form baseline ---------- */
@media (max-width:1023px) and (pointer:coarse){
    body.straganui-active :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea){font-size:16px!important}
    body.straganui-active :is(button,.button,.so-btn,[role="button"]){min-height:44px}
    body.straganui-active :is(input[type="checkbox"],input[type="radio"]){min-width:18px;min-height:18px}
    .so-header-action,.so-nav-toggle,.so-site-search button{min-width:44px!important;min-height:44px!important}
    .so-pagination .page-numbers,body.straganui-shop-page [data-so-pagination] .page-numbers{min-width:44px!important;height:44px!important}
    .so-calendar-nav a{width:44px!important;height:44px!important}
}

/* ---------- Header / search: normal phone + tablet ---------- */
@media(max-width:820px){
    .so-site-header__top{padding-left:max(0px,env(safe-area-inset-left));padding-right:max(0px,env(safe-area-inset-right))}
    .so-site-search input[type=search]{height:46px!important;font-size:16px!important;padding-right:50px!important}
    .so-site-search button{top:1px!important;right:1px!important;width:44px!important;height:44px!important}
    .so-site-header.is-nav-open .so-site-nav-wrap{
        max-height:min(72dvh,calc(var(--so-viewport-height,100dvh) - 74px),640px)!important;
        padding-bottom:env(safe-area-inset-bottom);
    }
    .so-search-suggest{
        max-height:min(58dvh,calc(var(--so-viewport-height,100dvh) - 132px))!important;
        overscroll-behavior:contain;
    }
    .so-search-category,.so-search-all{min-height:44px!important}
}
@media(max-width:430px){
    .so-site-header__top{width:calc(100% - 16px)!important}
    .so-site-header__brand{max-width:136px!important}
    .so-site-header__brand .custom-logo,.so-plugin-logo__image,.so-site-header__brand img{max-width:136px!important}
    .so-site-header__actions{gap:0!important}
    .so-header-action{padding-inline:4px!important}
    .so-search-suggest{border-radius:12px!important}
}
@media(max-width:359px){
    .so-site-header__brand{max-width:108px!important}
    .so-site-header__brand .custom-logo,.so-plugin-logo__image,.so-site-header__brand img{max-width:108px!important}
}

/* ---------- Short phone landscape (e.g. 844x390 / 932x430) ---------- */
@media (min-width:821px) and (max-height:520px) and (pointer:coarse){
    html.so-mobile-nav-open,html.so-mobile-nav-open body{overflow:hidden!important}
    .so-site-header{z-index:10050!important}
    .so-site-header__top{
        grid-template-columns:minmax(112px,160px) minmax(180px,1fr) auto!important;
        grid-template-rows:1fr!important;gap:8px!important;min-height:58px!important;padding:5px 12px!important;
    }
    .so-site-header__brand{grid-column:1!important;grid-row:1!important;max-width:160px!important}
    .so-site-header__brand .custom-logo,.so-plugin-logo__image,.so-site-header__brand img{max-width:150px!important;max-height:46px!important}
    .so-site-search{grid-column:2!important;grid-row:1!important;max-width:none!important}
    .so-site-search input[type=search]{height:44px!important;font-size:16px!important;padding-right:48px!important}
    .so-site-search button{top:0!important;right:0!important;width:44px!important;height:44px!important}
    .so-site-header__actions{grid-column:3!important;grid-row:1!important;gap:1px!important}
    .so-header-action{min-width:44px!important;min-height:44px!important;padding:0 5px!important}
    .so-header-action span{display:none!important}
    .so-nav-toggle{position:relative!important;display:inline-flex!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;align-items:center!important;justify-content:center!important;border:1px solid var(--so-border)!important;border-radius:10px!important;background:#fff!important}
    .so-nav-toggle>span:not(.screen-reader-text){position:absolute!important;left:12px!important;display:block!important;width:18px!important;height:2px!important;border-radius:2px!important;background:var(--so-text)!important;transition:transform .16s ease,opacity .16s ease,top .16s ease!important}
    .so-nav-toggle>span:nth-child(1){top:14px!important}.so-nav-toggle>span:nth-child(2){top:20px!important}.so-nav-toggle>span:nth-child(3){top:26px!important}
    .so-site-header.is-nav-open .so-nav-toggle>span:nth-child(1){top:20px!important;transform:rotate(45deg)!important}
    .so-site-header.is-nav-open .so-nav-toggle>span:nth-child(2){opacity:0!important}
    .so-site-header.is-nav-open .so-nav-toggle>span:nth-child(3){top:20px!important;transform:rotate(-45deg)!important}
    .so-site-nav-wrap{display:none!important}
    .so-site-header.is-nav-open .so-site-nav-wrap{
        position:absolute!important;left:0!important;right:0!important;top:100%!important;display:block!important;
        max-height:calc(var(--so-viewport-height,100dvh) - 60px)!important;overflow:auto!important;overscroll-behavior:contain!important;
        padding-bottom:env(safe-area-inset-bottom);border-bottom:1px solid var(--so-border)!important;background:#fff!important;box-shadow:0 18px 34px rgba(20,50,30,.14)!important;
    }
    .so-site-header.is-nav-open .so-site-nav-wrap>.so-container{width:calc(100% - 20px)!important;padding:7px 0 10px!important}
    .so-site-nav{display:flex!important;min-height:0!important;align-items:stretch!important;flex-direction:column!important;gap:4px!important;padding:0!important}
    .so-site-nav__items{display:flex!important;width:100%!important;flex-direction:column!important;flex-wrap:nowrap!important;gap:3px!important}
    .so-nav-item,.so-nav-parent{display:block!important;width:100%!important}
    .so-nav-link,.so-nav-parent-link,.so-site-nav__single{width:100%!important;min-height:44px!important;justify-content:flex-start!important;padding:0 12px!important;font-size:13px!important}
    .so-nav-parent-link{padding-right:50px!important}.so-submenu-toggle{right:0!important;width:48px!important;height:44px!important}
    .so-submenu{position:static!important;display:none!important;width:100%!important;max-width:none!important;max-height:none!important;margin:2px 0 7px!important;padding:8px!important;border:1px solid #e3ebe5!important;border-radius:10px!important;background:#f7faf8!important;box-shadow:none!important;opacity:1!important;visibility:visible!important;transform:none!important}
    .so-has-submenu:hover>.so-submenu,.so-has-submenu:focus-within>.so-submenu{display:none!important}.so-has-submenu.is-open>.so-submenu{display:block!important}
    .so-submenu__links{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}.so-submenu__links a{min-height:40px!important;font-size:11px!important}
    .so-search-suggest{max-height:calc(var(--so-viewport-height,100dvh) - 70px)!important}
}

/* ---------- Footer: real mobile layout + accessible accordions ---------- */
@media(max-width:760px){
    .so-footer{margin-top:24px!important;padding:24px 0 0!important;overflow:visible!important}
    .so-footer__grid{grid-template-columns:1fr!important;gap:14px!important;width:calc(100% - 24px)!important}
    .so-footer__brand,.so-footer__kk,.so-footer__accordion{grid-column:1!important}
    .so-footer__brand{padding-bottom:3px}
    .so-footer__brand-name{font-size:25px!important}
    .so-footer__brand p{max-width:none!important;font-size:12.5px!important;line-height:1.55!important}
    .so-footer__contact{gap:1px!important;margin-top:7px!important}.so-footer__contact a{display:flex!important;min-height:36px!important;align-items:center!important;font-size:12.5px!important}
    .so-footer__socials{gap:9px!important;margin-top:10px!important}.so-footer__socials a{width:44px!important;height:44px!important}
    .so-footer__desktop-heading{display:none!important}
    .so-footer__accordion{display:block!important;width:100%!important;gap:0!important;border-top:1px solid rgba(255,255,255,.14)}
    .so-footer__toggle{
        display:flex!important;width:100%!important;min-height:48px!important;align-items:center!important;justify-content:space-between!important;
        margin:0!important;padding:0 2px!important;border:0!important;background:transparent!important;color:#fff!important;
        font:850 12px/1 var(--so-font-body)!important;letter-spacing:.075em!important;text-align:left!important;text-transform:uppercase!important;box-shadow:none!important;cursor:pointer!important;
    }
    .so-footer__toggle-icon{position:relative;display:block;width:20px;height:20px;flex:0 0 20px}
    .so-footer__toggle-icon:before,.so-footer__toggle-icon:after{content:"";position:absolute;left:4px;top:9px;width:12px;height:1.5px;border-radius:2px;background:#dce8df;transition:transform .16s ease}
    .so-footer__toggle-icon:after{transform:rotate(90deg)}.so-footer__accordion.is-open .so-footer__toggle-icon:after{transform:rotate(0)}
    .so-footer__links{display:flex!important;flex-direction:column!important;gap:0!important;padding:0 0 10px!important}
    .so-footer[data-so-footer-ready="1"] .so-footer__links[hidden]{display:none!important}
    .so-footer__links a{display:flex!important;width:100%!important;min-height:44px!important;align-items:center!important;padding:5px 2px!important;border-radius:8px!important;color:#dce6df!important;font-size:13px!important;line-height:1.35!important}
    .so-footer__links a:hover,.so-footer__links a:focus-visible{padding-left:8px!important;background:rgba(255,255,255,.06)!important;transform:none!important}
    .so-footer__kk{margin-top:2px!important;padding:16px!important}.so-footer__kk h3{font-size:11px!important}.so-footer__kk p{font-size:12px!important;line-height:1.5!important}.so-footer__kk-link{display:flex!important;min-height:44px!important;align-items:center!important;justify-content:center!important;font-size:12px!important}
    .so-footer__bottom{width:calc(100% - 24px)!important;align-items:flex-start!important;flex-direction:column!important;gap:5px!important;margin-top:15px!important;padding:12px 0 calc(16px + env(safe-area-inset-bottom))!important;font-size:10.5px!important}
}

/* ---------- Catalogue / filters / pagination ---------- */
@media(max-width:1023px){
    .so-filter-panel{height:var(--so-viewport-height,100dvh)!important;max-height:none!important;padding-bottom:env(safe-area-inset-bottom)}
    .so-filter-panel__head{padding-top:calc(17px + env(safe-area-inset-top))!important}
    .so-filter-drawer-close{right:calc(12px + env(safe-area-inset-right))!important;top:calc(12px + env(safe-area-inset-top))!important;width:44px!important;height:44px!important}
    .so-filter-open,.so-catalog-toolbar select{min-height:44px!important}
    .so-filter-option{min-height:44px!important}
    .so-filter-search{min-height:44px!important;font-size:16px!important}
    .so-filter-actions{padding-bottom:calc(12px + env(safe-area-inset-bottom))!important}
}
@media(max-width:760px){
    .so-catalog-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px!important}
    .so-filter-open,.so-catalog-toolbar select{height:44px!important;font-size:13px!important}
    .so-catalog-toolbar__count{font-size:11px!important}.so-catalog-toolbar__count strong{font-size:13px!important}
    .so-pagination{gap:10px!important;padding:10px!important}.so-pagination>div{gap:6px!important}
}
/* Keep two useful product columns on ordinary phones. One column is reserved
   for truly tiny viewports where two cards would become unusable. */
@media(min-width:331px) and (max-width:760px){
    body.straganui-shop-page{--stragan-columns:2!important}
}
@media(min-width:331px) and (max-width:430px){
    body.straganui-shop-page .so-catalog-main .so-product-card--compact{height:306px!important;min-height:306px!important;max-height:306px!important;grid-template-rows:136px minmax(0,1fr)!important}
    body.straganui-shop-page .so-catalog-main .so-product-card--compact .so-product-card__media{height:124px!important;min-height:124px!important}
    body.straganui-shop-page .so-catalog-main .so-product-card--compact .so-product-card__image{max-height:108px!important}
}
@media(max-width:330px){
    body.straganui-shop-page{--stragan-columns:1!important}
    body.straganui-shop-page .so-catalog-main .so-product-card--compact{height:318px!important;grid-template-rows:150px minmax(0,1fr)!important}
}

/* ---------- Homepage ---------- */
@media(min-width:331px) and (max-width:720px){
    body.straganui-home-active .so-product-slider__page,
    body.straganui-home-active .so-product-slider__track,
    body.straganui-home-active .so-product-slider__placeholder{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:430px){
    body.straganui-home-active .so-home-hero__copy h1{font-size:34px!important;line-height:1!important}
    body.straganui-home-active .so-home-hero__copy .so-home-hero__description{font-size:12.5px!important;line-height:1.58!important}
    body.straganui-home-active .so-section-heading__link,body.straganui-home-active .so-text-link{display:inline-flex;min-height:44px;align-items:center}
}
@media(max-width:330px){
    body.straganui-home-active .so-product-slider__page,
    body.straganui-home-active .so-product-slider__track,
    body.straganui-home-active .so-product-slider__placeholder{grid-template-columns:1fr!important}
}
@media (min-width:821px) and (max-height:520px) and (pointer:coarse){
    body.straganui-home-active .so-home-hero__inner{min-height:300px!important}
    body.straganui-home-active .so-home-hero__copy{padding:24px 28px!important}
    body.straganui-home-active .so-home-hero__visual{padding:16px 22px 16px 4px!important}
    body.straganui-home-active .so-hero-upload-wrap .so-hero-upload{max-height:240px!important}
}

/* ---------- Product ---------- */
@media(max-width:760px){
    body.straganui-product-page .so-single-product-summary :is(a,p,li,dd,td,strong,span){overflow-wrap:anywhere}
    .so-single-product-tabs__button{min-height:44px!important}
    .so-single-product-gallery__thumb{min-height:64px!important}
}
@media(max-width:359px){
    .so-single-product-buy form.cart,.so-single-product-buy .single_variation_wrap .woocommerce-variation-add-to-cart{grid-template-columns:1fr!important}
    .so-single-product-buy form.cart .quantity,.so-single-product-buy .single_variation_wrap .quantity{width:100%!important}
    .so-single-product-buy form.cart .single_add_to_cart_button,.so-single-product-buy .single_variation_wrap .single_add_to_cart_button{width:100%!important;min-height:48px!important}
}
@media (max-height:520px) and (pointer:coarse){
    .so-product-lightbox__viewport{padding:46px 54px 30px!important}
    .so-product-lightbox__toolbar{top:calc(5px + env(safe-area-inset-top))!important;right:calc(5px + env(safe-area-inset-right))!important}
    .so-product-lightbox__nav--prev{left:calc(2px + env(safe-area-inset-left))!important}.so-product-lightbox__nav--next{right:calc(2px + env(safe-area-inset-right))!important}
    .so-product-lightbox__counter{bottom:calc(5px + env(safe-area-inset-bottom))!important}
}

/* ---------- Commerce progress / cart / checkout ---------- */
@media(max-width:620px){
    .so-commerce-progress{padding:5px!important}
    .so-commerce-progress__step{min-height:44px!important;gap:4px!important;padding:0 4px!important}
    .so-commerce-progress__step i{width:22px!important;height:22px!important;flex-basis:22px!important}
    .so-commerce-progress__step b{font-size:10.5px!important;line-height:1.15!important}
}
@media(max-width:359px){
    .so-commerce-progress__step{flex-direction:column!important;gap:3px!important;padding:5px 2px!important}
    .so-commerce-progress__step b{font-size:9.5px!important}
}
@media(max-width:760px){
    body.straganui-cart-page :is(.wc-block-cart,.wc-block-cart-items,.wc-block-cart__main,.wc-block-cart__sidebar){min-width:0!important;max-width:100%!important}
    body.straganui-cart-page :is(.wc-block-components-product-name,.wc-block-cart-item__prices,.wc-block-components-product-metadata){overflow-wrap:anywhere!important}
    body.straganui-cart-page :is(button,.button,.wc-block-components-button){min-height:44px!important}
    body.straganui-checkout-page :is(input,select,textarea,.select2-selection--single){font-size:16px!important}
    body.straganui-checkout-page :is(.wc-block-components-button,#place_order,.button){min-height:48px!important}
    body.straganui-checkout-page :is(.wc-block-components-order-summary-item__description,.product-name,.woocommerce-order-details td){overflow-wrap:anywhere!important}
}
@media(max-width:430px){
    body.straganui-cart-page .wc-block-cart-item__image img{width:68px!important;height:68px!important;object-fit:contain!important}
    body.straganui-checkout-page .woocommerce-checkout-review-order-table{font-size:12px!important}
    body.straganui-checkout-page .wc-block-components-checkout-step,body.straganui-checkout-page .wc-block-components-sidebar{padding:12px!important}
}

/* ---------- Account / OTP / order history ---------- */
@media(max-width:780px){
    body.straganui-account-page :is(input,select,textarea){font-size:16px!important}
    body.straganui-account-page .woocommerce-MyAccount-navigation a{min-height:44px!important}
    body.straganui-account-page .woocommerce-MyAccount-content{overflow-wrap:anywhere!important}
}
@media(max-width:600px){
    body.straganui-account-page .woocommerce-orders-table{display:block!important;width:100%!important;overflow:visible!important;border:0!important;background:transparent!important}
    body.straganui-account-page .woocommerce-orders-table thead{display:none!important}
    body.straganui-account-page .woocommerce-orders-table tbody{display:grid!important;gap:10px!important}
    body.straganui-account-page .woocommerce-orders-table tr{display:block!important;padding:8px 10px!important;border:1px solid var(--so-border)!important;border-radius:11px!important;background:#fff!important}
    body.straganui-account-page .woocommerce-orders-table td{display:grid!important;grid-template-columns:minmax(92px,.75fr) minmax(0,1.25fr)!important;gap:10px!important;align-items:center!important;width:100%!important;padding:8px 2px!important;border:0!important;border-bottom:1px solid #edf1ee!important;text-align:right!important}
    body.straganui-account-page .woocommerce-orders-table td:last-child{border-bottom:0!important}
    body.straganui-account-page .woocommerce-orders-table td::before{content:attr(data-title);color:#6f7b73;font-size:10px;font-weight:800;letter-spacing:.04em;text-align:left;text-transform:uppercase}
    body.straganui-account-page .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions{grid-template-columns:1fr!important;text-align:left!important}
    body.straganui-account-page .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions::before{display:none!important}
    body.straganui-account-page .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions .button{width:100%!important;min-height:44px!important}
}
@media(max-width:430px){
    body.straganui-account-page form.login,body.straganui-account-page form.register{padding:16px!important;border-radius:12px!important}
    body.straganui-account-page .woocommerce-MyAccount-content{padding:14px!important}
}

/* ---------- Events ---------- */
@media(max-width:640px){
    .so-events-hero h1{font-size:36px!important}
    .so-event-filters button{min-height:44px!important}
    .so-event-calendar{padding-bottom:4px!important;-webkit-overflow-scrolling:touch}
    .so-event-single__content{overflow-wrap:anywhere}
}
@media(max-width:430px){
    .so-events-hero{padding:20px 16px!important}.so-events-hero h1{font-size:32px!important}
    .so-events-hero__stats{grid-template-columns:1fr!important}.so-events-hero__stats>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}.so-events-hero__stats dt{margin:0!important}.so-events-hero__stats dd{font-size:19px!important}
}
@media (max-height:520px) and (pointer:coarse){
    .so-event-modal{padding:8px!important}
    .so-event-modal__panel{display:grid!important;grid-template-columns:minmax(190px,32%) minmax(0,68%)!important;width:calc(100vw - 16px)!important;height:calc(var(--so-viewport-height,100dvh) - 16px)!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
    .so-event-modal__visual,.so-event-modal__media{height:100%!important;min-height:0!important;max-height:none!important;flex:auto!important;padding:12px!important;border-right:1px solid #e1e8e3!important;border-bottom:0!important}
    .so-event-modal__content{min-height:0!important;overflow-y:auto!important;padding:16px 18px calc(16px + env(safe-area-inset-bottom))!important}
    .so-event-modal__content h2{font-size:25px!important}
    .so-event-modal__close{right:calc(8px + env(safe-area-inset-right))!important;top:calc(8px + env(safe-area-inset-top))!important;width:44px!important;height:44px!important}
}

/* ---------- Ordinary content pages / tables ---------- */
@media(max-width:760px){
    body.straganui-content-page article.page,body.straganui-content-page .page.type-page{padding:16px!important}
    body.straganui-content-page :is(table,pre,code){max-width:100%}
    body.straganui-content-page table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
    body.straganui-content-page :is(a,p,li,td,th){overflow-wrap:anywhere}
}

/* ---------- Wide screens: retain readable content while using available space ---------- */
@media(min-width:1920px){
    :root{--so-container:1560px}
}
@media(min-width:2560px){
    :root{--so-container:1640px}
}

/* =========================================================
   v0.31.4 — final cross-surface readability overrides
   Loaded last on purpose.
   ========================================================= */
@media(max-width:820px){
    .so-submenu__links a{min-height:44px!important;font-size:13px!important}
}
@media(max-width:760px){
    .so-footer__contact a,.so-footer__links a{font-size:13px!important}
    .so-footer__kk p{font-size:13px!important}.so-footer__bottom{font-size:11.5px!important}
    body.straganui-content-page .entry-content{font-size:15.5px!important;line-height:1.72!important}
    .so-filter-option{font-size:13px!important}.so-filter-group__toggle{font-size:13.5px!important}
}
@media(max-width:430px){
    body.straganui-home-active .so-home-hero__copy .so-home-hero__description{font-size:14px!important;line-height:1.62!important}
    body.straganui-home-active .so-hero-meta span{font-size:11.5px!important}
    body.straganui-shop-page .so-catalog-main .so-product-card--compact{height:326px!important;min-height:326px!important;max-height:326px!important}
    body.straganui-shop-page .so-catalog-main .so-product-card--compact.is-unavailable{height:286px!important;min-height:286px!important;max-height:286px!important}
    body.straganui-shop-page .so-catalog-main .so-product-card--compact .so-product-card__meta{font-size:11px!important}
    body.straganui-shop-page .so-catalog-main .so-product-card--compact .so-product-card__title{font-size:13px!important}
    body.straganui-shop-page .so-catalog-main .so-product-card--compact .so-product-card__stock{font-size:11.5px!important}
    body.straganui-shop-page .so-catalog-main .so-product-card--compact .so-product-card__button{min-height:42px!important;font-size:12px!important}
}
@media(max-width:330px){
    body.straganui-shop-page .so-catalog-main .so-product-card--compact{height:338px!important;min-height:338px!important;max-height:338px!important}
    body.straganui-shop-page .so-catalog-main .so-product-card--compact.is-unavailable{height:298px!important;min-height:298px!important;max-height:298px!important}
}
