/* z.shop responsive polish v39
   Mobile-first resilience for Safari/iOS text scaling, narrow layouts and shared storefront actions. */

:root{--zs-polish-touch:44px;--zs-polish-gap:10px}

/* Shared overflow resilience. */
body :where(main,section,article,aside,form,fieldset,header,footer,nav,div){min-inline-size:0}
body :where(button,a,input,select,textarea){max-inline-size:100%}
body :where(h1,h2,h3,h4,p,span,strong,small,b,em,label){overflow-wrap:anywhere}
body :where(button,a[class*="btn"],a[class*="button"]){line-height:1.45}

/* Search/products page: fixes the filter/sort controls seen overflowing on iPhone. */
@media(max-width:991px){
  .z20-results-head{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:start!important;gap:14px!important}
  .z20-results-head>div:first-child{min-width:0!important;width:100%!important}
  .z20-head-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;width:100%!important;min-width:0!important}
  .z20-head-actions button{width:100%!important;height:auto!important;min-height:48px!important;margin:0!important;padding:10px 12px!important;border-radius:14px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;font-size:13px!important;line-height:1.35!important;white-space:nowrap!important;overflow:visible!important}
  .z20-head-actions button i{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;font-size:18px!important;line-height:1!important}
  .z20-drawer-backdrop{z-index:2147482960!important}
  .z20-drawer{z-index:2147482970!important;max-height:min(86dvh,760px)!important;overscroll-behavior:contain!important;padding-bottom:calc(20px + env(safe-area-inset-bottom))!important}
  body.z20-drawer-open #zsChatOpen,body.z20-drawer-open .zs-shell-backtop{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
}

@media(max-width:767px){
  .z20-discovery-head{align-items:flex-start!important;gap:12px!important}
  .z20-discovery-head>div{min-width:0!important}
  .z20-discovery-head>a{flex:0 0 auto!important;white-space:nowrap!important;margin-top:4px!important}
  .z20-results-head h2{font-size:clamp(22px,6vw,29px)!important;line-height:1.55!important}
  .z20-results-head p{font-size:12px!important;line-height:1.8!important}
  .z20-results-head>div>span,.z20-discovery-head span{font-size:11px!important;line-height:1.6!important}
  .z20-active-filters a{font-size:11px!important;line-height:1.45!important;min-height:36px!important}
  .z20-category-rail b{font-size:11px!important;line-height:1.55!important}
  .z20-card h2{font-size:13.5px!important;line-height:1.75!important;min-height:3.5em!important;height:auto!important}
  .z20-card p{font-size:10.5px!important;line-height:1.75!important;min-height:5.2em!important}
  .z20-meta{font-size:10px!important;line-height:1.5!important}
  .z20-price{align-items:flex-end!important;flex-wrap:wrap!important;row-gap:4px!important}
  .z20-price strong{font-size:17px!important;line-height:1.2!important}
  .z20-price small,.z20-price del{font-size:9.5px!important;line-height:1.4!important}
  .z20-buy{height:auto!important;min-height:46px!important;padding:9px 7px!important;font-size:12.5px!important;line-height:1.35!important;white-space:normal!important;text-align:center!important}
  .z20-buy i{font-size:16px!important;flex:0 0 auto!important}
  .z20-main-search{height:auto!important;min-height:56px!important}
  .z20-main-search input{font-size:16px!important;min-width:0!important}
  .z20-main-search button{height:auto!important;min-height:44px!important;font-size:12px!important;padding-inline:10px!important}
  .z20-drawer-head h2{font-size:19px!important;line-height:1.5!important}
  .z20-sort-list a{height:auto!important;min-height:52px!important;padding:10px 2px!important;font-size:13px!important;line-height:1.5!important}
  .z20-drawer .z20-filter-form label>span{font-size:12px!important;line-height:1.6!important}
  .z20-drawer .z20-filter-form select,.z20-drawer .z20-filter-form input[type=number]{height:auto!important;min-height:48px!important;font-size:16px!important}
  .z20-check span{font-size:12px!important;line-height:1.6!important}
  .z20-apply{height:auto!important;min-height:48px!important;padding:10px 12px!important;font-size:13px!important}
  .z20-help .z20-help-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .z20-help .z20-help-actions>a{height:auto!important;min-height:46px!important;padding:9px!important;white-space:normal!important;text-align:center!important;line-height:1.4!important}
  .z20-help .z20-help-actions>a>span{font-size:12px!important;line-height:1.4!important}
}

