/* ===== Mobile / tablet adaptation ===== */
/* no overflow on body: it would break the sticky header (html is the scroller) */
.burger{display:none;width:2.4rem;height:2.4rem;place-items:center;border-radius:.6rem;color:var(--navy)}
.burger svg{width:1.5rem;height:1.5rem}
.burger .b-close{display:none}
.header.menu-open .burger .b-open{display:none}
.header.menu-open .burger .b-close{display:block}

@media (max-width:900px){
  html{font-size:15px}
  .container{padding:0 1rem}
  .slide__in{padding:0 1rem}

  /* header */
  .header{height:auto}
  .header.menu-open{max-height:100vh;overflow-y:auto}
  .header__in{flex-wrap:wrap;height:auto;padding-top:.6rem;padding-bottom:.6rem;gap:.6rem .9rem}
  .logo{order:1;margin-right:auto}
  .logo img{height:1.9rem}
  .account{order:2}
  .cart{order:3;border-left:0;padding-left:0;height:auto}
  .fav{order:3;height:auto}
  .burger{display:grid;order:4}
  .search{order:5;flex:1 0 100%;width:100%;margin:0;height:2.6rem}
  .search input{font-size:16px}
  .nav{order:6;display:none;flex:1 0 100%;flex-direction:column;align-items:stretch;gap:0;border-top:1px solid var(--line)}
  .header.menu-open .nav{display:flex}
  .nav__item,.nav__link{width:100%}
  .nav__link{justify-content:space-between;padding:.95rem .2rem;font-size:1rem;border-bottom:1px solid var(--line)}
  .nav__link svg{width:.8rem;height:.8rem}
  .nav__drop{position:static}
  .dropdown{position:static;display:none;width:100%;box-shadow:none;transform:none;opacity:1;visibility:visible;padding:.2rem 0 .4rem 1rem;border-radius:0}
  .nav__drop.open .dropdown{display:block}
  .dropdown a{padding:.75rem .5rem;font-size:.95rem}

  /* hero */
  .hero{height:27rem}
  .slide__txt{left:1rem;top:1.4rem;transform:none;width:calc(100% - 2rem)}
  .slide h1{font-size:1.85rem}
  .slide p{font-size:.9rem;max-width:none;margin:.7rem 0 1rem}
  .btn{height:2.6rem;font-size:.85rem}
  .slide__art{left:0;right:0;top:auto;bottom:0;width:100%;height:11rem;opacity:1}
  .slide__art .shape{display:none}
  .hero__dots{left:1rem;transform:none;margin-left:0;bottom:.7rem}

  /* sections */
  .catalog{padding:2rem 0 1.6rem}
  .sec-head h2{font-size:1.4rem}
  .cats{grid-template-columns:1fr 1fr;gap:.7rem}
  .cat{height:9.6rem;padding:.7rem .85rem}
  .cat__img{top:.3rem;height:6rem}
  .cat span.t{font-size:.85rem;max-width:100%;padding-right:1rem}
  .cat .go{right:.7rem;bottom:.75rem}

  .banner-sec{padding-bottom:2rem}
  .why-card{padding:1.4rem 0}
  .why-card .why__in{grid-template-columns:1fr;gap:1.2rem;padding:0 1.2rem}
  .why-card .why__left h2{font-size:1.4rem}
  .why-card .why__left p{font-size:.85rem;max-width:none}
  .why__grid{grid-template-columns:1fr 1fr}
  .why-card .why__c{padding:.8rem .8rem .9rem;border-left:0!important;border-bottom:1px solid rgba(255,255,255,.2)!important}
  .why-card .why__c h4{font-size:.8rem}
  .why-card .why__c p{font-size:.75rem}

  .popular{padding-bottom:2rem}
  .pgrid--4{grid-template-columns:1fr 1fr;gap:.7rem}
  .popular .prod__img{height:7rem}
  .prod{padding:.75rem}
  .prod h5{font-size:.85rem}
  .prod small{font-size:.75rem}
  .prod__f{flex-direction:column;align-items:stretch;gap:.5rem}
  .prod__f b{font-size:.95rem}
  .prod__f button{width:100%;padding:.55rem;font-size:.8rem}

  /* footer */
  .footer{padding:1.6rem 0 1rem}
  .footer__in{grid-template-columns:1fr;gap:1.4rem}
  .footer__brand p{font-size:.8rem}
  .footer__nav li,.footer__contacts li{font-size:.9rem}
  .footer__contacts{padding-left:0}
  .footer__bot{flex-direction:column;gap:.6rem;font-size:.75rem}
  .footer__legal{gap:1.2rem;flex-wrap:wrap}

  /* modals, drawer, forms */
  .modal{padding:.6rem}
  .modal__box{padding:1.5rem 1.1rem 1.2rem;border-radius:14px;max-height:92vh}
  .modal h3{font-size:1.15rem;padding-right:1.5rem}
  .pgrid{grid-template-columns:1fr 1fr;gap:.6rem}
  .chips{flex-wrap:nowrap;overflow-x:auto;margin-left:-.2rem;padding-bottom:.4rem;-webkit-overflow-scrolling:touch}
  .chip{white-space:nowrap;flex:none}
  .form input,.form textarea,.form select{font-size:16px;padding:.8rem .9rem}
  .code-input{font-size:1.3rem!important}
  .form .btn,.drawer__f .btn{height:3rem}
  .cat-search input{font-size:16px}
  .row-links{flex-wrap:wrap}
  .drawer{width:100%}
  .toast{width:calc(100% - 2rem);text-align:center;bottom:1rem}
}

