/* Правое меню листов каталога (десктоп + телефон) */
#sheet-menu{position:fixed!important;left:8px;top:50%;transform:translateY(-50%);z-index:2147483001;width:52px;
  display:flex;flex-direction:column;align-items:center;background:transparent;
  border:0;border-radius:28px;padding:6px 0;box-shadow:none;
  height:min(82vh,620px);-webkit-user-select:none;user-select:none}
#sheet-menu .sm-arrow{flex:0 0 32px;width:40px;border:0;background:rgba(255,255,255,.72);border-radius:16px;font-size:18px;line-height:32px;color:#333;cursor:pointer;padding:0}
#sheet-menu .sm-arrow:hover{color:#000;background:#f0f0f0;border-radius:16px}
#sheet-menu .sm-list{flex:1 1 auto;width:100%;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;
  -ms-overflow-style:none;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  display:flex;flex-direction:column;align-items:center;gap:6px;padding:4px 0;scroll-behavior:smooth}
#sheet-menu .sm-list::-webkit-scrollbar{display:none}
#sheet-menu .sm-item{flex:0 0 auto;width:38px;height:38px;border-radius:50%;border:1.5px solid #222;background:rgba(255,255,255,.72);
  color:#111;font:500 18px/35px Arial,Helvetica,sans-serif;text-align:center;cursor:pointer;padding:0;transition:.15s}
#sheet-menu .sm-item:hover{background:rgba(255,255,255,.95)}
#sheet-menu .sm-item.active{background:#222;color:#fff}

#sheet-panel{position:fixed;top:0;bottom:0;left:0;right:0;z-index:2147483000;display:none;background:rgba(0,0,0,.55)}
#sheet-panel.open{display:block}
#sheet-panel .sp-box{position:absolute;top:0;bottom:0;left:72px;right:0;background:#fff;display:flex;flex-direction:column;
  max-width:1000px;margin-right:auto;box-shadow:4px 0 24px rgba(0,0,0,.25)}
#sheet-panel .sp-head{flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #eee;background:#fff}
#sheet-panel .sp-title{flex:1;font-size:18px;font-weight:700;margin:0}
#sheet-panel .sp-btn{border:1px solid #ccc;background:#fff;border-radius:6px;height:36px;min-width:36px;font-size:16px;cursor:pointer;padding:0 10px}
#sheet-panel .sp-btn:hover{background:#f0f0f0}
#sheet-panel .sp-body{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px;background:#f4f4f4}
#sheet-panel .sp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#sheet-panel .sp-card{display:block;background:#fff;box-shadow:0 1px 6px rgba(0,0,0,.15);text-decoration:none}
#sheet-panel .sp-card img{display:block;width:100%;height:auto}
#sheet-panel .sp-item{background:#fff;box-shadow:0 1px 6px rgba(0,0,0,.15);display:flex;flex-direction:column}
#sheet-panel .sp-item .sp-card{box-shadow:none}
#sheet-panel .sp-buy{padding:10px;display:flex;flex-direction:column;gap:8px;border-top:1px solid #eee}
#sheet-panel .sp-price{font-weight:700;font-size:18px;text-align:center}
#sheet-panel .sp-qty{max-width:120px;margin:0 auto}
#sheet-panel .sp-qty input{height:30px;padding:0 4px}
#sheet-panel .button-group{display:flex;overflow:hidden;border:none}
#sheet-panel .button-group button{border:none;padding:5px 15px;background:#eee;color:#666;text-align:center;white-space:nowrap;border-radius:4px;cursor:pointer}
#sheet-panel .button-group button:first-child{flex:1 1 100%;color:#fff;background:#229ac8}
#sheet-panel .button-group button + button{margin:0 0 0 10px;background:#f7f7f7}
#sheet-panel .button-group button:first-child:hover{background:#33a3d2}
#sheet-panel .button-group button + button:hover{color:#229ac8}
#sheet-panel .button-group .sp-cart.done{background:#2e9e4f}
#sheet-panel .sp-msg{padding:40px 0;text-align:center;color:#777}

@media (max-width:767px){
  /* нижняя панель «Главная / Товаров» всегда на виду: панель листа заканчивается над ней */
  #sheet-panel{bottom:56px}
  #mobile-bottom-bar{position:fixed!important;bottom:0!important;z-index:2147483002!important}
  #sheet-menu{left:4px;top:calc(50% - 28px);width:44px;height:min(74vh,520px);border-radius:24px}
  #sheet-menu .sm-item{width:34px;height:34px;font-size:16px;line-height:31px}
  #sheet-menu .sm-arrow{width:34px}
  #sheet-panel .sp-box{left:0;right:0;width:100%;max-width:none;box-shadow:none}
  #sheet-panel .sp-head{padding:8px 10px 8px 54px}
  #sheet-panel .sp-title{font-size:16px}
  #sheet-panel .sp-body{padding:8px 8px 8px 54px}
  #sheet-panel .sp-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
}
@media (max-width:767px){
  #sheet-panel .sp-buy{padding:6px;gap:6px}
  #sheet-panel .button-group button{padding:5px 8px;font-size:13px}
  #sheet-panel .button-group button + button{margin-left:5px}
  #sheet-panel .button-group .sp-cart i{margin-right:2px}
  #sheet-panel .sp-qty{max-width:110px}
}
@media (max-width:359px){#sheet-panel .sp-grid{grid-template-columns:1fr}}
html.sheet-open,body.sheet-open{overflow:hidden}
body.sheet-open #sheet-menu{position:fixed!important}

/* Телефон: сдвигаем содержимое вправо от плавающего меню листов (оно занимает ~48px слева),
   чтобы поиск, логотип и «Стена категорий» не перекрывались цифрами */
@media (max-width:767px){
  header > .container,
  body > .container,
  div.container[id] { padding-left:54px !important; padding-right:10px !important; }
  header #search { width:100%; }
  header #search .form-control { min-width:0; }
}

/* Название товара над ценой в панели листа */
#sheet-panel .sp-name{font-size:15px;font-weight:600;line-height:1.25;text-align:center;color:#222;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.5em;word-break:break-word}
@media (max-width:767px){#sheet-panel .sp-name{font-size:13px}}
