/* ==============================================
   SUSHILOVE — Кастомный попап корзины
   Вставить в: Настройки сайта → Редактировать CSS
   ВАЖНО: id "sl-cart" здесь принадлежит ПОПАПУ корзины.
   Страница /order использует другой id ("sl-order-page"),
   чтобы не было конфликта стилей между попапом и страницей заказа.
   Не переименовывай без необходимости — это исторически было
   причиной бага "страница открывается только как попап".
   ============================================== */

/* ── ОВЕРЛЕЙ ── */
#sl-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 9998;
}
#sl-cart {
  display: none; position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 3px solid #e63329;
  border-radius: 8px 8px 0 0;
  z-index: 9999; max-height: 85vh;
  flex-direction: column;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.10);
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
}
#sl-cart.open, #sl-overlay.open { display: flex; }

/* ── РУЧКА ── */
.sl-handle-row { padding: 10px 0 6px; display: flex; justify-content: center; flex-shrink: 0; }
.sl-handle { width: 40px; height: 4px; background: #ddd; border-radius: 2px; }

/* ── ШАПКА ── */
.sl-head { padding: 0 18px 14px; border-bottom: 1px solid #f0f0ee; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.sl-head-left { display: flex; align-items: baseline; gap: 8px; }
.sl-title { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.sl-qty-label { font-size: 12px; color: #aaa; }
.sl-close { background: #f2f2f0; border: none; border-radius: 4px; width: 30px; height: 30px; cursor: pointer; color: #888; font-size: 13px; display: flex; align-items: center; justify-content: center; }

/* ── СПИСОК ТОВАРОВ ── */
.sl-items { flex: 1; overflow-y: auto; }
.sl-items::-webkit-scrollbar { width: 0; }
.sl-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #f5f5f3; }
.sl-item-img { width: 52px; height: 52px; background: #f5f5f3; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.sl-item-info { flex: 1; min-width: 0; }
.sl-item-name { font-size: 13px; font-weight: 600; color: #1a1a1a; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-item-price { font-size: 13px; font-weight: 700; color: #1a1a1a; }

/* ── СЧЁТЧИК +/− ── */
.sl-ctrl { display: flex; align-items: center; border: 1px solid #e8e8e6; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.sl-ctrl button { background: #f5f5f3; border: none; width: 32px; height: 32px; font-size: 16px; color: #888; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sl-ctrl button:hover { color: #e63329; }
.sl-ctrl span { width: 32px; text-align: center; font-size: 13px; font-weight: 700; color: #1a1a1a; border-left: 1px solid #e8e8e6; border-right: 1px solid #e8e8e6; }

/* ── ПУСТАЯ КОРЗИНА ── */
.sl-empty { padding: 48px 18px; text-align: center; color: #ccc; font-size: 13px; }

/* ── ПОДВАЛ ── */
.sl-foot { padding: 14px 18px 24px; border-top: 1px solid #ebebea; flex-shrink: 0; }
.sl-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sl-total-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #aaa; }
.sl-total-sum { font-size: 26px; font-weight: 800; color: #1a1a1a; }
.sl-total-sum sup { font-size: 14px; font-weight: 500; color: #888; margin-right: 2px; }
.sl-btn-order { width: 100%; background: #e63329; color: #fff; border: none; border-radius: 6px; padding: 15px; font-size: 13px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; cursor: pointer; }
.sl-btn-order:hover { background: #c4251b; }
.sl-btn-order:disabled { background: #ddd; color: #bbb; cursor: default; }
.sl-foot-links { display: flex; justify-content: space-between; margin-top: 10px; }
.sl-foot-links button { background: none; border: none; font-size: 11px; color: #ccc; cursor: pointer; }
.sl-foot-links button:hover { color: #e63329; }




/* ==============================================
   SUSHILOVE — Виджет техподдержки
   Вставить в: Настройки сайта → Редактировать CSS
   Дизайн-система: sushilove-design-system.md (акцент #c0392b)
   ============================================== */

#sup-fab, #sup-sheet, #sup-overlay {
  font-family: 'Montserrat', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  box-sizing: border-box;
}
#sup-fab *, #sup-sheet *, #sup-overlay * { box-sizing: border-box; }

/* ── ПЛАВАЮЩАЯ КНОПКА ── */
#sup-fab {
  position: fixed;
  right: 16px; bottom: 16px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(192,57,43,0.35);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 9990;
  transition: transform .15s;
}
#sup-fab:hover { background: #8b1a1a; transform: scale(1.05); }
#sup-fab:active { transform: scale(0.95); }

/* если на странице уже есть фиксированная нижняя панель заказа —
   поднимаем кнопку повыше на мобиле */
@media (max-width: 720px) {
  #sup-fab { bottom: 16px; right: 12px; width: 48px; height: 48px; }
}

/* ── ОВЕРЛЕЙ ── */
#sup-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 9991;
}
#sup-overlay.open { display: block; }

/* ── BOTTOM SHEET ── */
#sup-sheet {
  display: none; flex-direction: column;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 3px solid #c0392b;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  max-height: 60vh;
  z-index: 9992;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
}
#sup-sheet.open { display: flex; transform: translateY(0); }

.sup-handle-row { padding: 10px 0 4px; display: flex; justify-content: center; flex-shrink: 0; }
.sup-handle { width: 40px; height: 4px; background: #e0e0e0; border-radius: 2px; }

.sup-head {
  padding: 4px 18px 14px;
  border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.sup-title { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.sup-close {
  background: #f7f7f7; border: none; border-radius: 6px;
  width: 30px; height: 30px; cursor: pointer; color: #888; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}

.sup-body { padding: 14px 18px 28px; display: flex; flex-direction: column; gap: 10px; }

.sup-opt {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.sup-opt:hover { border-color: #c0392b; background: #fff5f5; }
.sup-opt-ico { font-size: 22px; flex-shrink: 0; }
.sup-opt-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sup-opt-txt b { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.sup-opt-txt small { font-size: 12px; color: #888; font-weight: 500; }
.sup-opt-arrow { color: #c0392b; font-size: 16px; flex-shrink: 0; }