@media (max-width:560px){
  .slide h1{font-size:1.65rem}
  .pgrid{grid-template-columns:1fr}
  .why__grid{grid-template-columns:1fr}
  .why-card .why__c:last-child{border-bottom:0!important}
  .account__t{display:none}
  .svc{grid-template-columns:1fr}
  .stats{grid-template-columns:1fr}
}

@media (max-width:900px){
  .sec-head{flex-wrap:wrap;gap:.3rem 1rem;align-items:flex-end}
}
@media (max-width:560px){
  .pgrid--4{grid-template-columns:1fr 1fr}
  .popular .prod__img{height:6rem}
}

/* catalog: mobile */
@media (max-width:900px){
  .cats{grid-template-columns:1fr 1fr}
  .cats .cat{height:10.6rem}
  .cats .cat__img{height:6.2rem}
  .dropdown{top:auto}
  .mega{grid-template-columns:1fr;gap:0;padding:0}
  .dropdown .mega__col a:not(.mega__h){display:none}
  .dropdown .mega__col a.mega__h{font-size:0.95rem;padding:0.8rem 0.5rem;margin:0;border-bottom:0}
  .ctabs{gap:1.1rem}
}

/* cart: larger items on mobile */
@media (max-width:900px){
  .drawer__h{padding:1rem 1.1rem}
  .drawer__h h3{font-size:1.3rem}
  .drawer__b{padding:0.4rem 1.1rem}
  .ci{gap:0.9rem;padding:1.1rem 0;align-items:flex-start}
  .ci__img{width:5.6rem;height:5.6rem;border-radius:0.9rem}
  .ci__img img,.ci__img .noimg{max-width:88%;max-height:88%}
  .ci__img .noimg{width:3rem;height:3rem;border-radius:0.8rem}
  .ci__img .noimg svg{width:1.5rem;height:1.5rem}
  .ci__i{display:flex;flex-direction:column;gap:0.25rem}
  .ci__i h6{font-size:1rem;line-height:1.3}
  .ci__i span{font-size:1rem;font-weight:600;color:var(--navy)}
  .qty{gap:0.6rem;margin-top:0.5rem}
  .qty button{width:2.4rem;height:2.4rem;font-size:1.15rem;border-radius:50%}
  .qty b{font-size:1rem;min-width:1.6rem}
  .ci .rm{width:2.4rem;height:2.4rem;font-size:1.5rem;flex:none}
  .drawer__f{padding:1.1rem}
  .drawer__f .tot{font-size:1.15rem;margin-bottom:0.9rem}
  .empty{font-size:1rem;padding:4rem 0}
}
@media (max-width:900px){.drawer__f .btn{font-size:1rem;height:3.2rem}}

