/* ==========================================================================
   Страница объявления (templates/product.tpl)
   Подключается из templates/_main.tpl только при $G.page == 'product'
   ========================================================================== */

/* ===== Статистика (график Chart.js) ===== */
.stats-chart-block,
.stats-chart-wrap {
  width: 100%;
  min-width: 0; 
}

.stats-chart-wrap {
  position: relative;
  height: 280px;
}

/* ========================================================================== */

.online-dot {
  color: #348cc7;
  font-size: .8rem;
  margin: 0 5px;
  flex-shrink: 0;
}

/* ===== Галерея ===== */
.product-gallery-v2 {
  position: relative;
}

.product-thumbs-vertical {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 60px;
}

.product-thumb-item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
}

.product-thumb-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  display: block;
  transition: border-color .2s;
}

.product-thumb-item:hover img,
.product-thumb-item.active img {
  border-color: #007AFF;
}

.product-main-photo {
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  border: 1px solid #e8edf5;
}

.product-main-photo img {
  width: 100%;
  max-height: 420px;
  /* object-fit: contain; */
  object-fit: cover;
  display: block;
}

@media (max-width: 767px) {
  .product-main-photo {
    border-radius: 0;
    margin: 0 -17px;
  }

  .product-main-photo img {
    max-height: 320px;
  }
}

/* ===== Верхние действия ===== */
.product-top-actions .btn-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e1e1e1;
  background: #fff;
}

.product-stat {
  display: inline-flex;
  align-items: center;
  font-size: .8rem;
  color: #6a6a6a;
  background: #f5f5f5;
  padding: 3px 8px;
  border-radius: 8px;
}

/* ===== Карточка продавца ===== */
.product-seller-mini {
  /* border: 1px solid #e8edf5; */
  background: #fff;
}

.ws-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  line-height: 1.2;
  margin: 0;
}

.ws-status-badge--open {
  background: #e8f5e9;
  color: #2e7d32;
}

.ws-status-badge--closed {
  background: #ffebee;
  color: #c62828;
}

.ws-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.ws-status-dot--open {
  background: #4caf50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.25);
  animation: ws-pulse 2s ease-in-out infinite;
}

.ws-status-dot--closed {
  background: #ef5350;
}

@keyframes ws-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.25);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(76, 175, 80, 0.10);
  }
}

/* ===== Вкладки ===== */
.tabs .nav-bar-item {
  font-size: .88rem;
  padding: .5rem .8rem;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .tabs .nav-bar-item {
    font-size: .8rem;
    padding: .5rem .5rem;
  }
}

.vote-card {
  border: none;
  border-radius: 8px;
  box-shadow: 0px 0px 10px 0px #e9ecef;
  padding: 1rem;
  margin-bottom: .5rem;
}

.vote-user .vote-best{border-left: 2px #58c358 solid;padding-left:1rem;}
.vote-user .vote-nice{border-left: 2px #f0ad4e solid;padding-left:1rem;}
.vote-user .vote-bad{border-left: 2px #ff3b30 solid;padding-left:1rem;}
.vote-provider {
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border-radius: 8px;
}

/* ===== Кнопки количества ===== */
.quantity_inner .bt_minus,
.quantity_inner .bt_plus,
.quantity_inner_withoutqnt .bt_minus,
.quantity_inner_withoutqnt .bt_plus {
  height: 35px;
  width: 35px;
  font-size: 1rem;
  padding: 0;
  border: 0;
  margin: 0;
  background: hsla(230, 13%, 9%, 0.02);
  border-radius: 8px;
  cursor: pointer;
  outline: 0;
  box-shadow: inset 0 0 0.5px 1px hsla(0, 0%, 100%, 0.1), 0 0 0 1px hsla(230, 13%, 9%, 0.075), 0 0.3px 0.4px hsla(230, 13%, 9%, 0.02), 0 0.9px 1.5px hsla(230, 13%, 9%, 0.045), 0 3.5px 6px hsla(230, 13%, 9%, 0.09);
}

.quantity_inner .quantity,
.quantity_inner_withoutqnt .quantity {
  height: 32px;
  width: 50px;
  padding: 0px 5px;
  font-size: 1rem;
  color: #333;
  background: transparent;
  border: none;
  text-align: center;
}

/* ===== Сворачиваемое описание ===== */
.descr-collapsible {
  position: relative;
  overflow: hidden;
  max-height: 200px;
  transition: max-height .3s ease;
}

.descr-collapsible.expanded {
  max-height: 9999px;
}

.descr-collapsible:not(.expanded)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
  pointer-events: none;
}

/* ===== Категории продавца ===== */
.company-cats-wrap { 
  position: relative;
  width: 100%;
}

.company-cats-scroller {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.company-cats-scroller::-webkit-scrollbar {
  display: none;
}

.company-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  padding: 0;
}

.company-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 14px 10px 12px;
  border-radius: 16px;
  text-decoration: none;
  background: #ffffff;
  transition: all 0.2s ease;
}

.company-cat-item:hover {
  background: #f8fafc;
}

.company-cat-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 12px;
}