@media(max-width:390px){
  .z20-head-actions{grid-template-columns:1fr!important}
  .z20-head-actions button{min-height:46px!important}
  .z20-help .z20-help-actions{grid-template-columns:1fr!important}
}
@media(max-width:350px){.z20-grid{grid-template-columns:1fr!important}}

/* Favorites mirrors product cards: remove fixed-height text overflow and tiny mobile labels. */
@media(max-width:767px){
  .z21-toolbar{gap:12px!important}
  .z21-toolbar h2{font-size:23px!important;line-height:1.55!important}
  .z21-toolbar p{font-size:12px!important;line-height:1.75!important}
  .z21-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important}
  .z21-actions a,.z21-actions button{height:auto!important;min-height:46px!important;padding:9px 10px!important;font-size:12px!important;line-height:1.4!important;justify-content:center!important;white-space:normal!important;text-align:center!important}
  .z21-meta{font-size:10px!important}
  .z21-card h2{font-size:13.5px!important;line-height:1.75!important;min-height:3.5em!important;height:auto!important}
  .z21-card p{font-size:10.5px!important;line-height:1.75!important;min-height:5.2em!important}
  .z21-price strong{font-size:17px!important}.z21-price small,.z21-price del{font-size:9.5px!important}
  .z21-buy{height:auto!important;min-height:46px!important;padding:9px 7px!important;font-size:12.5px!important;line-height:1.35!important}
  .z21-benefit-grid b{font-size:11.5px!important;line-height:1.5!important}.z21-benefit-grid span{font-size:9.5px!important;line-height:1.6!important}
}
@media(max-width:350px){.z21-grid{grid-template-columns:1fr!important}.z21-actions{grid-template-columns:1fr!important}}

/* Shared mobile section actions: wrap before they collide with headings. */
@media(max-width:640px){
  .z22-section-head,.z24-section-head,.z25-section-head,.z26-section-head{flex-wrap:wrap!important;align-items:flex-start!important;gap:10px!important}
  .z22-section-head>div,.z24-section-head>div,.z25-section-head>div,.z26-section-head>div{min-width:0!important;flex:1 1 220px!important}
  .z22-section-head button,.z24-section-head>a,.z25-section-head>a,.z26-section-head>a{height:auto!important;min-height:44px!important;padding:9px 12px!important;line-height:1.4!important;white-space:normal!important;text-align:center!important}
}

/* Cart/checkout: no clipped quantity, coupon or CTA labels on narrow devices. */
@media(max-width:640px){
  .z22-item-top{gap:8px!important}.z22-item-info{min-width:0!important}
  .z22-item-bottom{gap:10px!important;flex-wrap:wrap!important;align-items:center!important}
  .z22-line-price{min-width:0!important;margin-inline-start:auto!important}
  .z22-continue,.z22-checkout{min-height:48px!important;height:auto!important;line-height:1.45!important;white-space:normal!important}
  .z22-coupon>div{grid-template-columns:minmax(0,1fr) minmax(76px,auto)!important}
  .z22-coupon input{min-width:0!important;font-size:16px!important}
  .z22-coupon button{min-height:46px!important;padding-inline:10px!important;line-height:1.35!important}
}
@media(max-width:390px){
  .z22-item{grid-template-columns:88px minmax(0,1fr)!important}
  .z22-benefits-grid{grid-template-columns:1fr!important}
  .z22-benefits-grid>div{border-left:0!important}
}

/* Offers filters are usable instead of compressed two-column controls on phones. */
@media(max-width:520px){
  .z25-filter{grid-template-columns:1fr!important;gap:11px!important}
  .z25-filter>*{grid-column:1!important;min-width:0!important}
  .z25-filter select{font-size:16px!important;min-height:48px!important;height:auto!important}
  .z25-check,.z25-filter button{height:auto!important;min-height:48px!important}
  .z25-filter button{padding:10px 12px!important;line-height:1.4!important}
  .z25-section-head>a{width:100%!important;justify-content:center!important}
}
@media(max-width:350px){.z25-grid{grid-template-columns:1fr!important}}