/* close button stays visible while a window is scrolled */
.modal__box > .x{position:sticky;top:0.35rem;display:grid;width:2.4rem;height:2.4rem;margin:-0.9rem -0.5rem -2.4rem auto;right:auto;left:auto;background:#fff;border-radius:50%;box-shadow:0 2px 10px rgba(20,40,60,.2);font-size:1.6rem;color:#3c4a57;z-index:30}
.modal__box > .x:hover{background:var(--bg);color:var(--navy)}

/* close button: top-left corner */
.modal__box{padding-top:3.5rem}
.modal__box > .x{margin:-2.6rem auto -2.4rem -0.5rem}
.modal__box > .x{margin:-2.6rem auto 0.2rem -0.5rem}
/* close button (top-left): a sticky element cannot sit above its container's content box, so the top offset comes from the next block */
.modal__box{padding-top:0.9rem}
.modal__box > .x{margin:0 auto -2.4rem 0}
.modal__box > .x + *{padding-top:2.9rem}
/* back link in a product opened from the catalog: sits beside the top-left button */
.modal__box > .x + .svc-back{margin-left:3rem}

/* horizontal rows (category tabs, section chips): scroll sideways only, never up/down */
.ctabs,.chips{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.ctabs{padding-bottom:1px}
.ctabs button{margin-bottom:0}

/* arrow variant of the top-left button */
.modal__box > .x.x--back{font-size:0}
.x--back svg{width:1.25rem;height:1.25rem;display:block}
@media (max-width:900px){
  .modal{padding-top:.6rem;padding-bottom:.6rem}
  .modal__box{max-height:calc(100vh - 1.2rem);max-height:calc(100dvh - 1.2rem)}
  .modal__box.wide{min-height:0}
}

/* phones: form fields use 16px text, otherwise iOS zooms the page when a field gets focus */
@media (max-width:900px){
  input,select,textarea{font-size:16px!important}
  .req__form input,.req__form select,.req__form .btn{height:3rem}
  .req__ta{height:4.4rem;line-height:1.35}
  .form input,.form select{min-height:2.9rem}
  .req__form{min-height:26.6rem!important;justify-content:center}
}
/* ---- phones: readable text. Base size 16px, small texts get a floor of about 13-14px ---- */
@media (max-width:900px){
  html{font-size:16px}
  /* running text */
  .slide p,.why__left p,.why-card .why__left p,.why__c p,.cta__p,.modal .sub,.modal p.txt,.prod small,.svc p,.footer__brand p,
  .req-card .req__txt p,.req__list li,.svc-card small,.svc-text,.svc-points li,.svc-perk p,.svc-faq details p,.svc-steps li,.svc-req>p,.svc-cta p,
  .pd__desc,.pd__specs table,.pay-note,.about__contacts li,.ocancel p,.empty,.footer__nav li,.footer__contacts li,.search__res a,.reqinfo .svc-steps li,
  .oline__i small,.ocard__meta,.orow__d{font-size:.92rem;line-height:1.55}
  /* titles of small blocks */
  .why__c h4,.prod h5,.svc h5,.svc-card b,.svc-perk b,.svc-faq summary,.ci__i h6,.orders h5,.cat span.t{font-size:.98rem}
  /* labels, captions, tags */
  .eyebrow,.link-arrow,.feat,.account,.cart i,.prod__f button,.chip,.form label,.err,.footer__bot,.svc-card__go,.req__more,.req__links a,.req__msg,
  .hint,.ost,.sr__t,.sr__note,.cat span.n,.gal__count,.fl__t,.fl__btn,.fl__sort,.fl__reset,.ct__item small,.ct__item em,.ct__soc span,.ct__route,
  .acc small,.oline small,.ocard__bot span,.ostatus span,.pd__cat,.form label.chk,.link-btn,.demo-mail,.cart-clear,.svc-back,.svc-tags span,.omore,.orow__d em{font-size:.84rem}
  .req__form small,.svc-shots figcaption,.svc-steps i{font-size:.78rem}
  /* buttons and nav */
  .btn,.btn--big,.btn-out,.req__form .btn,.tabs button,.ctabs button,.drawer__f .btn,.form .btn{font-size:.95rem}
  .nav__link,.dropdown a,.dropdown .mega__col a{font-size:1rem}
  .prod__f b{font-size:1rem}
  .orow__sum{font-size:.95rem}.orow__n{font-size:.95rem}
  .req__form small{line-height:1.5}
}
@media (max-width:900px){.cart i{font-size:.75rem;min-width:1.25rem;height:1.25rem;border-radius:.65rem;top:-.6rem;right:-.9rem}}

/* footer on the phone: tidy blocks */
@media (max-width:900px){
  .footer__in{gap:1.6rem;padding-bottom:1.6rem}
  .footer__nav{display:grid;grid-template-columns:1fr 1fr;gap:.2rem 1rem}
  .footer__nav li{margin:0}
  .footer__nav a{display:block;padding:.45rem 0}
  .footer__contacts li{margin-bottom:.9rem;align-items:flex-start}
  .footer__contacts svg{width:1.05rem;height:1.05rem;margin-top:.2rem;flex:none}
  .soc{gap:1.1rem!important;margin-top:1.2rem}
  .soc a{display:grid;place-items:center;width:2.6rem;height:2.6rem;border-radius:50%;background:rgba(255,255,255,.08)}
  .soc svg{width:1.3rem;height:1.3rem}
  .footer__bot{flex-direction:column-reverse;gap:1rem;padding-top:1.1rem;font-size:.82rem}
  .footer__legal{flex-direction:column;gap:.2rem}
  .footer__legal a{display:block;padding:.45rem 0;color:#aab6c1}
  .footer__bot>span:first-child{color:#7d8a97}
}

/* hero on the phone: the same title size on all banners (h1 and h2 alike) */
@media (max-width:900px){
  .slide h1,.slide h2{font-size:clamp(1.6rem,8.4vw,2.125rem);line-height:1.15}
  .hero{height:28.5rem}
  .slide__art{height:12.5rem}
}

/* phone: two product cards in a row in the catalog window (the list of products) */
@media (max-width:560px){
  .pgrid{grid-template-columns:1fr 1fr;gap:.55rem}
  .pgrid .prod{padding:.6rem;border-radius:.65rem}
  .pgrid .prod__img{height:6.4rem;margin-bottom:.35rem}
  .pgrid .prod h5{font-size:.88rem;line-height:1.3;overflow-wrap:anywhere}
  .pgrid .prod__f{padding-top:.45rem;gap:.4rem}
  .pgrid .prod__f b{font-size:.92rem;white-space:nowrap}
  .pgrid .prod__f button{padding:.5rem .3rem;font-size:.8rem}
}
/* phone: the filter panel is more compact (more values in a row), still easy to read and tap */
@media (max-width:700px){
  .fl__panel{padding:.8rem .85rem;gap:.8rem 1rem;margin-bottom:.8rem}
  .fl__grp{gap:.4rem}
  .fl__chips{gap:.32rem}
  .fl__chips .chip{padding:.3rem .62rem;font-size:.82rem;line-height:1.25}
  .fl__t{font-size:.72rem}
  .fl__specs{gap:.8rem;padding-top:.7rem}
}
/* footer on the phone v2: separate blocks with small headings, link tiles, contacts card */
@media (max-width:900px){
  .footer__in{gap:1.5rem}
  .footer__nav::before,.footer__contacts::before{display:block;font-size:.72rem;letter-spacing:.09em;text-transform:uppercase;color:var(--teal);font-weight:700;margin-bottom:.7rem}
  .footer__nav::before{content:"Разделы";grid-column:1/-1}
  .footer__contacts::before{content:"Контакты"}
  .footer__nav{gap:.55rem .6rem}
  .footer__nav a{padding:.8rem 1rem;border-radius:.75rem;background:rgba(255,255,255,.06);color:#e4ebf1;font-weight:500}
  .footer__nav a:active{background:rgba(6,182,200,.25)}
  .footer__contacts{background:rgba(255,255,255,.04);border-radius:.9rem;padding:1rem 1.1rem!important}
  .footer__contacts li{margin-bottom:0;padding:.7rem 0;border-bottom:1px solid rgba(255,255,255,.08);align-items:center}
  .footer__contacts li.soc{border-bottom:0;padding-bottom:.2rem}
  .footer__contacts::before{padding-bottom:.1rem}
  .footer__legal{flex-direction:row;flex-wrap:wrap;gap:.2rem 1.2rem}
  .footer__legal a{padding:.3rem 0;font-size:.8rem}
}

/* header on the phone: even spacing for the icons */
@media (max-width:900px){
  .fav,.cart,.account+.fav{margin-left:0}
  .fav{padding:0 .55rem;margin-right:.3rem}
  .cart{padding:0 .3rem;margin-right:.3rem}
  .fav i{font-size:.75rem;min-width:1.25rem;height:1.25rem;border-radius:.65rem;top:-.6rem;right:-.2rem}
  .cart i{right:-.5rem}
}

/* phone: the product page header shows only the account icon; the buy row is one line (cart button + heart) */
@media (max-width:560px){ .account .account__t{display:none} }
@media (max-width:900px){
  .prod2__buy .prod2__price,.pd__buy .pd__price{flex:1 0 100%}
  .prod2__info .prod2__buy .btn,.pd__buy .btn{width:auto;flex:1 1 0;min-width:0}
  .prod2__buy .heart--inline,.pd__buy .heart--inline{flex:none}
  .prod2__buy,.pd__buy{gap:.7rem}
}