.company-cat-item__img {
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
  border-radius: 8px;
}

.company-cat-item:hover .company-cat-item__img {
  transform: scale(1.05);
}

.company-cat-item__name {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: #334155;
  line-height: 1.3;
  text-align: center;
  /* white-space: nowrap; */
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 0.15s ease;
}

.company-cat-item:hover .company-cat-item__name {
  color: #2563eb;
}

/* Точечный навигатор */
.company-cats-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding: 4px 0;
}

.company-cats-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2e8f0;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.company-cats-dot:hover {
  background: #cbd5e1;
  transform: scale(1.1);
}

.company-cats-dot.active {
  background: #2563eb;
  width: 24px;
  border-radius: 4px;
}

/* Мобильные: сетка без скролла */
@media (max-width: 767px) {
  .company-cats-wrap {
    padding: 12px 0;
  }

  .company-cats-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 8px;
  }

  .company-cat-item {
    min-width: 76px;
    padding: 12px 8px 10px;
    border-radius: 14px;
  }

  .company-cat-item__icon {
    margin-bottom: 8px;
    border-radius: 10px;
  }

  .company-cat-item__img {
    width: 48px;
    height: 48px;
  }

  .company-cat-item__name {
    font-size: 0.7rem;
  }

  .company-cats-dots {
    display: none;
    /* Скрываем точки на мобильных */
  }
}

/* Десктоп: скролл с точками */
@media (min-width: 768px) {
  .company-cats-scroller {
    overflow-x: auto;
    cursor: grab;
    user-select: none;
  }

  .company-cats-scroller:active {
    cursor: grabbing;
  }

  .company-cats-scroller::-webkit-scrollbar {
    display: block;
    height: 6px;
  }

  .company-cats-scroller::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
  }

  .company-cats-grid {
    display: flex;
    /* align-items: start; */
    flex-wrap: nowrap;
    gap: 0;
    /* width: max-content; */
    padding: 10px 0;
  }

  .company-cat-item {
    min-width: 100px;
    padding: 16px 8px 14px;
  }

  .company-cat-item__img {
    width: 42px;
    height: 50px;
  }

  .company-cat-item__name {
    font-size: 0.8125rem;
  }

  .company-cats-wrap::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 2;
  }

  .company-cats-wrap-v2 .company-cats-scroller {
    overflow-x: visible;
    cursor: default;
    user-select: auto;
    -webkit-overflow-scrolling: auto;
  }

  .company-cats-wrap-v2 .company-cats-scroller::-webkit-scrollbar {
    display: none;
  }

  .company-cats-wrap-v2 .company-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    padding: 0;
    flex-wrap: wrap;
  }

  .company-cats-wrap-v2 .company-cat-item-v2 {
    min-width: auto;
    padding: 16px 10px 14px;
  }

  /* Скрываем точечный навигатор — скролла больше нет */
  .company-cats-wrap-v2 .company-cats-dots {
    display: none !important;
  }

  /* Убираем градиент-затемнение справа, если вдруг осталось от старых стилей */
  .company-cats-wrap-v2::after {
    display: none;
  }
}

/* ===== Light Glassmorphism Атрибуты товара ===== */
.attr-group {
  /* margin-top: 1.25rem; */
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: attrFadeIn 0.4s ease-out forwards;
}