/* Brand/category grids: avoid 3 cramped columns when device or text is narrow. */
@media(max-width:480px){
  .z26-brand-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .z26-hero-stats{grid-template-columns:1fr!important}
  .z26-section-head{gap:10px!important}
  .z19-brand-panel>div{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:350px){
  .z26-featured-grid,.z26-products-grid,.z19-products-grid{grid-template-columns:1fr!important}
}

/* Product detail: flexible tabs, prices and action labels. */
@media(max-width:767px){
  .z24-tabs{scroll-padding-inline:10px!important;-webkit-overflow-scrolling:touch!important}
  .z24-tabs button{height:auto!important;min-height:42px!important;padding:9px 13px!important;line-height:1.4!important;font-size:12.5px!important}
  .z24-add{height:auto!important;min-height:52px!important;padding:10px 12px!important;line-height:1.4!important;white-space:normal!important;text-align:center!important}
  .z24-stock-row,.z24-buy-head{flex-wrap:wrap!important}
  .z24-price{flex-wrap:wrap!important}
  .z24-related-body h3{height:auto!important;min-height:3.7em!important;max-height:none!important;line-height:1.85!important}
  .z24-related-view{height:auto!important;min-height:46px!important;padding:9px 8px!important;line-height:1.4!important}
}
@media(max-width:350px){.z24-related-grid{grid-template-columns:1fr!important}}

/* Account page controls remain readable when iOS accessibility text is larger. */
@media(max-width:720px){
  .z34-button,.z34-icon-button{height:auto!important;min-height:44px!important;line-height:1.4!important}
  .z34-quick-actions>a{height:auto!important;min-height:108px!important}
  .z34-profile-card__identity,.z34-page-head,.z34-card{min-width:0!important}
  .z34-form input,.z34-form select,.z34-form textarea{max-width:100%!important;min-width:0!important}
}

/* Page-builder and theme pages. */
@media(max-width:800px){
  .zspb-section{overflow:clip!important}
  .zspb-card,.zspb-copy,.zspb-hero-copy,.zspb-cta-copy{min-width:0!important}
  .zspb-btn{height:auto!important;min-height:44px!important;padding:10px 16px!important;line-height:1.45!important;white-space:normal!important;text-align:center!important}
  .zspb-cta{gap:14px!important}
}
@media(max-width:480px){
  .zspb-section{padding:17px!important;margin-bottom:14px!important}
  .zspb-hero{min-height:0!important}
}

/* Legacy/checkout/payment pages still used by the standalone checkout flow. */
@media(max-width:720px){
  .service-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .gateway-head{flex-wrap:wrap!important;gap:12px!important}
  .gateway-head>div{min-width:0!important;flex:1 1 200px!important}
  .gateway-lines,.gateway-actions{grid-template-columns:1fr!important}
  .gateway-actions :where(a,button){height:auto!important;min-height:46px!important;line-height:1.45!important;white-space:normal!important;text-align:center!important}
  .checkout-clean-head,.checkout-clean-title{min-width:0!important}
  .checkout-clean-back,.checkout-submit-btn{height:auto!important;min-height:46px!important;line-height:1.45!important;white-space:normal!important;text-align:center!important}
  .checkout-clean-fields input,.checkout-clean-fields select,.checkout-clean-fields textarea{min-width:0!important;max-width:100%!important}
  .zmag-article,.zmag-card,.zmag-list,.zmag-article-body{min-width:0!important;max-width:100%!important}
}
@media(max-width:390px){.service-strip{grid-template-columns:1fr!important}}

/* Floating helpers should not sit on top of primary actions more than necessary. */
@media(max-width:720px){
  #zsChatOpen.consult-fab{inset-inline-start:auto!important;inset-inline-end:12px!important;width:48px!important;min-width:48px!important;max-width:48px!important;height:48px!important;min-height:48px!important;border-radius:15px!important;inset-block-end:calc(var(--zs-chat-nav-height) + var(--zs-chat-safe-bottom) + 10px)!important}
  #zsChatOpen .consult-icon{width:22px!important;height:22px!important;font-size:18px!important}
  .zs-shell-backtop{inset-inline-start:12px!important;inset-inline-end:auto!important}
}

/* Extremely narrow screens: prioritize one-column readability. */
@media(max-width:330px){
  .z20-grid,.z21-grid,.z24-related-grid,.z25-grid,.z26-featured-grid,.z26-products-grid,.z19-products-grid{grid-template-columns:1fr!important}
}
