/* public/styles/cart-ux.css — корзина, окно «Добавлено», окно «Написать нам» / «Заявка», итог на /order, шапка без
   пустышек (docs/krepezh-ux.md, пункт 1, 2026-11-11). Подключён в views/layout.pug на всех страницах. Без Bootstrap:
   только свои классы (.cv-*, .cart-added*, .mm-*, .ord-*) и точечные поправки старых классов шапки. */

/* ---------- шапка: «Настройки», «Россия», «₽», «Все категории» убраны ---------- */
.track_order1 { border-right: none; padding-right: 0; }
.search_section_wrapper.ssw-nocat { padding-left: 0; }
.ssw-nocat .search-form-wrapper .form-control { padding-left: 24px; border-radius: 25px 0 0 25px; }
/* 768–991 px: логотип 210 + поиск + корзина 200 не помещались в 720 — корзина уезжала под поиск (было и раньше) */
@media (min-width: 768px) and (max-width: 991px) {
  .search_section_wrapper.ssw-nocat { margin-left: 10px; width: 290px; }
}

/* мега-меню «Метизы & Крепёж»: три колонки текста + фото */
.mm-metiz .menu-item-container-image { width: 25%; padding-right: 30px; }
.mm-metiz .menu-item-image img { width: 100%; height: auto; max-width: 260px; }
.mm-metiz .menu-item-container-text { padding-right: 16px; }
.mm-metiz .menu-item-title { white-space: normal; }
.mm-metiz .menu-item-title a { color: inherit; text-decoration: none; }
.mm-metiz .menu-item-title a:hover { color: #2d719d; }
.mm-metiz .mm-metiz-tool { margin-top: 8px; padding-top: 8px; border-top: 1px solid #ebebeb; }
.mm-metiz .mm-metiz-tool a { color: #2d719d; }

/* ---------- всплывающая корзина в шапке (рисует cart-view.js) ---------- */
.my_cart_popup .cv-empty { padding: 22px 0 4px; font-size: 14px; line-height: 20px; color: #5b6670; }
.my_cart_popup .cv-empty b { display: block; font-size: 16px; font-weight: 500; color: #333e48; margin-bottom: 4px; }
.my_cart_popup .cv-head { padding: 16px 0 6px; font-size: 13px; color: #5b6670; }
.my_cart_popup .cv-list { max-height: 330px; overflow-y: auto; margin-bottom: 12px; }
.my_cart_popup .cart_item { padding: 10px 0; gap: 10px; align-items: flex-start; }
.my_cart_popup .cart_item figure { width: 56px; flex: 0 0 56px; margin: 0; }
.my_cart_popup .cart_item figure img { width: 56px; height: auto; }
.my_cart_popup .cart_item .caption { width: auto; flex: 1 1 auto; margin: 0; }
.my_cart_popup .cart_item .txt1 a, .my_cart_popup .cart_item .txt1 span { font-size: 13px; line-height: 17px; color: #333e48; text-decoration: none; }
.my_cart_popup .cart_item .txt1 a:hover { color: #2d719d; }
.my_cart_popup .cart_item .txt2 { padding-top: 4px; font-size: 13px; color: #5b6670; white-space: nowrap; }
.my_cart_popup .cart_item .txt2 b { color: #333e48; font-weight: 500; }
.my_cart_popup .cart_item .cart_item_delete { color: #9aa3ab; padding: 2px 4px; }
.my_cart_popup .cart_item .cart_item_delete:hover { color: #c0392b; }
.my_cart_popup .my_cart_subtotal { padding-top: 0; }
.my_cart_popup .my_cart_subtotal .right { font-size: 18px; }
.my_cart_popup .cv-go { margin-bottom: 0; background: #febf00; color: #333e48; }
.my_cart_popup .cv-go:hover { background: #333e48; color: #fff; }

/* ---------- окно «Добавлено в корзину» (Swal, cart.js cartShowAdded) ---------- */
.cart-added-popup { font-family: 'Rubik', sans-serif; }
.cart-added { list-style: none; margin: 4px 0 0; padding: 0; text-align: left; max-height: 240px; overflow-y: auto; }
.cart-added li { padding: 9px 0; border-bottom: 1px solid #ebebeb; font-size: 14px; line-height: 19px; color: #333e48; }
.cart-added li span { display: block; }
.cart-added li b { display: block; margin-top: 2px; font-weight: 500; color: #5b6670; }
.cart-added__total { margin-top: 12px; font-size: 14px; color: #5b6670; text-align: left; }
.cart-added__total b { color: #333e48; font-weight: 500; }
.cart-added__go, .cart-added__stay { margin: 6px; padding: 12px 22px; border: 0; border-radius: 4px; font: 500 15px/20px 'Rubik', sans-serif; cursor: pointer; }
.cart-added__go { background: #febf00; color: #333e48; }
.cart-added__go:hover { background: #f0b400; }
.cart-added__stay { background: #eef1f4; color: #333e48; }
.cart-added__stay:hover { background: #e2e7ec; }
.cart-added__go:focus, .cart-added__stay:focus { outline: 2px solid #2d719d; outline-offset: 2px; }

/* ---------- окно «Написать нам» / «Заявка» (views/modal.pug, mail-modal.js) ---------- */
#modalMailView .mm { position: relative; border-radius: 8px; }
#modalMailView .mm-close { position: absolute; right: 14px; top: 10px; z-index: 2; font-size: 30px; line-height: 30px; opacity: .5; }
#modalMailView .mm-close:hover { opacity: .9; }
.mm-body { padding: 26px 30px 24px; color: #333e48; }
.mm-title { margin: 0 34px 6px 0; font-size: 24px; line-height: 30px; font-weight: 500; }
.mm-title-mail { display: inline-block; margin-left: 12px; font-size: 15px; font-weight: 400; color: #5b6670; }
.mm-lead { margin: 0 0 14px; font-size: 14px; line-height: 20px; color: #5b6670; }
.mm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; margin-top: 14px; }
.mm-grid--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 6px; }
.mm-field { margin: 0 0 14px; min-width: 0; }
.mm-field > label, .mm-recv legend { display: block; margin: 0 0 5px; padding: 0; border: 0; font-size: 14px; line-height: 18px; font-weight: 500; color: #333e48; }
.mm-req { color: #c0392b; }
.mm-opt { font-weight: 400; color: #7b858e; font-size: 13px; }
.mm-input { display: block; width: 100%; box-sizing: border-box; height: 44px; padding: 10px 12px; border: 1px solid #cfd6dc; border-radius: 6px; background: #fff; font: 15px/22px 'Rubik', sans-serif; color: #333e48; }
.mm-input:focus { outline: none; border-color: #2d719d; box-shadow: 0 0 0 3px rgba(45, 113, 157, .15); }
.mm-input:disabled { background: #f4f6f8; }
.mm-text { height: auto; min-height: 150px; resize: vertical; font-size: 14px; line-height: 20px; }
.mm-input.mm-bad { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12); }
.mm-err { margin-top: 5px; font-size: 13px; line-height: 17px; color: #c0392b; }
.mm-hint { margin: -4px 0 14px; font-size: 13px; color: #7b858e; }
.mm-recv { border: 0; padding: 0; min-width: 0; }
.mm-recv .mm-radio { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 6px; font-size: 14px; line-height: 19px; font-weight: 400; color: #333e48; cursor: pointer; }
.mm-recv .mm-radio input { margin: 2px 0 0; flex: 0 0 auto; }
.mm-recv .mm-radio b { font-weight: 500; }
.mm-file { font-size: 14px; max-width: 100%; }
.mm-submit { display: inline-block; min-width: 240px; margin: 6px 0 0; padding: 14px 28px; border: 0; border-radius: 6px; background: #333e48; color: #fff; font: 500 16px/20px 'Rubik', sans-serif; cursor: pointer; }
.mm-submit:hover { background: #3b5473; }
.mm-submit:disabled { opacity: .7; cursor: wait; }
#modalMailView .mm-cart-only { display: none; }
#modalMailView.mm--cart .mm-cart-only { display: block; }
#modalMailView.mm--cart .mm-grid.mm-cart-only { display: grid; }
#modalMailView .mm-body .pd-consent { margin: 4px 0 0; }

@media (max-width: 767px) {
  .mm-body { padding: 20px 16px 18px; }
  .mm-title { font-size: 21px; line-height: 26px; }
  .mm-title-mail { display: block; margin: 2px 0 0; font-size: 14px; }
  .mm-grid, .mm-grid--2 { grid-template-columns: minmax(0, 1fr); }
  #modalMailView.mm--cart .mm-grid.mm-cart-only { grid-template-columns: minmax(0, 1fr); }
  .mm-submit { width: 100%; min-width: 0; }
}

/* ---------- страница корзины /order: блок «Итого» (cart.js showElementCart) ---------- */
.total-check { display: flex; justify-content: flex-end; margin: 24px 0 40px; }
.ord-total { width: 100%; max-width: 420px; padding: 26px 28px; background: #f4f6f8; border-radius: 8px; color: #333e48; font-size: 15px; }
.ord-total__title { font-size: 20px; font-weight: 500; margin-bottom: 12px; }
.ord-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; }
.ord-row span { color: #5b6670; }
.ord-row b { font-weight: 500; text-align: right; }
.ord-note { margin: -2px 0 8px; font-size: 13px; line-height: 19px; color: #5b6670; }
.ord-note a, .ord-empty a { color: #2d719d; text-decoration: underline; cursor: pointer; }
.ord-row--sum { margin-top: 8px; padding-top: 14px; border-top: 1px solid #dde2e7; }
.ord-row--sum span { color: #333e48; }
.ord-row--sum b { font-size: 22px; }
.ord-btn { display: block; margin: 18px 0 10px; padding: 15px; border-radius: 6px; background: #febf00; color: #333e48; text-align: center; text-decoration: none; font-size: 16px; font-weight: 500; }
.ord-btn:hover, .ord-btn:focus { background: #333e48; color: #fff; text-decoration: none; }
.ord-back { display: block; text-align: center; padding: 8px; color: #2d719d; font-size: 14px; text-decoration: none; }
.ord-back:hover { text-decoration: underline; }
.ord-empty { width: 100%; padding: 18px 0; font-size: 15px; color: #5b6670; }
.table-order .product-shopping-cart-price, .table-order .product-shopping-cart-total-price { white-space: nowrap; }
.table-order .ord-deliv-row .product-shopping-cart figure { max-width: 60px; }

@media (max-width: 767px) {
  .total-check { margin: 16px 0 28px; }
  .ord-total { max-width: none; padding: 20px 16px; }
  /* телефон: строка корзины — карточка (таблица 670 px уезжала вбок, цена и количество были за краем экрана) */
  .table-responsive1 { overflow-x: visible; border: 0; margin-bottom: 0; }
  .table-order, .table-order tbody { display: block; width: 100%; }
  .table-order thead { display: none; }
  .table-order tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid #e3e7eb; }
  .table1.table-order > tbody > tr > td { display: block; padding: 0; border: 0; white-space: normal; }
  .table-order .ord-c-name { flex: 1 1 100%; }
  .table-order .product-shopping-cart { display: flex; align-items: center; gap: 10px; }
  .table-order .product-shopping-cart::before, .table-order .product-shopping-cart::after { display: none; }
  .table-order .product-shopping-cart figure { float: none; flex: 0 0 56px; max-width: 56px; margin: 0; }
  .table-order .product-shopping-cart .caption { padding-top: 0; }
  .table-order .ord-c-price::before, .table-order .ord-c-sum::before { content: attr(data-label); display: block; font-size: 12px; line-height: 14px; color: #7b858e; }
  .table-order .ord-c-price { flex: 0 0 auto; min-width: 72px; }
  .table-order .ord-c-qty { flex: 0 0 auto; }
  .table-order .ord-c-sum { flex: 1 1 auto; text-align: right; }
  .table-order .ord-c-sum .product-shopping-cart-total-price { padding-right: 28px; }
  .table-order .ord-c-sum .close { top: -6px; font-size: 24px; padding: 4px; }
  .table-order .ord-deliv-row .ord-c-price, .table-order .ord-deliv-row .ord-c-qty { display: none; }
}