@keyframes attrFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.attr-legend {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.attr-legend::before {
  content: '';
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #007AFF, #5AC8FA);
  border-radius: 4px;
}

.attr-options {
  display: flex;
  flex-wrap: wrap;
  /* gap: 0.625rem; */
  gap: 0.2rem;
}

.attr-option {
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}

.attr-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.attr-option-label {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: #ffffff;
  border: 1.5px solid #e8ecf1;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4a5568;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}

.attr-option-label .attr-price {
  font-weight: 600;
  color: #007AFF;
  font-size: 0.8rem;
  margin-left: 0.25rem;
}

/* Hover */
.attr-option:hover .attr-option-label {
  background: #ffffff;
  border-color: #007AFF;
  color: #1a1a2e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.10),
    0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Active/Checked */
.attr-option input:checked+.attr-option-label {
  background: linear-gradient(135deg, #f0f7ff, #e6f2ff);
  border-color: #007AFF;
  color: #1a1a2e;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

/* Галочка */
.attr-option input:checked+.attr-option-label::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 15px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #007AFF, #5AC8FA);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.35);
  animation: attrCheckPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes attrCheckPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  70% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Мягкое внутреннее свечение при выборе */
.attr-option input:checked+.attr-option-label::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 122, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Checkbox — зелёный акцент */
.attr-option.checkbox input:checked+.attr-option-label {
  background: linear-gradient(135deg, #f0fff4, #e6ffed);
  border-color: #34C759;
}

.attr-option.checkbox input:checked+.attr-option-label::after {
  background: linear-gradient(135deg, #34C759, #30D158);
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.35);
}

.attr-option.checkbox .attr-option-label .attr-price {
  color: #34C759;
}

/* Адаптив */
@media (max-width: 767px) {
  .attr-group {
    padding: 1rem;
    border-radius: 14px;
  }

  .attr-option-label {
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
  }

  .attr-options {
    gap: 0.5rem;
  }
}

/* ===== Панель комплектации (product-parts-panel) ===== */
.product-parts-panel {
  background: rgb(251 255 222 / 75%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 1.25rem;
  margin-bottom: 1rem;
  animation: attrFadeIn 0.4s ease-out forwards;
}

.parts-legend {
  font-size: 0.85rem;
  color: #6b7b90;
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

.parts-legend i {
  font-size: 0.8rem;
}

.parts-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.part-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.75rem;
  position: relative;
  max-width: 100%;
}

.part-badge:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 122, 255, 0.25);
  box-shadow: 0 2px 12px rgba(0, 122, 255, 0.1);
  transform: translateY(-1px);
}

.part-badge i:first-child {
  font-size: 0.85rem;
  color: #007AFF;
  flex-shrink: 0;
}

.part-badge-label {
  color: #888;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.part-badge-price {
  font-weight: 500;
  font-size: 0.8rem;
  white-space: nowrap;
}

.part-badge-price s {
  color: #999;
  font-weight: 400;
  font-size: 0.6rem;
  text-decoration: line-through;
}

.part-badge-value {
  font-size: 0.85rem;
  /* max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; */
}

.part-badge-edit {
  font-size: 0.6rem !important;
  color: #007AFF !important;
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-left: 0.15rem;
  flex-shrink: 0;
}

.part-badge:hover .part-badge-edit {
  opacity: 1;
}

/* Стили для модалки атрибутов */
.attr-modal-content {
  text-align: left;
  padding: 0.5rem 0;
}

.attr-modal-content .attr-group {
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  padding: 0;
  animation: none;
  margin: 0;
}

.attr-modal-content .attr-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.attr-modal-content .attr-option {
  width: 100%;
}

.attr-modal-content .attr-option-label {
  width: 100%;
  justify-content: space-between;
}

.attr-modal-footer {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.attr-modal-footer .glass-btn {
  flex: 1;
}

.remodal.attr-modal {
  max-width: 420px;
  padding: 1.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
}

.remodal.attr-modal .remodal-close {
  top: 0.75rem;
  right: 0.75rem;
}

.attr-modal-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.attr-modal-title i {
  color: #007AFF;
  margin-right: 0.4rem;
}

/* ===== Модалка карточки корзины (cart-item-modal) ===== */
.cart-item-modal .cart-item-unit-price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.25rem;
  font-size: 0.85rem;
}
.cart-item-modal .cart-item-unit-price .unit-price-old {
  text-decoration: line-through;
  color: #999;
  font-size: 0.75rem;
}
.cart-item-modal .cart-item-unit-price .unit-price-current {
  font-weight: 700;
  color: #1a1a1a;
}
.cart-item-modal .cart-item-attr-list {
  margin: 0.75rem 0;
}
.cart-item-modal .cart-item-attr-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  font-size: 0.85rem;
}
.cart-item-modal .cart-item-attr-row i {
  color: #007AFF;
  font-size: 0.9rem;
  width: 1.2rem;
  text-align: center;
  flex-shrink: 0;
}
.cart-item-modal .cart-item-attr-row .attr-label {
  color: #888;
  min-width: 80px;
  flex-shrink: 0;
}
.cart-item-modal .cart-item-attr-row .attr-value {
  font-weight: 600;
  color: #1a1a1a;
}
.cart-item-modal .cart-item-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 1rem;
}
.cart-item-modal .cart-item-total .total-label {
  color: #888;
}
.cart-item-modal .cart-item-total .total-value {
  font-weight: 700;
  font-size: 1.15rem;
  color: #1a1a1a;
}
.cart-item-modal .cart-item-prices {
  padding: 0.5rem 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 0.5rem;
}
.cart-item-modal .cart-item-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0;
  font-size: 0.85rem;
}
.cart-item-modal .cart-item-price-row .price-label {
  color: #888;
}
.cart-item-modal .cart-item-price-row .price-old {
  text-decoration: line-through;
  color: #999;
}
.cart-item-modal .cart-item-price-row .price-discount {
  color: #FF3B30;
  font-weight: 600;
}
.cart-item-modal .cart-item-price-row .price-unit-total {
  font-weight: 600;
  color: #1a1a1a;
}
.cart-item-modal .cart-item-price-row.cart-item-total {
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 0.3rem;
  padding-top: 0.5rem;
}
.cart-item-modal .cart-item-price-row .price-total {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a1a1a;
}
.cart-item-modal .cart-item-attr-row .attr-price {
  margin-left: auto;
  color: #34C759;
  font-weight: 600;
  font-size: 0.8rem;
}
.cart-item-modal .cart-item-qty {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.85rem;
}
.cart-item-modal .cart-item-qty .qty-label {
  color: #888;
}
.cart-item-modal .cart-item-qty .qty-value {
  font-weight: 600;
  min-width: 2rem;
  text-align: center;
}
.cart-item-modal .cart-item-qty .qty-control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.cart-item-modal .cart-item-qty .qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}
.cart-item-modal .cart-item-qty .qty-btn:hover {
  background: rgba(0,0,0,0.07);
}
.cart-item-modal .cart-item-qty .qty-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.cart-item-modal .cart-item-qty .qty-btn i {
  font-size: 0.8rem;
}
.cart-item-modal .cart-item-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.cart-item-modal .cart-item-actions .glass-btn {
  flex: 1;
}
.cart-item-modal .cart-item-actions .glass-btn-danger {
  background: rgba(255, 59, 48, 0.1);
  color: #FF3B30;
  border-color: rgba(255, 59, 48, 0.2);
}
.cart-item-modal .cart-item-actions .glass-btn-danger:hover {
  background: rgba(255, 59, 48, 0.2);
  border-color: rgba(255, 59, 48, 0.3);
}
.cart-item-modal .cart-item-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  margin-right: 0.75rem;
  flex-shrink: 0;
}
.cart-item-modal .cart-item-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

