:root {
  /* ===== ЕДИНЫЙ ЦВЕТОВОЙ СТИЛЬ — СВЕТЛАЯ МОЛОЧНАЯ ВЕРСИЯ ===== */
  --accent: #4ecdc4;
  --accent-hover: #3aa8a0;
  --accent-gradient: linear-gradient(135deg, #4ecdc4, #66d9cc);
  /* Фоны */
  --primary-bg: #faf9f6;
  --card-bg: rgba(250, 248, 242, 0.85);
  --sidebar-bg: #fdfcf9;
  /* Текст */
  --text-primary: #2d2d2d;
  --text-secondary: #5a5a5a;
  --text-muted: #999;
  /* Границы и тени */
  --border: rgba(0, 0, 0, 0.06);
  --hover-bg: rgba(78, 205, 196, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 40px rgba(78, 205, 196, 0.12);
  /* Радиусы */
  --border-radius: 16px;
  --border-radius-sm: 10px;
  --border-radius-lg: 20px;
  /* Анимации */
  --transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-slow: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* === КАТАЛОГ — светлая молочная тема === */
.catalog-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === BREADCRUMBS === */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

/* === PAGE HEADER === */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* === GLOBAL SEARCH === */
.global-search {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.search-box {
  position: relative;
  max-width: 500px;
  margin: 0 auto 20px;
}

.search-box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
  background: white;
}

.quick-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-filter {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.quick-filter.active,
.quick-filter:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* === CATEGORY SECTION === */
.catalog-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.category-section {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 30px;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.category-section:hover {
  border-color: rgba(78, 205, 196, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* === CATEGORY HEADER === */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
}

.category-info {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.category-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  background: var(--accent-gradient);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.category-text {
  flex: 1;
}

.category-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.category-description {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.category-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(78, 205, 196, 0.12);
  border: 1px solid rgba(78, 205, 196, 0.3);
  border-radius: var(--border-radius-sm);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.category-page-btn:hover {
  background: var(--accent);
  color: white;
  transform: translateX(5px);
}

/* === FILTERS PANEL === */
.filters-panel {
  display: flex;
  align-items: end;
  gap: 20px;
  margin: 25px 0;
  padding: 20px;
  background: var(--card-bg);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
}

.filter-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-with-icon {
  position: relative;
  flex: 1;
}

.input-with-icon i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.input-with-icon input {
  width: 100%;
  padding: 8px 8px 8px 25px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}

.price-separator {
  color: var(--text-muted);
  font-weight: 600;
}

.styled-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
}

.styled-select:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}

.apply-filter-btn {
  padding: 8px 16px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.apply-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.25);
}

.reset-filter-btn {
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.reset-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === PRODUCTS SECTION === */
.products-section {
  margin-top: 20px;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.products-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* === PRODUCTS GRID === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* === PRODUCT CARD === */
.product-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  gap: 15px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(78, 205, 196, 0.1), transparent);
  transition: left 0.6s;
}

.product-card:hover::before {
  left: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(78, 205, 196, 0.3);
  box-shadow: var(--shadow-hover);
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 2;
}

.product-badge.new {
  background: #ff6b6b;
  color: white;
}

.product-badge.sale {
  background: #4ecdc4;
  color: white;
}

.product-image-wrapper {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.current-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}

.original-price {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.discount-badge {
  background: #ff4757;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.product-meta {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.addCartBtn,
.quickViewBtn {
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.addCartBtn {
  background: var(--accent-gradient);
  color: white;
}

.addCartBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.quickViewBtn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.quickViewBtn:hover {
  background: rgba(240, 240, 240, 1);
  border-color: rgba(78, 205, 196, 0.4);
}

/* === LOADING STATES === */
.products-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 40px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === MODAL (Quick View) === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

.modal.active {
  display: block;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: var(--border-radius);
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  margin: 5vh auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 2;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(78, 205, 196, 0.15);
  color: var(--accent);
  transform: rotate(90deg);
}

.quick-view-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 30px;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product-main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--card-bg);
}

.product-thumbnails {
  display: flex;
  gap: 10px;
}

.product-thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
  border: 2px solid transparent;
}

.product-thumbnails img.active,
.product-thumbnails img:hover {
  opacity: 1;
  border-color: var(--accent);
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars {
  color: #fcd34d;
}

.rating-value {
  font-weight: 600;
  color: var(--text-primary);
}

.reviews-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.product-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.feature i {
  color: var(--accent);
  min-width: 16px;
}

.product-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  flex: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(78, 205, 196, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  width: 50px;
  justify-content: center;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === CATEGORY TABS === */
.category-tabs-container {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-tabs-container::-webkit-scrollbar {
  display: none;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--card-bg);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  min-width: 120px;
  justify-content: center;
  flex-direction: column;
}

.category-tab-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 4px;
}

.category-tab:hover {
  background: rgba(78, 205, 196, 0.1);
  color: var(--accent);
  border-color: rgba(78, 205, 196, 0.3);
}

/* === SUBCATEGORIES === */
.subcategories-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.subcategories-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.subtabs::-webkit-scrollbar {
  display: none;
}

.subtab {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  border: 1px solid var(--border);
}

.subtab:hover {
  background: rgba(78, 205, 196, 0.1);
  color: var(--accent);
  border-color: rgba(78, 205, 196, 0.3);
}

.subtab.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 3px 8px rgba(78, 205, 196, 0.2);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
  .catalog-container {
    gap: 30px;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .catalog-page {
    padding: 0 15px;
  }
  .page-title {
    font-size: 2.2rem;
  }
  .category-header {
    flex-direction: column;
    gap: 15px;
  }
  .filters-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .price-inputs {
    justify-content: space-between;
  }
  .input-with-icon {
    flex: 1;
  }
  .quick-view-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .product-main-image {
    height: 300px;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.8rem;
  }
  .category-section {
    padding: 20px;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .global-search {
    padding: 20px;
  }
  .quick-filters {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }
}

/* === Адаптивные карточки === */
@media (max-width: 480px) {
  .product-card {
    padding: 15px;
    gap: 10px;
  }
  .product-title {
    font-size: 1rem;
  }
  .product-price {
    flex-direction: column;
    gap: 4px;
  }
  .product-features {
    display: none;
  }
  .product-actions {
    flex-direction: column;
    gap: 6px;
  }
}

/* === Модальное окно fullscreen на мобильных === */
@media (max-width: 768px) {
  .modal-content {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
  }
  .quick-view-content {
    padding: 15px;
    gap: 15px;
    grid-template-columns: 1fr;
  }
  .product-main-image {
    height: 300px;
  }
}

/* Подсветка активной категории */
.category-section.active-category {
  border-color: var(--accent);
  background: rgba(78, 205, 196, 0.08);
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.1);
  transform: translateY(-3px);
}

/* === Catalog Polish === */
.global-search {
  background:
    radial-gradient(1200px 220px at 10% -40%, rgba(78, 205, 196, 0.16), transparent 55%),
    var(--card-bg);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

.search-box input {
  height: 52px;
  border-radius: 14px;
}

.quick-filter {
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
}

.quick-filter.active,
.quick-filter:hover {
  box-shadow: 0 6px 16px rgba(78, 205, 196, 0.24);
}

.category-section {
  border-radius: 22px;
  padding: 26px;
}

.filters-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 14px;
  border-radius: 14px;
  padding: 18px;
}

.filter-group {
  min-width: 0;
}

.input-with-icon input,
.styled-select {
  height: 46px;
  border-radius: 10px;
}

.apply-filter-btn,
.reset-filter-btn {
  height: 46px;
  border-radius: 10px;
  font-weight: 700;
}

.products-grid {
  gap: 16px;
}

.product-card {
  padding: 14px;
  border-radius: 16px;
  gap: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.product-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
}

.product-card h3 {
  margin: 2px 0 0;
  font-size: 1.06rem;
  line-height: 1.35;
  color: var(--text-primary);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card p {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 600;
}

.product-card .addCartBtn {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  margin-top: 2px;
  font-weight: 800;
  letter-spacing: 0.1px;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  border-radius: 14px;
  border: 1px dashed rgba(78, 205, 196, 0.34);
  background: linear-gradient(180deg, rgba(78, 205, 196, 0.07), rgba(78, 205, 196, 0.02));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 18px;
}

.empty-state i {
  font-size: 1.8rem;
  color: var(--accent);
}

.empty-state h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.8rem;
}

.empty-state p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 420px;
}

@media (max-width: 980px) {
  .filters-panel {
    grid-template-columns: 1fr 1fr;
  }

  .apply-filter-btn,
  .reset-filter-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .category-section {
    padding: 18px;
  }

  .filters-panel {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-card {
    padding: 12px;
  }

  .product-card h3 {
    font-size: 0.98rem;
  }
}

@media (max-width: 560px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* === Premium product emphasis === */
.products-grid .product-card.premium-card {
  border-color: rgba(255, 214, 102, 0.52);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(255, 214, 102, 0.4),
    0 0 28px rgba(255, 214, 102, 0.34);
  transform: translateY(-2px) scale(1.004);
  z-index: 2;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 214, 102, 0.08), transparent 45%),
    var(--card-bg);
}

.products-grid .product-card.premium-card img,
.products-grid .product-card.premium-card .product-image {
  aspect-ratio: 16 / 9;
  min-height: 196px;
}

.products-grid .product-card.premium-card .product-image-wrapper {
  min-height: 196px;
}

.products-grid .product-card.premium-card .product-title,
.products-grid .product-card.premium-card h3 {
  font-size: 1.1rem;
}

.products-grid .product-card.premium-card .product-badge.premium {
  top: 10px;
  left: 10px;
  right: auto;
  border-radius: 999px;
  padding: 5px 10px;
  letter-spacing: 0.02em;
  line-height: 1;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffd666 0%, #ffb020 100%);
  color: #2b1a00;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 16px rgba(245, 159, 0, 0.28);
}

.products-grid .product-card.premium-card > * {
  position: relative;
  z-index: 1;
}

.products-grid .product-card.premium-card::before {
  display: none;
}

.products-grid .product-card.premium-card::after {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  left: -50%;
  top: -50%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 8%,
    rgba(255, 214, 102, 0.86) 0%,
    rgba(255, 214, 102, 0.4) 5%,
    rgba(255, 214, 102, 0) 19%
  );
  animation: premiumRotateGlowCatalog 5s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

html:not([data-theme="dark"]) .products-grid .product-card.premium-card {
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 186, 48, 0.5),
    0 0 34px rgba(255, 186, 48, 0.42);
}

html:not([data-theme="dark"]) .products-grid .product-card.premium-card::after {
  opacity: 1;
}

.product-meta .quickViewBtn,
.product-meta .addCartBtn {
  min-height: 38px;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 10px;
  gap: 5px;
}

@keyframes premiumRotateGlowCatalog {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (min-width: 981px) {
  .products-grid .product-card.premium-card {
    grid-column: auto;
  }
}

@media (max-width: 980px) {
  .products-grid .product-card.premium-card img,
  .products-grid .product-card.premium-card .product-image,
  .products-grid .product-card.premium-card .product-image-wrapper {
    min-height: 180px;
  }
}

@media (max-width: 768px) {
  .products-grid .product-card.premium-card {
    transform: translateY(-1px) scale(1.002);
  }

  .products-grid .product-card.premium-card img,
  .products-grid .product-card.premium-card .product-image,
  .products-grid .product-card.premium-card .product-image-wrapper {
    min-height: 164px;
  }

  .products-grid .product-card.premium-card {
    grid-column: auto;
  }
}

/* === Catalog Card Rebuild (stability override) === */
.products-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}

.product-card {
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), var(--card-bg));
  border: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  transform: none;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.12),
    0 8px 20px rgba(78, 205, 196, 0.15);
}

.product-card img,
.product-card .product-image {
  width: 100%;
  height: 190px;
  min-height: 190px;
  max-height: 190px;
  object-fit: cover;
  border-radius: 12px;
}

.product-card h3 {
  margin: 4px 0 2px;
  font-size: 1.08rem;
  line-height: 1.32;
}

.product-card p {
  font-size: 1.04rem;
}

.product-meta {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
  margin-top: 10px;
}

.product-meta .quickViewBtn,
.product-meta .addCartBtn {
  min-height: 38px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  padding: 8px 10px;
  white-space: nowrap;
}

.product-meta .quickViewBtn i,
.product-meta .addCartBtn i {
  font-size: 0.82rem;
}

.products-grid .product-card.premium-card {
  transform: translateY(-2px) scale(1.006);
  border-color: rgba(255, 186, 48, 0.6);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(255, 186, 48, 0.5),
    0 0 30px rgba(255, 186, 48, 0.36);
}

.products-grid .product-card.premium-card .product-badge.premium {
  position: absolute;
  top: 10px;
  left: 10px;
  right: auto;
  width: max-content;
  max-width: calc(100% - 20px);
  border-radius: 999px;
  padding: 5px 11px;
  line-height: 1;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(135deg, #ffe082 0%, #ffb300 100%);
  color: #2f2200;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 6px 14px rgba(245, 159, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.products-grid .product-card.premium-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from 0deg,
    rgba(255, 186, 48, 0.06) 0deg,
    rgba(255, 186, 48, 0.86) 48deg,
    rgba(255, 186, 48, 0.12) 105deg,
    rgba(255, 186, 48, 0.05) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: premiumRotateGlowCatalogRework 3.2s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.products-grid .product-card.premium-card > * {
  position: relative;
  z-index: 1;
}

@keyframes premiumRotateGlowCatalogRework {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.products-grid .product-card.premium-card .premium-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.products-grid .product-card.premium-card .premium-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: var(--size);
  line-height: 1;
  color: rgba(66, 133, 244, 0.9);
  text-shadow:
    0 0 8px rgba(66, 133, 244, 0.45),
    0 0 14px rgba(56, 201, 187, 0.3);
  transform: translate(-50%, -50%);
  opacity: 0.85;
  animation: premiumParticleOrbit var(--dur) ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

html[data-theme="dark"] .products-grid .product-card.premium-card .premium-particle {
  color: rgba(255, 214, 102, 0.95);
  text-shadow:
    0 0 8px rgba(255, 186, 48, 0.45),
    0 0 16px rgba(255, 186, 48, 0.36);
}

@keyframes premiumParticleOrbit {
  0% {
    transform: translate(-50%, -50%) translate(0, 0) scale(0.85) rotate(0deg);
    opacity: 0.36;
  }
  100% {
    transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(1.08) rotate(26deg);
    opacity: 0.95;
  }
}

html:not([data-theme="dark"]) .products-grid .product-card.premium-card::after {
  filter: drop-shadow(0 0 10px rgba(255, 186, 48, 0.45));
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card img,
  .product-card .product-image {
    height: 170px;
    min-height: 170px;
    max-height: 170px;
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-card img,
  .product-card .product-image {
    height: 178px;
    min-height: 178px;
    max-height: 178px;
  }
}

/* === Premium + buttons visibility fixes (light/dark) === */
.products-grid .product-card.premium-card .product-badge.premium {
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.products-grid .product-card.premium-card .product-badge.premium::before {
  content: "★";
  font-family: inherit;
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1;
}

html[data-theme="dark"] .product-meta .quickViewBtn,
html[data-theme="dark"] .product-meta .addCartBtn {
  color: #eaf2ff;
  border-color: rgba(120, 164, 255, 0.28);
}

html[data-theme="dark"] .product-meta .quickViewBtn {
  background: rgba(22, 34, 56, 0.92);
}

html[data-theme="dark"] .product-meta .quickViewBtn i {
  color: #8fc0ff;
}

html[data-theme="dark"] .product-meta .quickViewBtn:hover {
  background: rgba(40, 66, 102, 0.92);
  color: #ffffff;
}

html[data-theme="dark"] .product-meta .addCartBtn {
  background: linear-gradient(135deg, #38c7bd 0%, #31a7d9 100%);
  color: #ffffff;
}

html[data-theme="dark"] .products-grid .product-card.premium-card .product-badge.premium {
  background: linear-gradient(135deg, #ffe082 0%, #ffb300 100%);
  color: #1f1500;
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 8px 18px rgba(255, 179, 0, 0.34),
    0 0 0 1px rgba(255, 214, 102, 0.38);
}

html:not([data-theme="dark"]) .products-grid .product-card.premium-card {
  border-color: rgba(66, 133, 244, 0.72);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(66, 133, 244, 0.58),
    0 0 44px rgba(66, 133, 244, 0.46);
}

html:not([data-theme="dark"]) .products-grid .product-card.premium-card::after {
  opacity: 1;
  background: conic-gradient(
    from 0deg,
    rgba(66, 133, 244, 0.05) 0deg,
    rgba(66, 133, 244, 0.88) 48deg,
    rgba(56, 201, 187, 0.2) 105deg,
    rgba(66, 133, 244, 0.05) 360deg
  );
  filter: drop-shadow(0 0 14px rgba(66, 133, 244, 0.58));
}
