/* ============================================================
   Responsive audit fixes — poli-tika.ru
   Isolated overrides. Loaded on every page via footer chunk.
   Does not modify style.css. Uses !important only where it must
   override inline <style> in the cart resource.
   ============================================================ */

/* ---------- Fix 1: Mobile navigation drawer (<=900px) ---------- */
.rf-drawer-backdrop{
  position:fixed; inset:0; background:rgba(11,31,82,.5);
  opacity:0; visibility:hidden; transition:opacity .25s ease; z-index:1000;
}
.rf-drawer-backdrop.rf-open{ opacity:1; visibility:visible; }

.rf-drawer{
  position:fixed; top:0; right:0; height:100%; width:min(320px,86vw);
  background:#fff; z-index:1001; transform:translateX(100%);
  transition:transform .28s ease; display:flex; flex-direction:column;
  box-shadow:-8px 0 30px rgba(0,0,0,.18); overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.rf-drawer.rf-open{ transform:translateX(0); }
.rf-drawer__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px; border-bottom:1px solid #e6ebf5; flex-shrink:0;
}
.rf-drawer__title{
  font-family:var(--font-display,inherit); font-weight:800;
  font-size:1.1rem; color:#0b1f52;
}
.rf-drawer__close{
  width:44px; height:44px; min-width:44px; border:none; background:transparent;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  color:#0b1f52; border-radius:8px;
}
.rf-drawer__close:hover,.rf-drawer__close:focus{ background:#f0f4fb; outline:none; }
.rf-drawer__nav{ display:flex; flex-direction:column; padding:6px 0 18px; }
.rf-drawer__nav a{
  display:flex; align-items:center; min-height:52px; padding:10px 20px;
  color:#1a2540; text-decoration:none; font-size:1.02rem; font-weight:600;
  border-bottom:1px solid #f2f5fb;
}
.rf-drawer__nav a:hover,.rf-drawer__nav a:focus{
  background:#f0f4fb; color:#1552d4; outline:none;
}
.rf-drawer__nav a.rf-catalog{ color:#1552d4; font-weight:800; }
body.rf-noscroll{ overflow:hidden; }

/* ---------- Fix 4: Compact mobile search toggle (<=900px) ---------- */
.rf-search-toggle{
  width:44px; height:44px; min-width:44px; border:1.5px solid #d5def0;
  background:#fff; border-radius:10px; display:none; align-items:center;
  justify-content:center; cursor:pointer; color:#1552d4; flex-shrink:0;
}
.rf-search-toggle:hover,.rf-search-toggle:focus{ border-color:#1552d4; outline:none; }

@media (max-width:900px){
  .rf-search-toggle{ display:inline-flex; }
  .header{ position:relative; }
  /* Reclaim room for the search toggle so the header row never overflows */
  .header__actions{ gap:8px; min-width:0; }
  .header-login-btn__arrow{ display:none !important; }
  /* Reveal the existing header search bar as a dropdown panel */
  .header.rf-search-open .search-bar{
    display:flex !important; position:absolute; left:0; right:0; top:100%;
    z-index:60; background:#fff; padding:12px 16px; margin:0;
    box-shadow:0 10px 22px rgba(0,0,0,.12);
    border-top:1px solid #e6ebf5;
  }
  .header.rf-search-open .search-bar input{ flex:1 1 auto; min-width:0; }
}

/* On phones the account button collapses to icon-only so the logo,
   search toggle and account button all fit without horizontal overflow. */
@media (max-width:600px){
  .header-login-btn__text,
  .header-login-btn__divider{ display:none !important; }
  .header-login-btn{ padding:8px !important; gap:0 !important; }
}

/* Hide our mobile-only widgets on desktop */
@media (min-width:901px){
  .rf-drawer,.rf-drawer-backdrop,.rf-search-toggle{ display:none !important; }
}

/* ---------- Fix 3: Touch targets >=44x44 on mobile (<=600px) ---------- */
@media (max-width:600px){
  .qty-btn{ width:44px !important; min-width:44px !important; height:44px !important; }
  .qty-input{ width:52px !important; min-width:52px !important; height:44px !important; font-size:16px !important; }
  .ct-del{ width:44px !important; min-width:44px !important; height:44px !important; }
}

/* ---------- Fix 2: Cart stacked cards (no horizontal overflow) <=600px ---------- */
@media (max-width:600px){
  .cart-table{
    border:none !important; background:transparent !important;
    border-radius:0 !important; overflow:visible !important;
  }
  .cart-table tbody{ display:block !important; }
  .cart-table tbody tr{
    display:block !important; position:relative;
    border:1.5px solid var(--color-border,#e6ebf5) !important;
    border-radius:14px !important; background:var(--color-surface,#fff);
    margin-bottom:14px; padding:14px 16px 12px;
  }
  .cart-table tbody tr:hover{ background:var(--color-surface,#fff) !important; }
  .cart-table tbody td{
    display:block !important; width:auto !important; min-width:0 !important;
    text-align:left !important; white-space:normal !important;
    padding:5px 0 !important; vertical-align:top;
  }
  .cart-table tbody td:first-child,
  .cart-table tbody td:last-child{ padding-left:0 !important; padding-right:0 !important; }

  .col-num{ display:none !important; }

  .col-name{ padding-right:52px !important; }   /* room for delete btn */
  .col-name .ct-name{ font-size:1rem; font-weight:700; line-height:1.25; }
  .col-name .ct-sku{ color:var(--color-text-faint,#94a3b8); font-size:.8rem; }

  .col-price::before{ content:"Цена: "; color:var(--color-text-faint,#94a3b8); font-weight:500; }
  .col-total{ font-weight:700; }
  .col-total::before{ content:"Сумма: "; color:var(--color-text-faint,#94a3b8); font-weight:500; }

  .col-qty{ display:flex !important; align-items:center; gap:10px; }
  .col-qty::before{ content:"Кол-во:"; color:var(--color-text-faint,#94a3b8); font-weight:500; }
  .col-qty > div{ justify-content:flex-start !important; }

  .col-del{
    position:absolute !important; top:12px; right:12px;
    width:auto !important; padding:0 !important;
  }
  .ct-del{ margin:0 !important; }
}

/* ---------- Fix 5: keep PDP fixed cart bar above global bottom bar ---------- */
@media (max-width:480px){
  .pdp-photo-cart{ bottom:72px !important; }
}

/* ---------- Fix 8: Hero CTAs stack cleanly at very narrow widths ---------- */
@media (max-width:420px){
  .hero__actions{ flex-direction:column; align-items:stretch; gap:10px; }
  .hero__actions > .btn{ width:100%; justify-content:center; }
}

/* ---------- Fix 6: pricelist empty-state styling (mobile-safe) ---------- */
.pricelist-empty{
  background:var(--color-surface,#fff); border:1.5px solid var(--color-border,#e6ebf5);
  border-radius:var(--radius-xl,16px); padding:36px 24px; text-align:center;
}
.pricelist-empty__icon{ color:#1552d4; margin-bottom:14px; }
.pricelist-empty__title{
  font-family:var(--font-display,inherit); font-size:1.35rem; font-weight:800;
  color:var(--color-text,#1a1a1a); margin:0 0 10px;
}
.pricelist-empty__text{
  color:var(--color-text-muted,#475569); font-size:var(--text-base,1rem);
  line-height:1.6; max-width:520px; margin:0 auto 22px;
}
.pricelist-empty__actions{
  display:flex; flex-wrap:wrap; gap:12px; justify-content:center;
}