/* ===== Light Glassmorphism: Правая колонка ===== */
.glass-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 1.25rem;
  margin-bottom: 1rem;
  animation: attrFadeIn 0.4s ease-out forwards;
}

.glass-panel:hover{
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transform: translateY(0px);
}

.company-cats-wrap-v2:hover{
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transform: translateY(0px);
}

.price-glass-wrap:hover{
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transform: translateY(0px);
}

.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.glass-btn-primary {
  background: linear-gradient(135deg, #007AFF, #5AC8FA);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.25);
}

.glass-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 122, 255, 0.35);
  color: #fff;
}

.glass-btn-success {
  background: linear-gradient(135deg, #34C759, #30D158);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(52, 199, 89, 0.25);
}

.glass-btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(52, 199, 89, 0.35);
  color: #fff !important;
}

.glass-btn-ghost {
  background: #fff;
  color: #007AFF;
  border: 1.5px solid #e8ecf1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.glass-btn-ghost:hover {
  border-color: #007AFF;
  color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.08);
}

/* Панель количества */
.glass-qty-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #fff;
  /* border: 1.5px solid #e8ecf1; */
  border-radius: 12px;
  /* padding: 0.35rem 0.5rem; */
  /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); */
}

.glass-qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: #f5f7fa;
  color: #1a1a2e;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.glass-qty-btn:hover {
  background: #e8ecf1;
}

