/**
 * @file
 * Styles for uc_catalog module.
 */

/* ===== ОБНОВЛЕННЫЕ СТИЛИ КАТАЛОГА ===== */

/* Изображения категорий */
img.category {
  float: right;
  margin-left: 1em;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
}

/* Таблицы категорий */
table.category-products {
  clear: right;
  width: 100%;
  border-collapse: collapse;
}

table.category {
  clear: right;
  width: 100%;
  border-collapse: collapse;
}

table.category *,
table.category * tr {
  background-color: transparent;
  border: none;
}

/* Ячейки категорий */
td.category {
  text-align: center;
  vertical-align: top;
  width: 25% !important;
  padding: 1.2%;
}

td.category.width-1 { width: 100%; }
td.category.width-2 { width: 50%; }
td.category.width-3 { width: 33%; }
td.category.width-4 { width: 25%; }
td.category.width-5 { width: 20%; }

td.category div {
  margin: 0.5em auto 0 auto;
  padding: 0;
}

/* Изображения товаров в категориях */
td.category img {
  margin: 0;
  padding: 0;
  width: 180px !important;
  height: 200px !important;
  min-width: 180px !important;
  min-height: 200px !important;
  max-width: 180px !important;
  max-height: 200px !important;
  object-fit: contain;
  border-radius: 12px;
  background: var(--primary-cream);
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

td.category img:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(44, 62, 80, 0.2);
}

/* Названия товаров */
table.category td.category strong a {
  display: inline;
  color: var(--primary-dark-red);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

table.category td.category strong a:hover {
  color: var(--primary-burgundy);
}

/* Формы в категориях */
table.category-products form {
  margin-bottom: 1em;
  margin-top: 1em;
}

/* ===== СЕТКА ТОВАРОВ ===== */
.category-grid-products {
  text-align: center;
  width: 100%;
  margin: 14px 0;
}

.category-grid-products table {
  border: none;
  text-align: center;
  width: 100%;
  border-collapse: collapse;
}

.category-grid-products td {
  text-align: center;
  padding: 1.1% 0.8%;
  border: none;
  background-color: var(--primary-white);
  border-radius: 12px;
  margin: 0.5%;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
  transition: all 0.3s ease;
}

.category-grid-products td:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.15);
}

/* Изображения в сетке */
.category-grid-products .catalog-grid-image {
  display: block;
  width: 100%;
  padding: 0.5%;
  box-sizing: border-box;
  text-align: center;
  margin-bottom: 0.5%;
}

.category-grid-products .catalog-grid-image img {
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  background: var(--primary-cream);
  padding: 5px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.category-grid-products .catalog-grid-image img:hover {
  transform: scale(1.05);
}

/* Названия товаров в сетке */
.category-grid-products .catalog-grid-title {
  display: block;
  text-align: center;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--primary-dark-red);
  font-size: 1.1em;
  line-height: 1.3;
}

/* Цены в сетке */
.category-grid-products .catalog-grid-sell-price {
  display: block;
  text-align: center;
  margin-bottom: 7px;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--primary-dark-red);
}

/* Кнопки добавления в корзину */
.category-grid-products .add-to-cart {
  display: block;
  text-align: center;
}

.category-grid-products .add-to-cart input[type="submit"] {
  background: linear-gradient(135deg, #870128, #6e1111);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(135, 1, 40, 0.3);
}

.category-grid-products .add-to-cart input[type="submit"]:hover {
  background: linear-gradient(135deg, #6e1111, #870128);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(135, 1, 40, 0.4);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* ===== ПАГИНАТОР ===== */
#catalog-filters {
  flex-wrap: nowrap !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 8px 12px !important;
  gap: 10px !important;
}

.catalog-filter {
  font-size: 13px !important;
}

.catalog-filter.filter-extra {
  display: none !important;
}
