/**
 * Базовые стили Laravel-сайта (шаг 1 плана).
 * Общее: переменные, сброс, типографика, контейнер.
 * Править по необходимости.
 */

:root {
  --color-text: #1a1a1a;
  --color-text-muted: #6b7280;
  --color-accent: #f0cf4c;
  --color-border: #e5e7eb;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container-max: 1392px;
  --container-padding: 32px;
  --section-spacing: 32px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: #fff;
}

/* Обёртка: порядок строго — шапка, контент, футер */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site>header {
  flex-shrink: 0;
  order: 1;
}

.site>main.main-content {
  flex: 1 0 auto;
  order: 2;
}

.site>footer {
  flex-shrink: 0;
  order: 3;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Контейнер — общий для всего сайта */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

@media (max-width: 767px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Область основного контента (между шапкой и футером) */
.main-content {
  flex: 1 0 auto;
  min-height: 50vh;
}

/* Стили для страницы категории - компактные */
.subcategories-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 12px;
  margin: 20px 0;
}

.catalog-category {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 0;
  background: #f8f9fa;
  border-radius: 8px;
  transition: background 0.2s;
}

.catalog-category:hover {
  background: #f4ce47;
}

.catalog-category-img img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.catalog-category-name {
  font-size: 14px;
  font-weight: 500;
}

.catalog-category-name a {
  color: #1a1a1a;
  text-decoration: none;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.products-table thead {
  background: #f8f9fa;
}

.products-table th,
.products-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.products-table td.td-product-img {
  width: 60px;
}

.products-table td.td-product-img img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.products-table td.td-product-price {
  font-weight: 600;
  white-space: nowrap;
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: #f4ce47;
  color: #1a1a1a;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
}

.btn-buy:hover {
  background: #e5bf38;
}

/* Пагинация (новости, категории товаров и т.д.) — без выделения текущей страницы */
.pagination-wrapper {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow-x: auto;
}

.pagination-wrapper nav {
  width: 100%;
  max-width: 100%;
}

.pagination-wrapper .flex.gap-2.items-center.justify-between {
  display: flex !important;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.pagination-wrapper .flex.gap-2.items-center.justify-between a,
.pagination-wrapper .flex.gap-2.items-center.justify-between span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.pagination-wrapper .flex.gap-2.items-center.justify-between a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #1a1a1a;
}

.pagination-wrapper .flex.gap-2.items-center.justify-between span.cursor-not-allowed {
  color: #9ca3af;
  background: #f9fafb;
  cursor: not-allowed;
}

/* На десктопе скрываем только мобильный блок полной пагинации (div), не простую пагинацию (nav) */
@media (min-width: 641px) {
  .pagination-wrapper nav>div.flex.gap-2.items-center.justify-between {
    display: none !important;
  }
}

.pagination-wrapper nav>div[class*="sm:flex-1"] {
  display: none;
}

@media (min-width: 641px) {
  .pagination-wrapper nav>div[class*="sm:flex-1"] {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
}

.pagination-wrapper nav>div[class*="sm:flex-1"]>div:first-child p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.pagination-wrapper nav>div[class*="sm:flex-1"] .font-medium {
  font-weight: 600;
  color: #1a1a1a;
}

.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"] {
  display: inline-flex !important;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"]>span,
.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"]>a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  background: #fff;
  border: none;
  border-right: 1px solid #e5e7eb;
  color: #374151;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"]>span>span,
.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"]>a>svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"]>span:last-child,
.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"]>a:last-child {
  border-right: none;
}

.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"]>a:hover {
  background: #fef9e7;
  color: #b8860b;
}

.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"] .cursor-not-allowed span,
.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"] span[aria-disabled="true"] span {
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  cursor: not-allowed;
}

.pagination-wrapper .inline-flex[class*="rtl:flex-row-reverse"] svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .pagination-wrapper nav>div[class*="sm:flex-1"] {
    display: none !important;
  }
}

/* Чекбокс в формах — ровное выравнивание по высоте с текстом */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox__input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  margin-top: 2px;
  vertical-align: top;
  accent-color: var(--color-accent);
}

.checkbox__txt {
  line-height: 1.5;
}

.checkbox__txt p {
  margin: 0;
  line-height: inherit;
}