.glass-qty-input {
  width: 46px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 600;
  color: #1a1a2e;
  font-size: 0.95rem;
  -moz-appearance: textfield;
  flex-shrink: 0;
}

.glass-qty-input::-webkit-outer-spin-button,
.glass-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Связаться с продавцом */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.875rem;
  background: #fff;
  border: 1.5px solid #e8ecf1;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #4a5568;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  cursor: pointer;
}

.contact-link:hover {
  border-color: #007AFF;
  color: #007AFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.08);
}

/* Карточка продавца */
.seller-glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.seller-glass:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transform: translateY(0px);
}

.seller-glass:hover a {
  color: #007AFF;
}

.seller-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.seller-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.seller-avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5f7fa, #e8ecf1);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.seller-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
  transition: color 0.2s;
}

.seller-name:hover {
  color: #007AFF;
}

.seller-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: #f5f7fa;
  border-radius: 8px;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.ws-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.ws-badge--open {
  background: rgba(52, 199, 89, 0.08);
  color: #34C759;
  border-color: rgba(52, 199, 89, 0.15);
}

.ws-badge--closed {
  background: rgba(255, 59, 48, 0.06);
  color: #ff3b30;
  border-color: rgba(255, 59, 48, 0.12);
}

.ws-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.ws-dot--open {
  background: #34C759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.2);
  animation: wsPulseLight 2s ease-in-out infinite;
}

.ws-dot--closed {
  background: #ff3b30;
}

@keyframes wsPulseLight {

  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.2);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(52, 199, 89, 0.08);
  }
}

/* Категории продавца v2 */
.company-cats-wrap-v2 {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.company-cat-item-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 14px 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.company-cat-item-v2:hover {
  background: #ffffff;
  border-color: #007AFF;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.10);
}

.company-cat-item-v2:hover .company-cat-item__name {
  color: #007AFF;
}

/* Категории продавца (текстовые ссылки внутри карточки продавца) */
.seller-cats {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.seller-cats__title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.45rem;
}

.seller-cats__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
}

.seller-cats__link {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.07);
  color: #007AFF;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition: all 0.2s ease;
}

.seller-cats__link:hover {
  background: #007AFF;
  color: #fff;
  text-decoration: none;
}

.seller-cats__link--all {
  background: rgba(0, 0, 0, 0.05);
  color: #64748b;
}

.seller-cats__link--all:hover {
  background: #1a1a2e;
  color: #fff;
}

.seller-glass:hover a.seller-cats__link:not(:hover) {
  color: #007AFF;
}

.seller-glass:hover .seller-cats__link:hover {
  color: #fff;
}

/* Условия продавца внутри карточки продавца */
.seller-conditions {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.seller-conditions__title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.seller-conditions__list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.seller-conditions__row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #4a5568;
}

.seller-conditions__row i {
  color: #007AFF;
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.seller-conditions__row strong {
  font-weight: 600;
  color: #1a1a2e;
}

.seller-conditions__collapse {
  margin-top: 0.6rem;
}

.seller-conditions__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 10px;
  background: rgba(0, 122, 255, 0.06);
  color: #007AFF;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.seller-conditions__toggle:hover {
  background: #007AFF;
  color: #fff;
}

.seller-conditions__toggle i {
  font-size: 0.9rem;
}

.seller-conditions__arrow {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.seller-conditions__toggle.open .seller-conditions__arrow {
  transform: rotate(180deg);
}

.seller-conditions__body {
  margin-top: 0.6rem;
  padding: 0.7rem 0.8rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #4a5568;
}

.seller-conditions__body[hidden] {
  display: none;
}

.seller-conditions__subtitle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.seller-conditions__subtitle:not(:first-child) {
  margin-top: 0.75rem;
}

.seller-conditions__subtitle i {
  color: #007AFF;
}

.seller-conditions__tks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.seller-conditions__tk {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 122, 255, 0.08);
  color: #007AFF;
  font-size: 0.75rem;
  font-weight: 500;
}

.seller-conditions__text {
  line-height: 1.5;
}

