/* Unified Design System - KIWITECH local prototype */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --primary-gradient: linear-gradient(135deg, #e76f23 0%, #c95514 100%);
  --primary-color: #e76f23;
  --primary-dark: #c95514;
  --accent-orange: #8d4e22;
  --text-primary: #0f172a;
  --text-secondary: #4b5563;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f5f7fa;
  --border-color: #e5e7eb;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 8px 24px rgba(231, 111, 35, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background: var(--primary-gradient);
  color: white;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.header-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 36px;
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.nav {
  display: flex;
  gap: 30px;
  list-style: none;
  flex: 1;
}

.nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  padding: 4px 0;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.nav a:hover {
  color: var(--primary-color);
}

.nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.cart-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  font-size: 20px;
  color: var(--primary-color);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: var(--shadow-sm);
}

.cart-btn:hover {
  background: var(--primary-gradient);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.cart-count:empty {
  display: none;
}

.phone {
  font-weight: 600;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 18px;
}

/* Cart Modal */
.cart-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  pointer-events: none;
}

.cart-modal.active {
  display: flex;
  pointer-events: all;
}

.cart-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.cart-content {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: var(--bg-primary);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 10001;
  animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--primary-gradient);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.cart-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cart-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: #ffffff;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg-secondary);
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.cart-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  word-wrap: break-word;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 600;
  color: #b45309;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cart-quantity-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--primary-color);
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cart-quantity-btn:hover {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  transform: scale(1.1);
}

.cart-quantity-value {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.cart-item-remove {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cart-item-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 16px;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.cart-total-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.cart-total-price {
  font-size: 20px;
  font-weight: 700;
  color: #b45309;
}

.cart-checkout {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-primary);
}

.cart-checkout:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.cart-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .cart-content {
    max-width: 100%;
  }
}

/* Hero Banner */
.hero {
  background: var(--primary-gradient);
  color: white;
  padding: 100px 20px;
  text-align: center;
  box-shadow: inset 0 -2px 20px rgba(0, 0, 0, 0.1);
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 24px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 36px;
  opacity: 0.95;
  font-weight: 400;
}

.hero-btn {
  display: inline-block;
  background: white;
  color: var(--primary-color);
  padding: 16px 40px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

/* Categories */
.categories {
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 20px;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--text-primary);
  text-align: center;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.category-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.2);
}

.category-icon {
  font-size: 52px;
  margin-bottom: 16px;
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.category-card h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 600;
}

.category-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Products */
.products {
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 20px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.2);
}

.product-image {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
}

.product-info {
  padding: 24px;
}

.product-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.product-category {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.product-price {
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
  box-shadow: var(--shadow-primary);
}

.product-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Features */
.features {
  background: var(--bg-primary);
  padding: 80px 20px;
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
}

.features-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
}

.feature {
  text-align: center;
}

.feature-icon {
  font-size: 56px;
  margin-bottom: 24px;
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.feature h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 600;
}

.feature p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer */
.footer {
  background: #1e293b;
  color: white;
  padding: 80px 20px 40px;
  margin-top: 80px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 48px;
  margin-bottom: 48px;
}

.footer-section h3 {
  font-size: 1.3rem;
  margin-bottom: 24px;
  color: white;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section a {
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-section a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid #334155;
  text-align: center;
  color: #94a3b8;
}

/* Каталог: панель + ровная сетка карточек */
.catalog-section {
  max-width: 1220px;
  margin: 0 auto;
  padding: 56px 20px 72px;
  background: linear-gradient(180deg, #eef2f7 0%, #f5f7fa 45%, #f8fafc 100%);
}

.catalog-section > .section-title {
  margin-bottom: 12px;
}

.catalog-panel {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 28px 36px;
  background: var(--bg-primary);
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 12px 28px -8px rgba(37, 99, 235, 0.12);
}

.catalog-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.55;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.catalog-search {
  min-width: 0;
}

.catalog-search-field {
  display: flex;
  align-items: center;
  gap: 0;
  height: 40px;
  padding: 0 6px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: var(--bg-secondary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.catalog-search-field:focus-within {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.catalog-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 23, 42, 0.38);
  flex-shrink: 0;
}

.catalog-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 38px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
}

.catalog-search-input:focus {
  outline: none;
}

.catalog-search-input::-webkit-search-cancel-button {
  display: none;
}

.catalog-search-clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-right: 2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(15, 23, 42, 0.45);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.catalog-search-clear:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-primary);
}

.catalog-meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.catalog-page-size-label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.catalog-page-size-text {
  display: none;
}

@media (min-width: 900px) {
  .catalog-page-size-text {
    display: inline;
  }
}

.catalog-select {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: var(--bg-secondary);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  min-width: 64px;
}

.catalog-loading,
.catalog-error,
.catalog-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 56px 24px;
  font-size: 15px;
}

.catalog-error {
  color: #b45309;
}

.catalog-grid {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 8px;
  align-items: stretch;
}

.catalog-card {
  box-sizing: border-box;
  background: var(--bg-primary);
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.catalog-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 12px 28px -10px rgba(37, 99, 235, 0.35),
    0 8px 16px -8px rgba(15, 23, 42, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
}

.catalog-card-media {
  position: relative;
  width: 100%;
  /* ПСБ Маркет: превью ~275.66×367.55 px */
  aspect-ratio: 275.66 / 367.55;
  flex-shrink: 0;
  background: linear-gradient(145deg, #f8fafc 0%, #eef2f7 55%, #e2e8f0 100%);
  overflow: hidden;
}

.catalog-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.05);
}

.catalog-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.catalog-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: 0.28;
}

.catalog-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.catalog-card-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e76f23;
}

.catalog-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-height: calc(1.45em * 3);
}

.catalog-card-price {
  margin-top: auto;
  padding-top: 10px;
  align-self: flex-start;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #92400e;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 45%, #fde68a 100%);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 1px 2px rgba(146, 64, 14, 0.08);
}

.catalog-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  margin: 28px 0 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.catalog-page-btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.catalog-page-btn:hover:not(:disabled) {
  border-color: #e76f23;
  color: #e76f23;
  background: #fafbff;
}

.catalog-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.catalog-page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.catalog-num-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.catalog-num-btn:hover {
  background: rgba(37, 99, 235, 0.12);
  color: #e76f23;
}

.catalog-num-btn.is-active {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.catalog-num-dots {
  padding: 0 6px;
  color: var(--text-secondary);
  font-size: 14px;
  user-select: none;
}

.catalog-page-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 1100px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .catalog-panel {
    padding: 20px 16px 24px;
    border-radius: 16px;
  }
}

@media (max-width: 380px) {
  .catalog-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .header-main {
    flex-direction: column;
    gap: 20px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .catalog-meta {
    order: 3;
    white-space: normal;
  }

  .catalog-page-size-label {
    justify-self: end;
  }

  .categories-grid,
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
