html {
  scroll-behavior: smooth;
} 

body {
    font-family: "Play", Tahoma, Geneva, Verdana, sans-serif;
    background: url('/img/shop.jpg') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    color: #fff;
}

a {
  font-size: 16pt;
  color: #fff;
  transition: 0.5s;
  text-decoration: none;
}

a:hover {
  color: #467932;
}

h1 {
    margin: 0;
}

h2 {
    margin: 0;
}

/* Menu */
.menu {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: #181818;
  box-shadow: 0px 0px 20px #467932;
  z-index: 20;
}

.nav {
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 20px;
}

.nav-close,
.nav-open {
  display: flex;
  align-items: center;
  font-size: 35px;
  color: #b9e769;
  cursor: pointer;
  display: none;
}

.nav-menu {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-menu .nav-link {
  color: #fff;
  font-size: 14pt;
  position: relative;
  font-weight: 700;
}

.nav-menu .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: #467932;
  transition: 0.5s;
}

.nav-menu .nav-link:hover::after {
  width: 100%;
}

@media screen and (max-width: 860px) {
  .nav-menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background: #181818;
    box-shadow: 0px 0px 20px #467932;
    padding: 80px 0px 30px 0px;
    text-align: center;
    display: flex;
    flex-direction: column;
  }

  .nav-close {
    position: absolute;
    top: 28px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0px 0px 20px #467932;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .nav-close:hover {
    transform: rotate(90deg);
  }

  .nav-open {
    width: 40px;
    height: 40px;
    box-shadow: 0px 0px 20px #467932;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

.show-menu {
  top: -17px;
}

.mobileButtons {
  display: none;
}

/* End Menu */

.container {
  max-width: 1600px;
  margin: 0 auto;
}

.lang-btn {
  background: #b9e769;
  color: #000;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.lang-btn:hover {
  background: #688339;
}

.store-main {
  max-width: 1200px;
  margin: 80px auto 0px auto;
}

.store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: #1e1e1e;
    border-radius: 10px;
    margin: 100px 0px 10px 0px;
    padding: 10px 20px;
}

.store-header h1 {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 50pt;
    color: #b9e769;
}

.store-categories {
    background: #1e1e1e;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 20px;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.categories-list li {
    background: #467932;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.categories-list li:hover {
    background: #2f5221;
}

/* toggle-кнопка по умолчанию скрыта на десктопе */
.categories-toggle { display: none; }

.store-body {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    min-height: 400px;
  position: relative; /* для позиционирования лоадера */
}

.shop-button {
  display: block;
  position: fixed;
  width: 65px;
  height: 65px;
  bottom: 20px;
  right: 20px;
  transition: all .7s ease-in-out;
  z-index: 3;
  cursor: pointer;
}

.shop-button:hover {
  transform: scale(1.2);
}

.call-button {
  display: block;
  position: fixed;
  width: 65px;
  height: 65px;
  bottom: 100px;
  right: 20px;
  transition: all .7s ease-in-out;
  z-index: 3;
  cursor: pointer;
}

.call-button:hover {
  transform: scale(1.2);
}

/* Modal window */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  display: none;
  padding: 30px;
  overflow-y: auto;
  z-index: 1;
}