.seller-conditions__text p {
  margin-bottom: 0.5rem;
}

.seller-conditions__text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {

  .glass-panel,
  .seller-glass,
  .company-cats-wrap-v2 {
    padding: 1rem;
  }

  .glass-btn {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }
}

/* ===== Light Glassmorphism: Галерея ===== */
/* .gallery-glass {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 1rem;
  } */

.product-thumbs-vertical {
  gap: 10px;
  width: 64px;
}

.product-thumb-item {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  padding: 2px;
}

.product-thumb-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  border: none !important;
  display: block;
}

.product-thumb-item:hover,
.product-thumb-item.active {
  border-color: #007AFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.12);
}

/* Мобильные миниатюры */
.d-md-none .product-thumb-item {
  min-width: 72px;
  padding: 2px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid #f1f5f9;
}

.d-md-none .product-thumb-item img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: none !important;
}

.d-md-none .product-thumb-item.active {
  border-color: #007AFF;
}

/* ===== Заголовок ===== */
.product-caption {
  font-size: 1.6rem;
  font-weight: 500;
  color: #1a1a2e;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.product-top-actions .btn-action {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  /* border: 1px solid rgba(0, 0, 0, 0.06); */
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); */
  color: #4a5568;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.product-top-actions .btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: #007AFF;
  border-color: rgba(0, 122, 255, 0.2);
}

/* ===== Статистика ===== */
.product-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  background: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s;
  cursor: pointer;
}

.product-stat i {
  font-size: 0.85rem;
}

.product-stat:hover {
  border-color: #e2e8f0;
  transform: translateY(-1px);
}

.product-stat:hover i {
  color: #007AFF;
}

/* ===== Цена и наличие ===== */
.price-glass-wrap {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.price-glass-wrap-mobile {
  margin-bottom: 1rem;
}



.price-glass {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.02em;
  line-height: 1;
}

.priceold-glass {
  font-size: 1.1rem;
  color: #94a3b8;
  font-weight: 500;
}

.discount-badge-glass {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  background: linear-gradient(135deg, #ff3b30, #ff6b6b);
  color: #fff;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
}

.availability-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
  margin-top: 0.5rem;
}

.availability-glass--stock {
  background: rgba(52, 199, 89, 0.08);
  color: #34C759;
  border-color: rgba(52, 199, 89, 0.15);
}

.availability-glass--order {
  background: rgba(0, 122, 255, 0.08);
  color: #007AFF;
  border-color: rgba(0, 122, 255, 0.15);
}

.availability-glass--out {
  background: rgba(255, 59, 48, 0.06);
  color: #ff3b30;
  border-color: rgba(255, 59, 48, 0.12);
}

.availability-glass--limited {
  background: rgba(175, 82, 222, 0.06);
  color: #af52de;
  border-color: rgba(175, 82, 222, 0.15);
}

/* ===== Инфо-ряды ===== */
.info-glass-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #4a5568;
}

.info-glass-row .info-label {
  font-weight: 600;
  color: #1a1a2e;
  min-width: 80px;
  flex-shrink: 0;
}

.info-glass-row .info-value {
  flex: 1;
}

.info-glass-row .a-u {
  color: #007AFF;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed rgba(0, 122, 255, 0.3);
}

.info-glass-row .a-u:hover {
  border-bottom-style: solid;
}

.product-payments,
.product-delivery {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  margin-right: 0.35rem;
  margin-bottom: 0.25rem;
}

/* ===== Вкладки Glass ===== */
.tabs-glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  /* border-radius: 16px; */
  /* border: 1px solid rgba(0, 0, 0, 0.06); */
  /* box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9); */
  /* padding: 1.25rem; */
  margin-top: 1rem;
}

.tabs-glass .nav-bar {
  display: inline-flex;
  gap: 0.25rem;
  /* background: #f8fafc; */
  /* padding: 0.35rem; */
  /* border-radius: 12px; */
  /* border: 1px solid #f1f5f9; */
  border: 0;
  margin-bottom: .5rem;
  overflow-x: auto;
  max-width: 100%;
}

.tabs-glass .nav-bar-item {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  border: none;
  background: transparent;
  position: relative;
}

.tabs-glass .nav-bar-item:hover {
  color: #1a1a2e;
  background: rgba(255, 255, 255, 0.6);
}

.tabs-glass .nav-bar-item.active {
  background: #ffffff;
  color: #007AFF;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); */
}

/* Отзывы */
.vote-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.vote-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.vote-provider {
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 1px solid #f1f5f9;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

/* Условия */
.conditions-glass {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.25rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.conditions-glass h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.conditions-glass h3::before {
  content: '';
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #007AFF, #5AC8FA);
  border-radius: 4px;
}

@media (max-width: 767px) {
  .gallery-glass {
    /* padding: 0.75rem; */
    border-radius: 16px;
  }

  .product-caption {
    font-size: 1.2rem;
  }

  .product-top-actions .btn-action {
    width: 35px;
    height: 33px;
  }

  .price-glass {
    font-size: 1.6rem;
  }

  .tabs-glass {
    padding: 0;
  }

  .tabs-glass .nav-bar-item {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  /* .conditions-glass{
    padding: 0;
    border: 0;
    box-shadow: none;
  } */
}

/* мобильные кнопки действий */

.mobile-glass-tapbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
  padding: 0.75rem;
  align-items: stretch;
}

.glass-btn-m {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  border: 1px solid transparent;
  padding: 0.5rem 0.75rem;
  transition: transform .1s ease, box-shadow .2s ease;
  text-decoration: none;
  cursor: pointer;
  gap: 6px;
}

.glass-btn-m:active {
  transform: scale(0.97);
}

.glass-btn-primary-m {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.92), rgba(37, 99, 235, 0.92));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.glass-btn-success-m {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.92), rgba(22, 163, 74, 0.92));
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.22);
}

.glass-btn-ghost-m {
  background: rgba(255, 255, 255, 0.55);
  color: #9e9e9e;
  /* border-color: rgba(37, 99, 235, 0.18); */
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); */
  font-size: .8rem;
}

.glass-btn-outline-m {
  background: rgba(255, 255, 255, 0.5);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.glass-btn-info-m {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
  border-color: rgba(14, 165, 233, 0.2);
}

.glass-qty-m {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  background: rgba(241, 245, 249, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: 14px;
  padding: 0.35rem;
  min-height: 48px;
  backdrop-filter: blur(4px);
}

.glass-qty-btn-m {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #334155;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  padding-bottom: 2px;
}

.glass-qty-input-m {
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 700;
  color: #0f172a;
  font-size: 1rem;
  width: 44px;
  padding: 0;
  -moz-appearance: textfield;
  flex-shrink: 0;
}

.glass-qty-input-m::-webkit-outer-spin-button,
.glass-qty-input-m::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.glass-cart-icon-m {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
  text-decoration: none;
}

.glass-alert-m {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 12px;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.glass-hint-m {
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 12px;
  padding: 0.5rem;
  font-size: 0.8rem;
  text-align: center;
  margin-top: 0.5rem;
}

.glass-disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.4);
}

/* ===== Бейдж скидки поверх фото ===== */

.discount-badge-photo {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, #ff3b30, #ff6b6b);
  color: #fff;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.35);
  z-index: 10;
  animation: discountBadgePop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes discountBadgePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  70% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .discount-badge-photo {
    top: 8px;
    right: 8px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* ===== Sticky Product Header - Light Glassmorphism ===== */
.sticky-product-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  visibility: hidden;
}

.sticky-product-header.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.sticky-product-header__inner {
  max-width: 98%;
  margin: 0 auto;
  padding: 0.25rem 3rem 0.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Миниатюра */
.sticky-product-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease;
}

.sticky-product-thumb:hover {
  transform: scale(1.05);
}

.sticky-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Информация */
.sticky-product-info {
  flex: 1;
  min-width: 0;
}

.sticky-product-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
  transition: color 0.2s ease;
}

.sticky-product-title:hover {
  color: #007AFF;
}

.sticky-product-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sticky-price-current {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
}

.sticky-price-old {
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: line-through;
}

/* Кнопки */
.sticky-product-actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
}

.sticky-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.sticky-btn i {
  font-size: 1rem;
}

.sticky-btn-primary {
  background: linear-gradient(135deg, #007AFF, #5AC8FA);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}

.sticky-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.35);
  color: #fff;
}

.sticky-btn-success {
  background: linear-gradient(135deg, #34C759, #30D158);
  color: #fff;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.25);
}

.sticky-btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 199, 89, 0.35);
  color: #fff;
}