.modal-window {
  position: relative;
  max-width: 230px;
  border-radius: 10px;
  margin: auto;
  background: linear-gradient(#2c2c2c, #141414);
  color: #fff;
  padding: 30px;
  text-align: center;
}

@property --angle{
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.modal-window::after, .modal-window::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(var(--angle), transparent 30%, #467932);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 2px;
  border-radius: 10px;
  animation: 3s spin linear infinite;
}

.modal-window::before {
  filter: blur(1.5rem);
  opacity: 0.9;
}

.popup::after, .popup::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(var(--angle), transparent 30%, #467932);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 2px;
  border-radius: 10px;
  animation: 3s spin linear infinite;
}

.popup::before {
  filter: blur(1.5rem);
  opacity: 0.9;
}

@keyframes spin {
  from{
    --angle: 0deg;
  }
  to{
    --angle: 360deg;
  }
} 

.modal-title {
  margin-bottom: 20px;
}

.modal-close-btn {
  font-size: 25px;
  position: absolute;
  top: 10px;
  right: 10px;
  transition: 0.5s;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #467932;
}

.modalForm {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  display: none;
  padding: 30px;
  overflow-y: auto;
  z-index: 4000;
}
.modalForm.active { display: flex; align-items: center; justify-content: center; }

.modal-windowForm {
  position: relative;
  max-width: 650px;
  border-radius: 10px;
  margin: auto;
  background: linear-gradient(#2c2c2c, #141414);
  color: #fff;
  padding: 30px;
  text-align: center;
}

.modal-windowForm::after, .modal-windowForm::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(var(--angle), transparent 30%, #467932);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 2px;
  border-radius: 10px;
  animation: 3s spin linear infinite;
}

.modal-windowForm::before {
  filter: blur(1.5rem);
  opacity: 0.9;
}

.modal-titleForm {
  margin-bottom: 30px;
}

.modalForm-close-btn {
  font-size: 25px;
  position: absolute;
  top: 10px;
  right: 10px;
  transition: 0.5s;
  cursor: pointer;
}

.modalForm-close-btn:hover {
  color: #467932;
}

/* Checkout modal form */
.checkout-modal .checkout-form { width: 100%; }
.checkout-modal .checkout-form-fields {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: left;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}
.checkout-modal .checkout-form-fields label { width: 100%; }
.checkout-modal .checkout-input {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #2d2d2d;
  color: #ddd;
  font: 500 14px Play, Arial, sans-serif;
  box-sizing: border-box;
}
.checkout-modal .checkout-input::placeholder { color: #bfbfbf; }
.checkout-modal .checkout-input:focus {
  outline: 2px solid #467932;
}
.checkout-modal .checkout-submit {
  width: 100%;
  margin-top: 6px;
  background: #467932;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font: 800 14px Play, Arial, sans-serif;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}
.checkout-modal .checkout-submit:hover { background: #3a682a; }
.checkout-modal .checkout-submit:active { transform: translateY(1px); }
.checkout-modal .form-hint {
  color: #9a9a9a;
  font: 500 12px Play, Arial, sans-serif;
  text-align: left;
}
/* End modal window */

.bg-section-contacts {
  background: #1e1e1e;
  padding: 0px 20px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.pc-var {
  padding: 15px 0px;
  margin: 0 auto;
  text-align: center;
}

.welcome-title {
  font-size: 40pt; 
  font-weight: 800; 
  color: #b9e769;
}

.contacts-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin: 0 auto;
  gap: 10px;
  padding-bottom: 20px;
}

.google-map iframe {
  border-radius: 10px; 
  border: 0px;
  width: 100% !important;
} 

.contacts-date {
  padding: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #fff;
  font-weight: 500;
  font-size: 20px;
}

.contacts-list {
  text-align: left;
}

.connection-buttons {
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.store-footer {
  margin-top: 10px;
}

/* ===== Панель управления каталогом ===== */
.catalog-controls {
  background: #242424;
  border: 1px solid #343434;
  border-radius: 10px;
  padding: 14px 16px 10px;
  margin-bottom: 18px;
  font-family: Play, Arial, sans-serif;
}
.catalog-controls .cc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: flex-end;
}
.catalog-controls .cc-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}
.catalog-controls .cc-count {
  margin-left: auto;
  align-self: center;
  color: #ddd;
  font: 800 13px Play, Arial, sans-serif;
  white-space: nowrap;
}
.catalog-controls label { font: 600 12px Play, Arial, sans-serif; color: #b9e769; }
.catalog-controls input[type="text"],
.catalog-controls input[type="number"],
.catalog-controls select {
  background: #2d2d2d;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 10px;
  color: #ddd;
  font: 500 13px Play, Arial, sans-serif;
  min-width: 160px;
}
.catalog-controls input:focus,
.catalog-controls select:focus { outline: 2px solid #467932; outline-offset: 0; }
.catalog-controls .cc-price-range { display: flex; gap: 8px; }
.catalog-controls .cc-price-range input { width: 100px; }
.catalog-controls .cc-check { display:flex; align-items:center; gap:6px; color:#ddd; font:500 13px Play, Arial, sans-serif; cursor:pointer; }
.catalog-controls .cc-check input { accent-color:#467932; }

@media (max-width: 860px) {
  .catalog-controls .cc-row { flex-direction: column; align-items: stretch; }
  .catalog-controls .cc-block { width: 100%; }
  .catalog-controls .cc-price-range { width: 100%; }
  /* Снимаем минимальную ширину у числовых полей, чтобы не выезжали за край */
  .catalog-controls .cc-price-range input { flex:1; min-width: 0; }
  .catalog-controls input[type="text"],
  .catalog-controls input[type="number"],
  .catalog-controls select {min-width: 0; }
  .catalog-controls .cc-count { margin-left: 0; align-self: flex-start; padding-top: 4px; }
}
/* ===== /Панель управления каталогом ===== */

/* ===== Карточки товаров ===== */
.products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.product-card {
  background: #242424;
  border: 1px solid #343434;
  border-radius: 10px;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  font-family: Play, Arial, sans-serif;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:focus-within,
.product-card:hover {
  transform: translateY(-3px);
  border-color: #467932;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.product-card .pc-img-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 8px;
  background: #101010;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-card .pc-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.product-card .pc-name {
  font: 600 14px/1.3 Play, Arial, sans-serif;
  color: #eaeaea;
  min-height: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-card .pc-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.product-card .pc-price {
  font: 700 16px Play, Arial, sans-serif;
  color: #b9e769;
}
.product-card .pc-qty {
  font: 400 11px Play, Arial, sans-serif;
  color: #999;
}
.product-card .pc-actions {
  margin-top: auto;
  display: flex;
}
.product-card .pc-add-btn {
  flex: 1;
  background: #467932;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font: 600 13px Play, Arial, sans-serif;
  transition: background .18s ease;
}
.product-card .pc-add-btn:hover { background: #30561f; }
.product-card .pc-add-btn.remove { background: #963333; }
.product-card .pc-add-btn.remove:hover { background: #b94646; }
/* Состояние "в корзине" для карточек */
.product-card .pc-add-btn.in-cart { background: #4a4b4a; color: #b9e769; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }
.product-card .pc-add-btn.in-cart:hover { background: #2b4a1f; }

/* ===== Характеристики товара ===== */
.product-card .pc-props {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #343434;
}
.product-card .pc-props-title {
  font: 700 14px Play, Arial, sans-serif;
  color: #b9e769;
  margin-bottom: 8px;
}
.product-card .pc-props-list {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 6px 14px;
}
.product-card .pc-prop-row { display: contents; }
.product-card .pc-prop-name { color: #9fbf6b; font: 600 13px Play, Arial, sans-serif; }
.product-card .pc-prop-val { color: #c9c9c9; font: 400 13px Play, Arial, sans-serif; }
.product-card .pc-props-loading { color: #9a9a9a; font: 400 13px Play, Arial, sans-serif; grid-column: 1 / -1; }
.product-card .pc-props-empty { color: #9a9a9a; font: 400 13px Play, Arial, sans-serif; grid-column: 1 / -1; }

@media (max-width: 640px) {
  .product-card .pc-props-list { grid-template-columns: 1fr; }
}
/* ===== /Характеристики товара ===== */

/* Пагинация */
.catalog-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
  justify-content: center;
}
.catalog-pagination button {
  background: #2d2d2d;
  color: #ddd;
  border: 1px solid #444;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font: 600 13px Play, Arial, sans-serif;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.catalog-pagination button:hover { background: #363636; }
.catalog-pagination button[disabled] {
  opacity: .45;
  cursor: default;
}
.catalog-pagination button.active {
  background: #467932;
  color: #fff;
  border-color: #467932;
}

/* Активная категория */
.categories-list li.active {
  background: #b9e769;
  color: #1e1e1e;
  font-weight: 700;
}

@media (max-width: 640px) {
  .product-card .pc-name { font-size: 13px; -webkit-line-clamp: 3; line-clamp: 3; min-height: 54px; }
  .product-card .pc-price { font-size: 15px; }
  .product-card { padding: 10px 10px 12px; }
}
/* ===== /Карточки товаров ===== */

/* ===== Индикатор загрузки ===== */
.catalog-loading {
  position: fixed; /* фиксированный оверлей на весь экран */
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(1px);
  z-index: 2000; /* выше шапки и контента */
}
.catalog-loading.active { display: flex; }
.catalog-loading .loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #1f1f1f;
  border: 1px solid #343434;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.catalog-loading .loading-ring {
  width: 42px;
  height: 42px;
  border: 3px solid #333;
  border-top-color: #b9e769;
  border-radius: 50%;
  animation: ringSpin 1s linear infinite; /* renamed to avoid conflict with --angle keyframes */
}
.catalog-loading .loading-text {
  color: #ddd;
  font: 600 13px Play, Arial, sans-serif;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
/* ===== /Индикатор загрузки ===== */

/* ===== Модальное окно товара ===== */
.product-modal .pm-dialog.popup::after, .product-modal .pm-dialog.popup::before,
.cart-modal .cm-dialog.popup::after, .cart-modal .cm-dialog.popup::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(var(--angle), transparent 30%, #467932);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 2px;
  border-radius: 14px;
  animation: 3s borderSpin linear infinite;
}
.product-modal .pm-dialog.popup::before,
.cart-modal .cm-dialog.popup::before { filter: blur(1.5rem); opacity: .9; }

@property --angle{ syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes borderSpin { from { --angle: 0deg; } to { --angle: 360deg; } }
.product-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(2px);
  z-index: 3000;
  overflow: hidden; /* скрыть прокрутки подложки */
}
.product-modal.active { display: flex; padding: 20px;}
.product-modal .pm-dialog {
  position: relative;
  background: linear-gradient(#2c2c2c, #141414);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  width: min(980px, 92vw);
  max-height: 88vh;
  overflow: visible; /* даем подсветке-псевдоэлементам выходить за края */
  padding: 16px 16px 18px;
  animation: pmIn .18s ease;
}
.product-modal .pm-close,
.product-modal .modal-close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  color: #ddd;
  cursor: pointer;
  font-size: 25px;
  transition: color .3s ease;
}
.product-modal .pm-close:hover,
.product-modal .modal-close-btn:hover { color: #467932; }
.product-modal .pm-body { padding: 8px 2px 0; max-height: calc(88vh - 60px); overflow: auto; }
/* скрываем полосы прокрутки внутри модалки */
.product-modal .pm-body { -ms-overflow-style: none; scrollbar-width: none; }
.product-modal .pm-body::-webkit-scrollbar { width: 0; height: 0; }
.product-modal .pm-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}
.product-modal .pm-left .pc-img-wrap {
  aspect-ratio: 1/1;
  background: #101010;
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-modal .pm-left .pc-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.product-modal .pm-title { margin: 0 0 6px; font: 700 18px Play, Arial, sans-serif; color: #eaeaea; }

/* Общие стили для характеристик в модалке */
.product-modal .pc-props { margin-top: 12px; padding-top: 10px; border-top: 1px solid #343434; }
.product-modal .pc-props-title { font: 700 14px Play, Arial, sans-serif; color: #b9e769; margin-bottom: 8px; }
.product-modal .pc-props-list { display: grid; grid-template-columns: 240px 1fr; gap: 6px 14px; }
.product-modal .pc-prop-row { display: contents; }
.product-modal .pc-prop-name { color: #9fbf6b; font: 600 13px Play, Arial, sans-serif; }
.product-modal .pc-prop-val { color: #c9c9c9; font: 400 13px Play, Arial, sans-serif; }
.product-modal .pc-props-loading, .product-modal .pc-props-empty { color: #9a9a9a; font: 400 13px Play, Arial, sans-serif; grid-column: 1 / -1; }

/* Цена, наличие и кнопка в модалке */
.product-modal .pc-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 0 10px; }
.product-modal .pc-price { font: 800 20px Play, Arial, sans-serif; color: #b9e769; letter-spacing: 0.2px; }
.product-modal .pc-qty { font: 500 12px Play, Arial, sans-serif; color: #a7a7a7; }
.product-modal .pc-actions { margin: 6px 0 8px; display: flex; }
.product-modal .pc-add-btn { flex: 1; background: #467932; color: #fff; border: none; border-radius: 8px; padding: 10px 12px; cursor: pointer; font: 700 14px Play, Arial, sans-serif; transition: background .18s ease, transform .06s ease; }
.product-modal .pc-add-btn:hover { background: #3a682a; }
.product-modal .pc-add-btn:active { transform: translateY(1px); }
/* Состояние "в корзине" для модалки */
.product-modal .pc-add-btn.in-cart { background: #4a4b4a; color: #b9e769; }
.product-modal .pc-add-btn.in-cart:hover { background: #2b4a1f; }

@media (max-width: 860px) {
  .product-modal .pm-grid { grid-template-columns: 1fr; }
  .product-modal .pc-props-list { grid-template-columns: 1fr; }
}
/* ===== /Модальное окно товара ===== */

@keyframes pmIn { from { transform: translateY(6px); opacity: .85; } to { transform: translateY(0); opacity: 1; } }

/* ===== Плавающая кнопка корзины ===== */
.shop-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 3200;
  border-radius: 50%;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  cursor: pointer;
}
.shop-button:hover { background: #242424; }
.shop-button img { width: 65px; height: 65px; display: block; }
.shop-button .shop-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: #b94747; color: #fff; border-radius: 10px;
  font: 700 12px Play, Arial, sans-serif; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

/* ===== Модалка корзины ===== */
.cart-modal { position: fixed; inset:0; display:none; align-items:center; justify-content:center; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); z-index: 3500; }
.cart-modal.active { display:flex; }
.cart-modal .cm-dialog { position:relative; background: linear-gradient(#2c2c2c, #141414); border-radius:14px; width:min(980px, 92vw); max-height: 88vh; overflow:visible; box-shadow: 0 24px 60px rgba(0,0,0,0.65); }
.cart-modal .cm-close,
.cart-modal .modal-close-btn { 
  position:absolute; 
  top:8px; 
  right:10px; 
  color:#ddd; 
  cursor:pointer; 
  font-size:25px; 
  transition: color .3s ease; 
}
.cart-modal .cm-close:hover,
.cart-modal .modal-close-btn:hover { color:#467932; }
.cart-modal .cm-head { padding: 14px 16px 6px; }
.cart-modal .cm-title { margin:0; font: 800 18px Play, Arial, sans-serif; color:#eaeaea; }
.cart-modal .cm-body { padding: 4px 16px 10px; max-height: calc(88vh - 120px); overflow:auto; }
.cart-modal .cm-body { -ms-overflow-style:none; scrollbar-width:none; }
.cart-modal .cm-body::-webkit-scrollbar { width:0; height:0; }
.cart-modal .cm-empty { color:#a9a9a9; padding: 10px 0 18px; }
.cart-modal .cm-item { display:grid; grid-template-columns: 84px 1fr 220px 120px 30px; gap: 12px; align-items:center; padding:10px 0; border-bottom:1px solid #2e2e2e; }
.cart-modal .cm-img { width:84px; height:84px; background:#111; border:1px solid #2c2c2c; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.cart-modal .cm-img img { max-width:100%; max-height:100%; object-fit:contain; display:block; }
.cart-modal .cm-name { color:#eaeaea; font: 600 14px Play, Arial, sans-serif; }
.cart-modal .cm-price { color:#9fbf6b; font: 600 12px Play, Arial, sans-serif; margin-top:4px; }
.cart-modal .cm-qty { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.cart-modal .qbtn { width:28px; height:28px; border:1px solid #444; background:#2b2b2b; color:#ddd; border-radius:6px; cursor:pointer; font-size:16px; line-height:26px; text-align:center; }
.cart-modal .qbtn:hover { background:#333; }
.cart-modal .qinput { width:64px; padding:6px 8px; background:#2d2d2d; border:1px solid #444; border-radius:6px; color:#ddd; font: 600 13px Play, Arial, sans-serif; text-align:center; }
.cart-modal .cm-stock { color:#8a8a8a; font: 500 11px Play, Arial, sans-serif; width:100%; }
.cart-modal .cm-sum { color:#b9e769; font: 800 16px Play, Arial, sans-serif; text-align:right; }
.cart-modal .cm-remove { width:28px; height:28px; border:1px solid #444; background:#2b2b2b; color:#ddd; border-radius:6px; cursor:pointer; font-size:16px; }
.cart-modal .cm-remove:hover { background:#333; }
.cart-modal .cm-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; padding: 10px 16px 14px; border-top:1px solid #2e2e2e; border-radius: 0px 0px 10px 10px; }
.cart-modal .cm-total { color:#eaeaea; font: 800 18px Play, Arial, sans-serif; }
.cart-modal .cm-actions { display:flex; gap:8px; }
.cart-modal .cm-clear { background:#3a3a3a; color:#ddd; border:1px solid #444; border-radius:8px; padding:8px 12px; cursor:pointer; font: 700 13px Play, Arial, sans-serif; }
.cart-modal .cm-clear:hover { background:#454545; }
.cart-modal .cm-checkout { background:#467932; color:#fff; border:none; border-radius:8px; padding:10px 14px; cursor:pointer; font: 800 14px Play, Arial, sans-serif; }
.cart-modal .cm-checkout:hover { background:#3a682a; }
.cm-qty-controls { display:flex; align-items:center; gap:6px; }

@media (max-width: 860px) {
  .cart-modal .cm-item { grid-template-columns: 72px 1fr; grid-auto-rows: auto; }
  .cart-modal .cm-sum { grid-column: 2 / 3; text-align:left; }
  .cart-modal .cm-remove { grid-column: 2 / 3; justify-self: end; }
}

/* Mobile-first polishing for Cart modal */
@media (max-width: 640px) {
  /* Dialog sizing and paddings */
  .cart-modal .cm-dialog { width: 94vw; border-radius: 12px; }
  .cart-modal .cm-head { padding: 12px 14px 4px; }
  .cart-modal .cm-title { font: 800 17px Play, Arial, sans-serif; }

  /* Larger close hit-area and configurator-like hover */
  .cart-modal .cm-close,
  .cart-modal .modal-close-btn { width: 38px; height: 38px; font-size: 26px; top: 8px; right: 8px; }
  .cart-modal .cm-close:hover,
  .cart-modal .modal-close-btn:hover { color: #467932; }

  /* Body height leaves room for sticky footer */
  .cart-modal .cm-body { padding: 6px 12px 10px; max-height: calc(88vh - 160px); }

  /* Each item looks like a compact card */
  .cart-modal .cm-item {
    grid-template-columns: 64px 1fr; gap: 10px 12px;
    padding: 10px 10px 12px; border: 1px solid #2a2a2a; border-radius: 10px; background: #1b1b1b;
    margin: 8px 0; position: relative; /* for absolute remove on mobile */
  }
  .cart-modal .cm-img { width: 64px; height: 64px; border-radius: 8px; }
  .cart-modal .cm-name { font: 600 13px Play, Arial, sans-serif; }
  .cart-modal .cm-price { font: 600 12px Play, Arial, sans-serif; margin-top: 2px; }

  /* Qty row becomes a single horizontal control */
  .cart-modal .cm-qty { grid-column: 2 / 3; gap: 8px; }
  .cart-modal .qbtn { width: 34px; height: 34px; line-height: 32px; font-size: 18px; border-radius: 8px; }
  .cart-modal .qinput { width: 66px; padding: 7px 8px; font: 700 13px Play, Arial, sans-serif; }
  .cart-modal .cm-stock { grid-column: 2 / 3; font-size: 11px; }

  /* Move subtotal to the bottom right of the card */
  .cart-modal .cm-sum { grid-column: 2 / 3; justify-self: end; font: 800 15px Play, Arial, sans-serif; }

  /* Remove button as a floating corner icon within card */
  .cart-modal .cm-remove { position: absolute; top: 8px; right: 8px; grid-column: auto; justify-self: auto; width: 30px; height: 30px; border-radius: 8px; }

  /* Turn off legacy separators */
  .cart-modal .cm-item { border-bottom: 0; }

  /* Sticky footer: always visible actions */
  .cart-modal .cm-footer { position: sticky; bottom: 0; background: linear-gradient(#1c1c1c, #121212); border-top: 1px solid #2e2e2e; padding: 10px 12px 12px; }
  .cart-modal .cm-total { font: 800 17px Play, Arial, sans-serif; }
  .cart-modal .cm-actions { width: 100%; flex-direction: column; gap: 8px; }
  .cart-modal .cm-actions .cm-checkout, .cart-modal .cm-actions .cm-clear { width: 100%; }
}

/* ===== Toasts ===== */
.toast-stack { position: fixed; right: 20px; bottom: 100px; display: flex; flex-direction: column; gap: 8px; z-index: 3600; pointer-events: none; }
.toast { pointer-events: auto; background: #1f1f1f; border: 1px solid #343434; color: #eaeaea; padding: 10px 12px; border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,0.5); animation: toastIn .2s ease; }
.toast.out { animation: toastOut .22s ease forwards; }
@keyframes toastIn { from { transform: translateY(6px); opacity:.0; } to { transform: translateY(0); opacity:1; } }
@keyframes toastOut { to { transform: translateY(6px); opacity: 0; } }

@media screen and (max-width: 750px) {
  /* Расширяем контент на всю ширину телефона, чтобы совпадал с шапкой */
  .store-main { max-width: 100%; margin: 70px 0 0; padding: 12px; }

  .store-header { flex-direction: column; align-items: flex-start; }
  .store-header h1 { font-size: 36pt; }

  /* Современный UX: горизонтальная лента категорий с разворачиванием */
  .store-categories { position: relative; padding: 14px 10px 10px; }
  .categories-list { flex-wrap: nowrap; overflow-x: auto; gap: 10px; justify-content: flex-start; scroll-snap-type: x proximity; -ms-overflow-style: none; scrollbar-width: none; }
  .categories-list::-webkit-scrollbar { display: none; }
  .categories-list li { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
  .store-categories::before, .store-categories::after { content: ""; position: absolute; top: 0; bottom: 0; width: 24px; pointer-events: none; z-index: 1; }
  .store-categories::before { left: 0; background: linear-gradient(90deg, #1e1e1e, transparent); border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
  .store-categories::after  { right: 0; background: linear-gradient(270deg, #1e1e1e, transparent); border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
  .categories-toggle { margin-top: 8px; display: flex; justify-content: center; }
  .categories-toggle #catToggleBtn { background:#2b2b2b; color:#eaeaea; border:1px solid #444; border-radius:8px; padding:8px 12px; font:700 13px Play, Arial, sans-serif; }
  .categories-toggle #catToggleBtn:hover { background:#333; }
  .store-categories.expanded .categories-list { overflow: visible; flex-wrap: wrap; row-gap: 10px; column-gap: 10px; }
  .store-categories.expanded::before, .store-categories.expanded::after { display: none; }

  .contacts-table { grid-template-columns: 1fr; }
}