.sticky-btn-ghost {
  background: #fff;
  color: #007AFF;
  border: 1.5px solid #e8ecf1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sticky-btn-ghost:hover {
  border-color: #007AFF;
  color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.08);
}

/* Мобильные */
@media (max-width: 767px) {
  .sticky-product-header__inner {
    padding: 0.6rem 0.75rem;
    gap: 0.75rem;
  }

  .sticky-product-thumb {
    width: 48px;
    height: 48px;
  }

  .sticky-product-title {
    font-size: 0.8rem;
  }

  .sticky-price-current {
    font-size: 0.95rem;
  }

  .sticky-product-actions {
    gap: 0.35rem;
  }

  .sticky-btn {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
    min-width: 44px;
  }

  .sticky-btn span {
    display: none;
  }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
  .sticky-product-thumb {
    width: 44px;
    height: 44px;
  }

  .sticky-product-title {
    font-size: 0.75rem;
  }

  .sticky-btn {
    padding: 0.45rem 0.5rem;
    font-size: 0.7rem;
  }
}

.product-seller-reply {
  margin-top: 8px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 6px;
}

.product-seller-reply__toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: #64748b;
  cursor: pointer;
  font-weight: 600;
  transition: color 0.15s;
}

.product-seller-reply__toggle:hover {
  color: #007AFF;
}

.product-seller-reply__arrow {
  font-size: 0.65rem;
  transition: transform 0.2s;
}

.product-seller-reply__body {
  display: none;
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(0,122,255,0.04);
  border: 1px solid rgba(0,122,255,0.08);
  border-radius: 8px;
}

.product-seller-reply__body--open {
  display: block;
  animation: prodSellerReplyFadeIn 0.2s ease-out;
}

@keyframes prodSellerReplyFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-seller-reply__head { 
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.product-seller-reply__label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
}

.product-seller-reply__stars { 
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.product-seller-reply__val {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-left: 3px;
}

.product-seller-reply__comment {
  font-size: 0.8rem;
  color: #4a5568;
  line-height: 1.5;
  margin-top: 4px;
}

.product-seller-reply__date {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* ==========================================================================
   Сворачиваемый блок «Статистика объявления» (только владелец / модератор)
   ========================================================================== */
.stats-collapse {
  width: 100%;
  align-self: stretch;
  margin-left: 0;
  margin-right: 0;
}

.stats-collapse__body {
  padding-top: 0.85rem;
  width: 100%;
  min-width: 0;
}

.stats-collapse__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* width: 100%; */
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.stats-collapse__toggle:hover {
  border-color: rgba(0, 122, 255, 0.25);
  color: #007AFF;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.08);
}

.stats-collapse__toggle:focus {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.25);
}

.stats-collapse__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-collapse__hint {
  font-weight: 500;
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
}

.stats-collapse__arrow {
  font-size: 0.8rem;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.stats-collapse__toggle[aria-expanded="true"] .stats-collapse__arrow {
  transform: rotate(180deg);
}

.stats-collapse__body[hidden] {
  display: none;
}

/* Позиции на сайте / в категории */
.position-info {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
}

.position-info__row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.4;
  color: #4a5568;
}

.position-info__row + .position-info__row {
  margin-top: 0.3rem;
}

.position-info__row i {
  color: #94a3b8;
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1.4;
}

@media (max-width: 767px) {
  .stats-collapse__toggle {
    font-size: 0.8rem;
    padding: 0.55rem 0.75rem;
  }

  .stats-collapse__hint {
    display: none;
  }
}

/* Product tags (clickable keywords) */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.product-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.product-tag:hover {
  background: #ebf4ff;
  border-color: #1a6fb5;
  color: #1a6fb5;
  text-decoration: none;
}

/* ===== Навигация между объявлениями по ID ===== */
.product-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.85rem;
  line-height: 1.2;
}

.product-nav__link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 48%;
  min-width: 0;
  color: #6c757d;
  text-decoration: none;
  transition: color 0.15s ease;
}

.product-nav__link--next {
  text-align: right;
}

.product-nav__link:hover {
  color: #1a6fb5;
  text-decoration: none;
}

.product-nav__link i {
  flex-shrink: 0;
  font-size: 1rem;
}

.product-nav__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-nav__label {
  color: #adb5bd;
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.product-nav__title {
  color: inherit;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
