/* ============================================
   ИСИДА - Сайт-каталог магазина
   Современный минималистичный дизайн
   ============================================ */

/* ============================================
   CUSTOM FONTS
   ============================================ */

@font-face {
  font-family: 'Sansation';
  src: url('../assets/fonts/Sansation/Sansation-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Sansation';
  src: url('../assets/fonts/Sansation/Sansation-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Sansation';
  src: url('../assets/fonts/Sansation/Sansation-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Sansation';
  src: url('../assets/fonts/Sansation/Sansation-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'Sansation';
  src: url('../assets/fonts/Sansation/Sansation-BoldItalic.ttf') format('truetype');
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: 'Sansation';
  src: url('../assets/fonts/Sansation/Sansation-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
}

/* CSS Переменные для цветов и оформления */
:root {
  /* Основные цвета - премиум палитра */
  --accent-warm: #c4a265;
  --primary-green: #2b513d;
  --accent-gold: #e8b85f;
  --white: #ffffff;
  --light-gray: #f9f8f6;
  --medium-gray: #ede9e4;
  --dark-gray: #2a2725;
  --text-gray: #5a5450;
  --light-text: #a89f98;
  
  /* Фоновые цвета */
  --bg-primary: #ffffff;
  --bg-secondary: #f9f9f9;
  --bg-light: #f5f5f5;
  
  /* Цвета состояния */
  --success: #4caf50;
  --warning: #ff9800;
  --danger: #f44336;
  --info: #2196f3;
  
  /* Отступы */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  
  /* Размеры шрифтов */
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 28px;
  --font-size-4xl: 32px;
  --font-size-5xl: 40px;
  
  /* Толщина шрифта */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Граница и тени */
  --border-radius: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --box-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --box-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --box-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  
  /* Переходы и анимации */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Sansation', sans-serif;
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--bg-primary);
}

/* ============================================
   ТИПОГРАФИЯ
   ============================================ */

h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: var(--spacing-lg);
  color: var(--dark-gray);
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
  color: var(--dark-gray);
}

h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  margin-bottom: var(--spacing-sm);
  color: var(--dark-gray);
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-sm);
  color: var(--dark-gray);
}

p {
  color: var(--text-gray);
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--accent-warm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ============================================
   КОНТЕЙНЕРЫ И СЕТКА
   ============================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
}

.section {
  padding: var(--spacing-xxl) 0;
}

@media (max-width: 768px) {
  .section {
    padding: var(--spacing-xl) 0;
  }
}

/* Mobile fixes: prevent horizontal page pan and stack the contacts grid */
/* Disable horizontal scrolling/pan on mobile to avoid slight page shift when swiping */
html, body {
  overflow-x: hidden;
  /* allow vertical panning only */
  touch-action: pan-y;
}

/* Override inline grid used on contacts page: stack columns on small screens */
@media (max-width: 768px) {
  /* Target elements that have inline style containing the desktop grid-template used in contacts.php
     Use flex column-reverse so the contact-info block appears before the map on small screens. */
  [style*="grid-template-columns: 2fr 1fr"] {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: var(--spacing-xl) !important;
    grid-template-columns: unset !important;
    align-items: stretch !important;
  }

  /* Ensure the map and contact blocks take full width stacked vertically */
  #ymap {
    width: 100% !important;
    height: 300px !important;
    margin: 0 !important;
  }
}

/* ============================================
   ХЕДЕР И НАВИГАЦИЯ
   ============================================ */

header {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 200;
  width: 100%;
}

/* Make header content slightly wider than default container */
header > .container {
  max-width: 1350px;
  margin: 0 auto;
}
/* Header over hero on home page */
.home-hero header {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1400px;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  z-index: 200;
  overflow: hidden; /* Clip content inside rounded corners */
}

/* Single-line header layout */
.header-row {
  display: flex;
  align-items: center;
  padding: 26px 0;
}

.home-hero .header-row {
  padding: 24px 24px;
}

/* Hide NAP on non-home (white) pages */
body:not(.home-hero) .header-nap {
  display: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin: 0 auto;
  padding: 0;
  border-bottom: none;
}

.header-nav a {
  color: var(--text-gray);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
  padding: 8px 12px;
  border-radius: 6px;
  border-bottom: none;
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--dark-gray);
  background-color: var(--light-gray);
}

.header-nav a.active {
  color: var(--primary-green);
  font-weight: var(--font-weight-semibold);
}

/* White nav on homepage hero */
.home-hero .header-nav a {
  color: rgba(255, 255, 255, 0.85);
}

.home-hero .header-nav a:hover {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.1);
}

.home-hero .header-nav a.active {
  color: var(--white);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-shrink: 1;
  min-width: 0;
}

/* "Каталог" pill button next to logo */
.header-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 38px;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--dark-gray);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease, background-color 0.4s ease, color 0.4s ease;
}

.header-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--dark-gray);
  transition: width 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}

.header-pill:hover {
  color: var(--white);
  border-color: var(--dark-gray);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.header-pill:hover::before {
  width: 100%;
}

.header-pill:active {
  transform: translateY(0) scale(0.98);
}

.header-pill.active {
  background-color: var(--dark-gray);
  color: var(--white);
  border-color: var(--dark-gray);
}

.home-hero .header-pill {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.home-hero .header-pill::before {
  background: rgba(255, 255, 255, 0.15);
}

.home-hero .header-pill:hover {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08), inset 0 0 20px rgba(255, 255, 255, 0.04);
}

.home-hero .header-pill:hover,
.home-hero .header-pill.active {
  color: var(--white);
}

/* NAP (Name, Address, Phone) in header */
.header-nap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-right: 4px;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}

.header-phone {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--dark-gray);
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: color var(--transition-fast);
}

.header-phone:hover {
  color: var(--accent-warm);
}

.header-address-lines {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: 220px;
  white-space: normal;
  text-align: right;
}

.header-address-lines .addr-city {
  font-size: 12px;
  color: var(--light-text);
  font-weight: var(--font-weight-medium);
  text-align: right;
}

.header-address-lines .addr-line {
  font-size: 12px;
  color: var(--light-text);
  font-weight: var(--font-weight-regular);
  opacity: 0.95;
  text-align: right;
}

.home-hero .header-phone {
  color: var(--white);
}

.home-hero .header-phone:hover {
  color: #6eb000;
}

.home-hero .header-address-lines .addr-city,
.home-hero .header-address-lines .addr-line {
  color: rgba(255, 255, 255, 0.72);
}

/* "Задать вопрос" CTA button in header */
.header-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--dark-gray), #3a3735);
  color: var(--white);
  border-radius: 10px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.header-cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  transition: left 0.6s ease;
  z-index: 2;
}

.header-cta-btn:hover {
  color: var(--white);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.header-cta-btn:hover::before {
  left: 100%;
}

.header-cta-btn:active {
  transform: translateY(0) scale(0.98);
}

.home-hero .header-cta-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.home-hero .header-cta-btn:hover {
  background: linear-gradient(135deg, var(--primary-green), #6eb000);
  border-color: var(--primary-green);
  box-shadow: 0 8px 30px rgba(110, 176, 0, 0.5), 0 0 15px rgba(110, 176, 0, 0.25);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  background-color: var(--white);
  border-top: 1px solid var(--medium-gray);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.mobile-nav.menu-open {
  max-height: 800px;
}

.mobile-nav a {
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--text-gray);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  border-bottom: 1px solid var(--light-gray);
  transition: background-color var(--transition-fast);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background-color: var(--bg-light);
  color: var(--primary-green);
}

.mobile-nav .mobile-cta {
  background-color: var(--primary-green);
  color: var(--white);
  text-align: center;
  margin: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--border-radius);
  border-bottom: none;
}

.mobile-nav .mobile-cta:hover {
  background-color: var(--accent-warm);
  color: var(--white);
}

.logo {
  display: flex;
  align-items: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--primary-green);
  gap: var(--spacing-md);
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
}

.logo img {
  height: 44px;
  width: auto;
}

.search-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(255, 125, 7, 0.1);
}



/* Filters UI tweaks: wider number inputs and remove native number spinners */
.filter-input[type="number"] {
  width: 120px;
  padding: 6px 8px;
  border: 1px solid var(--medium-gray);
  border-radius: 6px;
}

/* Chrome, Safari, Edge */
.filter-input[type="number"]::-webkit-outer-spin-button,
.filter-input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}

/* Firefox */
.filter-input[type="number"] {
  -moz-appearance: textfield;
  -webkit-appearance: none;
  appearance: none;
}

/* Extra: ensure no spinner for number inputs generally (higher specificity) */
input.filter-input[type="number"], input[type="number"].filter-input, input[type="number"] {
  -webkit-appearance: none !important;
  -moz-appearance: textfield !important;
  appearance: none !important;
}

/* Apply button styling */
.filter-btn.apply-filters,
.filter-btn.reset-filters {
  background-color: var(--primary-green);
  color: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: filter var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.filter-btn.apply-filters:hover,
.filter-btn.reset-filters:hover {
  filter: brightness(0.92);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.filter-btn.apply-filters:active,
.filter-btn.reset-filters:active {
  filter: brightness(0.82);
  transform: translateY(1px);
}

/* Legacy badge (kept for cart/favorites if needed later) */
.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--accent-warm);
  color: var(--white);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  padding: 2px 6px;
  border-radius: 10px;
  display: none;
}



/* ============================================
   КНОПКИ
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-green), #6eb000);
  color: var(--white);
  box-shadow: var(--box-shadow-sm);
  /* match hero CTA layout/animation */
  position: relative;
  overflow: hidden;
  z-index: 1;
  padding: 16px 36px;
  border-radius: 10px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

/* Shimmer sweep */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  transition: left 0.6s ease;
  z-index: 2;
}

.btn-primary:hover {
  color: var(--white);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 30px rgba(110, 176, 0, 0.5), 0 0 15px rgba(110, 176, 0, 0.25);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(220, 111, 63, 0.3);
}

.btn-secondary {
  background-color: var(--primary-green);
  color: var(--white);
  box-shadow: var(--box-shadow-sm);
}

.btn-secondary:hover {
  background-color: #8abf00;
  box-shadow: var(--box-shadow-md);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent-warm);
  border: 2px solid var(--accent-warm);
}

.btn-outline:hover {
  background-color: var(--accent-warm);
  color: var(--white);
}

/* Compact outline button for category sections */
.btn-outline-sm {
  background-color: transparent;
  color: var(--text-gray);
  border: 1.5px solid var(--medium-gray);
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: var(--font-size-sm);
  border-radius: var(--border-radius-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
}

.btn-outline-sm:hover {
  border-color: var(--accent-warm);
  color: var(--accent-warm);
  background-color: rgba(196, 162, 101, 0.05);
}

.btn-small {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
}

.btn-large {
  padding: var(--spacing-lg) var(--spacing-xl);
  font-size: var(--font-size-lg);
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   КАРТОЧКИ ТОВАРОВ
   ============================================ */

.product-card {
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--box-shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  box-shadow: var(--box-shadow-lg);
  transform: translateY(-8px);
}

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--bg-light);
  overflow: hidden;
}

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

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

.product-badge {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background-color: var(--accent-warm);
  color: var(--white);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.product-badge.stock-unavailable {
  background-color: var(--danger);
}

.product-badge.discount {
  background-color: var(--primary-green);
}

.favorite-btn {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  transition: all var(--transition-fast);
  backdrop-filter: blur(5px);
}

.favorite-btn:hover {
  background-color: var(--white);
  transform: scale(1.1);
}

.favorite-btn.active {
  color: var(--accent-warm);
}

.product-info {
  padding: var(--spacing-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: var(--font-size-sm);
  color: var(--light-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-sm);
}

.product-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--dark-gray);
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
}

.product-description {
  font-size: var(--font-size-sm);
  color: var(--text-gray);
  margin-bottom: var(--spacing-md);
  flex: 1;
}

.product-price-block {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.product-price {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--primary-green);
}

.product-old-price {
  font-size: var(--font-size-base);
  color: var(--light-text);
  text-decoration: line-through;
}

.product-discount {
  background-color: var(--primary-green);
  color: var(--white);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
}

/* Utility classes moved from inline styles in PHP templates */
.slide-img {
  width: 100%;
  object-fit: cover;
}

.mb-xl {
  margin-bottom: var(--spacing-xl);
}

.section--light-bg {
  background-color: var(--bg-light);
}

.placeholder-gradient--neutral {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}

.placeholder-gradient--one { background: linear-gradient(135deg, #e8e8e8, #d0d0d0); }
.placeholder-gradient--two { background: linear-gradient(135deg, #f5f5f5, #e8e8e8); }
.placeholder-gradient--three { background: linear-gradient(135deg, #d0d0d0, #f5f5f5); }

.mt-xl { margin-top: var(--spacing-xl); }

.cta-section {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-parallax-bg {
  position: absolute;
  top: -30%;
  left: 0;
  width: 100%;
  height: 160%;
  background-image: url('/assets/images/modern-kitchen-bg.webp');
  background-size: cover;
  background-position: center;
  z-index: 0;
  will-change: transform;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.cta-container { text-align: center; position: relative; z-index: 2; }
.cta-title { color: white; margin-bottom: var(--spacing-lg); }
.cta-text { color: rgba(255,255,255,0.9); margin-bottom: var(--spacing-lg); font-size: var(--font-size-lg); }

/* Product page layout classes */
.product-gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-xl); margin-bottom: var(--spacing-xl); }
.product-main-placeholder { width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, var(--accent-warm), var(--primary-green)); border-radius: var(--border-radius-md); display:flex; align-items:center; justify-content:center; font-size:120px; margin-bottom: var(--spacing-lg); position: relative; }
.product-thumbs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--spacing-md); }

/* Product detail gallery: ensure main image fits its container */
.product-main-image {
  position: relative;
  width: 100%;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--border-radius-md);
  /* Limit height but keep responsive */
  max-height: 72vh;
}

.product-main-image img {
  width: 100%;
  height: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
}

.product-thumbs-grid .product-thumb {
  background: var(--bg-light);
  border-radius: 6px;
  overflow: hidden;
}
.product-thumbs-grid .product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.color-swatch { aspect-ratio: 1; border-radius: var(--border-radius); cursor: pointer; display:flex; align-items:center; justify-content:center; font-size:40px; border: 2px solid var(--accent-warm); }
.border-interactive { border-color: var(--medium-gray); }

/* Swatch background utilities */
.swatch-1 { background: linear-gradient(135deg, #c4a265, #9ed200); }
.swatch-2 { background: linear-gradient(135deg, #9ed200, #c4a265); }
.swatch-3 { background: linear-gradient(135deg, #c4a265, #d0d0d0); }
.swatch-4 { background: linear-gradient(135deg, #9ed200, #d0d0d0); }

.section--p-lg { padding: var(--spacing-lg) 0; }

/* Utility flex helpers */
.flex-row { display: flex; }
.flex-gap-md { gap: var(--spacing-md); }
.flex-align-center { align-items: center; }
.flex-justify-between { justify-content: space-between; }

.product-price-large { font-size: var(--font-size-4xl); color: var(--accent-warm); }
.product-old-price-large { font-size: var(--font-size-xl); }

/* Footer small muted link style */
.footer-link-muted { color: rgba(255,255,255,0.8); }

/* Cart page styles */
.cart-wrapper { display: flex; gap: var(--spacing-lg); flex-direction: column; }
.cart-items { background: transparent; }
.cart-item { padding: 12px 0; display:flex; justify-content:space-between; align-items:center; }
.cart-summary { margin-top: var(--spacing-lg); }
.muted { color: var(--light-text); }

/* Additional spacing utilities */
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-md { margin-bottom: var(--spacing-md); }
.pt-0 { padding-top: 0; }

/* Product price card */
.product-price-card { background-color: var(--bg-light); padding: var(--spacing-lg); border-radius: var(--border-radius-md); margin-bottom: var(--spacing-lg); }

/* Flex helpers for buttons */
.flex-grow-1 { flex: 1; }
.flex-fixed { flex: 0 0 auto; }

.rating { font-size: 18px; }
.text-muted { color: var(--text-gray); }

.spec-title { font-weight: var(--font-weight-semibold); color: var(--dark-gray); margin-bottom: var(--spacing-sm); }
.spec-value { color: var(--text-gray); }

/* Cart item specific classes */
.cart-item-title { font-weight: 600; }
.cart-item-sub { font-size: 13px; color: #777; }
.cart-item-right { text-align: right; }
.remove-item { margin-top: 6px; }

/* Card box utility */
.card-box { border: 1px solid var(--medium-gray); border-radius: var(--border-radius-md); padding: var(--spacing-lg); margin-bottom: var(--spacing-lg); }
.card-box-no-pad { border: 1px solid var(--medium-gray); border-radius: var(--border-radius-md); margin-bottom: var(--spacing-lg); }
.text-small { font-size: var(--font-size-sm); }

.info-separator { border-top: 1px solid var(--medium-gray); padding-top: var(--spacing-lg); }
.mt-xxl { margin-top: var(--spacing-xxl); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xs { margin-top: 12px; }
.flex-align-end { align-items: flex-end; }
.gap-lg { gap: var(--spacing-lg); }
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); }
.mb-0 { margin-bottom: 0; }
.review-author { font-weight: var(--font-weight-semibold); color: var(--dark-gray); }
.review-meta { color: var(--text-gray); font-size: var(--font-size-sm); }
.review-date { color: var(--light-text); font-size: var(--font-size-sm); }

/* Placeholder utilities reused in related products */
.placeholder-60 { width: 100%; height: 100%; display:flex; align-items:center; justify-content:center; font-size:60px; }
.placeholder-green { background: linear-gradient(135deg, #9ed200, #c4a265); }
.placeholder-orange { background: linear-gradient(135deg, #c4a265, #d0d0d0); }
.placeholder-mixed { background: linear-gradient(135deg, #9ed200, #d0d0d0); }

.product-stock {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-md);
}

.product-stock.available {
  color: var(--success);
}

.product-stock.unavailable {
  color: var(--danger);
}

.product-card .btn {
  width: 100%;
}

/* ============================================
   СЕТКА ТОВАРОВ
   ============================================ */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xxl);
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.section-header-row .btn {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header-row .btn {
    align-self: flex-start;
  }
}

/* Home page carousels */
.home-products-carousel,
.product-carousel {
  position: relative;
  overflow: visible;
  width: 100%;
  --carousel-gap: var(--spacing-lg);
  padding: 0 56px;
  box-sizing: border-box;
}

.carousel-viewport {
  overflow: hidden;
}

.home-products-carousel .carousel-track,
.product-carousel .carousel-track {
  display: flex;
  gap: var(--carousel-gap);
  transition: transform var(--transition-slow);
  will-change: transform;
}

.home-products-carousel .carousel-track > .product-card,
.product-carousel .carousel-track > .product-card {
  flex: 0 0 calc((100% - (var(--carousel-gap) * 2)) / 3);
}

@media (max-width: 1024px) {
  .home-products-carousel .carousel-track > .product-card,
  .product-carousel .carousel-track > .product-card {
    flex: 0 0 calc((100% - var(--carousel-gap)) / 2);
  }
}

@media (max-width: 640px) {
  .home-products-carousel .carousel-track,
  .product-carousel .carousel-track {
    gap: var(--spacing-md);
  }

  .home-products-carousel .carousel-track > .product-card,
  .product-carousel .carousel-track > .product-card {
    flex: 0 0 100%;
  }
  
  .product-carousel {
    padding: 0;
    margin: 0;
  }
  
  .carousel-viewport {
    touch-action: pan-y pan-x;
  }
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--dark-gray);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
  stroke: var(--dark-gray);
  stroke-width: 2;
  fill: none;
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

@media (max-width: 768px) {
  .carousel-arrow {
    display: none !important;
  }

  .product-carousel {
    padding: 0;
  }
}

@media (max-width: 480px) {
  .product-carousel {
    padding: 0;
    margin: 0;
  }
}

.custom-order-cta {
  position: relative;
  overflow: hidden;
  width: 100vw;
  margin: var(--spacing-xxl) calc(50% - 50vw) 0;
  padding: calc(var(--spacing-xxl) + 12px) 0;
  min-height: 420px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-order-parallax-bg {
  position: absolute;
  top: -30%;
  left: 0;
  width: 100%;
  height: 160%;
  background-image: url('/assets/images/soft-coach-bg.webp');
  background-size: cover;
  background-position: center;
  z-index: 0;
  will-change: transform;
}

.custom-order-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.custom-order-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.custom-order-eyebrow {
  font-size: var(--font-size-base);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-sm);
}

.custom-order-title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-md);
  color: var(--white);
}

.custom-order-benefit {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-lg);
}

@media (max-width: 768px) {
  .custom-order-content {
    text-align: center;
  }

  .custom-order-title {
    font-size: var(--font-size-2xl);
  }

  .custom-order-benefit {
    font-size: var(--font-size-base);
  }
}

/* Questions CTA Section */
.questions-cta {
  position: relative;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: var(--spacing-xxl) 0;
  min-height: 320px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.questions-parallax-bg {
  position: absolute;
  top: -30%;
  left: 0;
  width: 100%;
  height: 160%;
  background-image: url('/assets/images/soft-coach-bg.webp');
  background-size: cover;
  background-position: center;
  z-index: 0;
  will-change: transform;
}

.questions-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.questions-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.questions-cta h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-sm);
  color: var(--white);
}

.questions-subtitle {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-lg);
}

@media (max-width: 480px) {
  .section-header-row h1,
  .section-header-row h2 {
    font-size: var(--font-size-2xl);
    line-height: 1.2;
  }
}

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 840px;
  overflow: hidden;
  margin-bottom: var(--spacing-xxl);
  margin-top: 0;
}

/* Parallax background layer */
.hero-parallax-bg {
  position: absolute;
  top: 0%;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/assets/images/modern-kitchen-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  z-index: 0;
}

/* Градиент убран — затемнение теперь локально за текстовым блоком */
.hero-section::before {
  display: none;
}

/* Контент — выравнивание по правому краю, центр по вертикали */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  padding-top: 80px; /* offset for header height */
  text-align: right;
  color: var(--white);
}

/* Плавное затемнение за текстовым блоком */
.hero-content::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -40px;
  transform: translateY(-50%);
  width: 750px;
  height: 85%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(30px);
}

.hero-headline {
  font-size: 64px;
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  margin-bottom: var(--spacing-xxl);
  color: var(--white);
  max-width: 650px;
  letter-spacing: -1.5px;
  font-family: 'Sansation', sans-serif;
}

.hero-offer {
  font-size: 19px;
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
  margin-bottom: var(--spacing-xxl);
  color: rgba(255, 255, 255, 0.926);
  max-width: 700px;
  font-family: 'Sansation', sans-serif;
}

.hero-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-xxl) 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  justify-content: flex-end;
  max-width: 650px;
  margin-left: auto;
}

.hero-benefits li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  font-family: 'Sansation', sans-serif;
  max-width: 185px;
  line-height: 1.4;
}

.hero-benefits li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(59, 124, 92, 0.6);
  color: var(--white);
  font-size: 20px;
  flex-shrink: 0;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  justify-content: flex-end;
}

/* CTA Button — shimmer + glow */
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-green), #6eb000);
  color: var(--white);
  padding: 16px 36px;
  border: none;
  border-radius: 10px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

/* Shimmer sweep */
.hero-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  transition: left 0.6s ease;
  z-index: 2;
}

.hero-cta:hover {
  color: var(--white);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 30px rgba(110, 176, 0, 0.5), 0 0 15px rgba(110, 176, 0, 0.25);
}

.hero-cta:hover::before {
  left: 100%;
}

.hero-cta:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(220, 111, 63, 0.3);
}

/* Outline button — border glow + fill */
.hero-cta-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--white);
  padding: 16px 36px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease, background-color 0.4s ease;
}

/* Fill sweep from left */
.hero-cta-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: width 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}

.hero-cta-outline:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.65);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08), inset 0 0 20px rgba(255, 255, 255, 0.04);
}

.hero-cta-outline:hover::before {
  width: 100%;
}

.hero-cta-outline:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

/* ---- Hero entrance animations ---- */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes heroFadeScale {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-headline,
.hero-offer,
.hero-benefits,
.hero-buttons {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-headline {
  animation: heroFadeUp 1s 0.15s forwards;
}

.hero-offer {
  animation: heroFadeUp 1s 0.45s forwards;
}

.hero-benefits {
  animation: heroFadeUp 0.9s 0.7s forwards;
}

.hero-buttons {
  animation: heroFadeScale 0.9s 0.95s forwards;
}

/* Scroll-driven fade-out class — added by JS */
.hero-content.hero-scrolled {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ============================================
   ОПТИМИЗАЦИЯ ДЛЯ 16:9 ЭКРАНОВ (Windows ноутбуки)
   Условие: aspect-ratio >= 16/9 И viewport height <= 820px
   - Windows 1366×768 (viewport ~680px): попадает ✓
   - Windows 1920×1080 @ 125% DPI (viewport ~800px): попадает ✓
   - Windows 1920×1080 @ 150% DPI (viewport ~640px): попадает ✓
   - MacBook 14" не-fullscreen (viewport ~860-900px): НЕ попадает ✓
   - MacBook 13" fullscreen (viewport ~820px, ratio 16:10): НЕ попадает (ratio < 16/9) ✓
   ============================================ */
@media (min-aspect-ratio: 16/9) and (max-height: 820px) {

  /* --- Шапка: уменьшаем высоту ~25% --- */
  .home-hero header {
    top: 14px;
  }

  .home-hero .header-row {
    padding: 12px 20px;
  }

  .home-hero .logo img {
    height: 40px;
  }

  .home-hero .header-nav a {
    font-size: 15px;
    padding: 6px 9px;
  }

  .home-hero .header-pill {
    padding: 5px 22px;
    font-size: 15px;
  }

  .home-hero .header-cta-btn {
    padding: 6px 14px;
    font-size: 14px;
  }

  .home-hero .header-phone {
    font-size: 12px;
  }

  .home-hero .header-address-lines .addr-city,
  .home-hero .header-address-lines .addr-line {
    font-size: 11px;
  }

  /* --- Hero: уменьшаем min-height --- */
  .hero-section {
    min-height: 620px;
  }

  /* --- Hero content: отступы --- */
  .hero-content {
    padding-top: 60px;
  }

  /* --- Заголовок --- */
  .hero-headline {
    font-size: 46px;
    letter-spacing: -1px;
    margin-bottom: var(--spacing-lg);
  }

  /* --- Подзаголовок --- */
  .hero-offer {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
  }

  /* --- Benefits --- */
  .hero-benefits {
    margin: 0 0 var(--spacing-lg) 0;
    gap: var(--spacing-md);
  }

  .hero-benefits li {
    font-size: 13px;
    max-width: 148px;
    gap: 7px;
  }

  .hero-benefits li::before {
    min-width: 36px;
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  /* --- Кнопки --- */
  .hero-cta,
  .hero-cta-outline {
    padding: 12px 28px;
    font-size: 14px;
  }

  /* --- Каталог: sidebar уже, карточки меньше --- */
  .catalog-sidebar {
    min-width: 200px;
  }

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

@media (max-width: 768px) {
  .hero-section {
    height: 100vh;
    min-height: 840px;
  }
  
  .hero-headline {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
  }
  
  .hero-offer {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-lg);
  }
  
  .hero-content {
    padding: 0 var(--spacing-md);
    padding-top: 70px;
    align-items: center;
    text-align: center;
  }
  .hero-benefits {
    justify-content: center;
    margin-left: 0;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-sm);
    align-items: center;
  }

  .hero-cta,
  .hero-cta-outline {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ============================================
   КАТЕГОРИИ
   ============================================ */

.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xxl);
}

.category-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal);
}

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

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: background-color var(--transition-normal);
}

.category-card:hover .category-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.category-name {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--white);
  text-align: center;
}

@media (max-width: 768px) {
  .categories {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .categories {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* ============================================
   ФИЛЬТРЫ
   ============================================ */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.filter-group label {
  font-weight: var(--font-weight-medium);
  color: var(--dark-gray);
}

.filter-select,
.filter-input {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  background-color: var(--white);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--accent-warm);
}

.filter-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--light-gray);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
}

.filter-btn.active {
  background-color: var(--accent-warm);
  color: var(--white);
}

@media (max-width: 768px) {
  .filters {
    gap: var(--spacing-sm);
  }
  
  .filter-group {
    gap: var(--spacing-sm);
    width: 100%;
  }
  
  .filter-select,
  .filter-input,
  .filter-btn {
    font-size: var(--font-size-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
  }
}

/* Catalog filters: ensure price inputs and filter controls fit on mobile */
@media (max-width: 768px) {
  .filters {
    flex-direction: column !important;
    align-items: stretch !important;
  }



  /* Make each filter group stack vertically and fill width */
  .filter-group {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: var(--spacing-sm) !important;
    align-items: stretch !important;
  }

  /* Force numeric/price inputs and selects to use the available width */
  .filter-input[type="number"],
  input[type="number"],
  .filter-input,
  .filter-select,
  .search-input {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Buttons: keep side-by-side on larger phones, stack on very small screens */
  .filter-actions { display: flex; gap: var(--spacing-sm); }
  .filter-btn.apply-filters, .filter-btn.reset-filters {
    width: 48% !important;
  }
}

@media (max-width: 480px) {
  .filter-actions { flex-direction: column; }
  .filter-btn.apply-filters, .filter-btn.reset-filters {
    width: 100% !important;
  }
}

/* Center filter buttons on mobile and remove inline margin artifacts */
@media (max-width: 768px) {
  .filters {
    align-items: center !important; /* center children horizontally */
  }

  /* Buttons: remove inline margin-left and center them */
  .filters .filter-btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
    width: calc(100% - 48px) !important; /* give small horizontal gutter */
    max-width: 520px !important;
  }

}

@media (max-width: 480px) {
  .filters .filter-btn { width: calc(100% - 32px) !important; }
}

/* Contacts: make social links icons-only on mobile */
@media (max-width: 768px) {
  /* Target anchors that contain social icons (images stored under assets/images/social) */
  a > img[src*="/assets/images/social/"] {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
  }

  /* Hide the text block next to the icon (the <div><h4>...</h4></div>) */
  a > img[src*="/assets/images/social/"] + div {
    display: none !important;
  }

  /* Make social anchors distribute evenly across the row */
  a[href*="vk.com"],
  a[href*="instagram.com"],
  a[href*="t.me"],
  a[href*="wa.me"],
  a[href*="ok.ru"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0 !important; /* allow equal distribution */
    min-width: 0 !important;
    padding: var(--spacing-md) !important;
  }

  /* If markup uses different hrefs, fallback: any anchor containing social image becomes flex item */
  a:has(img[src*="/assets/images/social/"]) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: var(--spacing-md) !important;
  }

  /* Make the social container not scroll horizontally and remove large gaps */
  .section div[style*="overflow-x: auto"] {
    overflow-x: hidden !important;
    gap: var(--spacing-sm) !important;
  }
}

/* ============================================
   МОДАЛЬНЫЕ ОКНА
   ============================================ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* Lock body scroll when modal is open */
body.modal-open {
  overflow: hidden !important;
  touch-action: none;
  height: 100%;
  overscroll-behavior: none;
}

.modal-content {
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-xl);
  max-width: 500px;
  width: 90%;
  box-shadow: var(--box-shadow-lg);
  animation: slideUp var(--transition-normal);
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--medium-gray);
  padding-bottom: var(--spacing-lg);
}

.modal-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--dark-gray);
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--font-size-2xl);
  color: var(--text-gray);
  cursor: pointer;
  transition: color var(--transition-fast);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--dark-gray);
}

.modal-body {
  margin-bottom: var(--spacing-lg);
}

.modal-footer {
  display: flex;
  gap: var(--spacing-md);
  justify-content: flex-end;
}

@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    padding: var(--spacing-lg);
  }
  
  .modal-footer {
    flex-direction: column-reverse;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
}

/* Modal trigger button styling (transparent, green border/text, hover to green background + white text) */
.modal-trigger {
  flex: 1;
  font-size: var(--font-size-sm);
  padding: 12px;
  background: rgba(158, 210, 0, 0.08);
  color: var(--dark-gray);
  border: 2px solid var(--primary-green);
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.12s ease;
  text-align: center;
}
.modal-trigger:hover,
.modal-trigger:focus {
  background: var(--primary-green);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

/* Gallery modal specific styles */
/* Gallery modal specific styles */
#gallery-modal .modal-content { background: transparent; box-shadow: none; }
#gallery-modal .gallery-wrap { display: flex; align-items: center; justify-content: center; position: relative; }
#gallery-modal .gallery-prev, #gallery-modal .gallery-next, #gallery-modal .modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  line-height: 0;
  vertical-align: middle;
  padding: 0;
}
#gallery-modal .gallery-prev, #gallery-modal .gallery-next {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  border: none;
  cursor: pointer;
}
#gallery-modal .modal-close {
  background: rgba(255,255,255,0.9);
  color: #222;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
}
#gallery-modal .gallery-thumbs-row { padding-top: 12px; }
#gallery-modal .gallery-thumbs-row img { opacity: 0.9; transition: transform 0.18s ease, border-color 0.18s ease; border: 2px solid transparent; }
#gallery-modal .gallery-thumbs-row img:hover { transform: translateY(-3px); }
#gallery-modal .gallery-thumbs-row img.active { border-color: var(--primary-green); }

/* ============================================
   ФОРМЫ
   ============================================ */

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: var(--font-weight-medium);
  color: var(--dark-gray);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 3px rgba(255, 125, 7, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-help {
  font-size: var(--font-size-sm);
  color: var(--light-text);
  margin-top: var(--spacing-xs);
}

.form-error {
  border-color: var(--danger) !important;
}

.form-error ~ .form-help {
  color: var(--danger);
}

/* Valid input state: green border and subtle halo */
.form-input.input-valid,
.form-textarea.input-valid,
.form-select.input-valid {
  border-color: var(--primary-green) !important;
  box-shadow: 0 0 0 4px rgba(158,210,0,0.08);
}

/* For checkbox consent we mark the whole form-group */
.form-group.input-valid {
  border-left: 4px solid var(--primary-green);
  padding-left: calc(var(--spacing-md) - 4px);
}

.form-checkbox,
.form-radio {
  margin-right: var(--spacing-sm);
}

.checkbox-label,
.radio-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  font-weight: var(--font-weight-regular);
  color: var(--text-gray);
}

/* ============================================
   ФУТЕР
   ============================================ */

footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: var(--spacing-xxl) 0 var(--spacing-xl);
}

footer a {
  color: var(--primary-green);
  transition: color var(--transition-fast);
}

footer a:hover {
  color: var(--accent-warm);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xxl);
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-lg);
}

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

.footer-section li {
  margin-bottom: var(--spacing-md);
}

.footer-section li a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-fast);
}

.footer-section li a:hover {
  color: var(--accent-warm);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact-icon {
  font-size: var(--font-size-lg);
  margin-top: 2px;
  color: var(--accent-warm);
}

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-disclaimer p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  margin: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-copy {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-sm);
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.social-link:hover {
  background-color: var(--white);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  footer {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .footer-bottom {
    flex-direction: column;
  }

  /* Enlarge social icons on mobile */
  .social-link {
    width: 48px;
    height: 48px;
  }
  .social-link img {
    width: 28px;
    height: 28px;
  }
}

/* ============================================
   АККОРДЕОН (FAQ)
   ============================================ */

.accordion {
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--medium-gray);
}

.accordion-item {
  border-bottom: 1px solid var(--medium-gray);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  background-color: var(--bg-light);
  padding: var(--spacing-lg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-fast);
  border: none;
  width: 100%;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--dark-gray);
}

.accordion-header:hover {
  background-color: var(--medium-gray);
}

.accordion-header.active {
  background-color: var(--accent-warm);
  color: var(--white);
}

.accordion-icon {
  font-size: var(--font-size-lg);
  transition: transform var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.accordion-content.active {
  max-height: 500px;
}

.accordion-body {
  padding: var(--spacing-lg);
  color: var(--text-gray);
}

/* ============================================
   ЛИСТ ХЛЕБА (BREADCRUMB)
   ============================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
  font-size: var(--font-size-sm);
}

.breadcrumb-item {
  color: var(--text-gray);
}

.breadcrumb-item a {
  color: var(--accent-warm);
  transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--primary-green);
}

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

.breadcrumb-item.active {
  color: var(--dark-gray);
  font-weight: var(--font-weight-medium);
}

/* ============================================
   КАРТОЧКА ПРОФИЛЯ
   ============================================ */

.profile-header {
  background: linear-gradient(135deg, var(--accent-warm), var(--primary-green));
  padding: var(--spacing-xxl) 0;
  color: var(--white);
  margin-bottom: var(--spacing-xl);
}

.profile-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-4xl);
  border: 3px solid var(--white);
}

.profile-details h1 {
  color: var(--white);
  margin-bottom: var(--spacing-sm);
}

.profile-details p {
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .profile-info {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   РАЗДЕЛЫ (TABS)
   ============================================ */

.tabs {
  display: flex;
  gap: var(--spacing-md);
  border-bottom: 2px solid var(--medium-gray);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: none;
  padding: var(--spacing-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-gray);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

.tab-btn:hover {
  color: var(--accent-warm);
}

.tab-btn.active {
  color: var(--accent-warm);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-warm);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn var(--transition-normal);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   УВЕДОМЛЕНИЯ
   ============================================ */

.alert {
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  animation: slideDown var(--transition-normal);
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.alert-icon {
  font-size: var(--font-size-lg);
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-text {
  flex: 1;
}

.alert-close {
  background: none;
  border: none;
  font-size: var(--font-size-lg);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.alert-close:hover {
  opacity: 1;
}

.alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-warning {
  background-color: rgba(255, 152, 0, 0.1);
  color: var(--warning);
  border-left: 4px solid var(--warning);
}

.alert-danger {
  background-color: rgba(244, 67, 54, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-info {
  background-color: rgba(33, 150, 243, 0.1);
  color: var(--info);
  border-left: 4px solid var(--info);
}

/* ============================================
   УТИЛИТЫ
   ============================================ */

.text-center {
  text-align: center;
}

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

.hidden {
  display: none;
}

.mt {
  margin-top: var(--spacing-md);
}

.mb {
  margin-bottom: var(--spacing-md);
}

.ml {
  margin-left: var(--spacing-md);
}

.mr {
  margin-right: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-xl);
}

.mb-lg {
  margin-bottom: var(--spacing-xl);
}

.pt {
  padding-top: var(--spacing-md);
}

.pb {
  padding-bottom: var(--spacing-md);
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-3xl);
  }
  
  h2 {
    font-size: var(--font-size-2xl);
  }
  
  h3 {
    font-size: var(--font-size-lg);
  }
  
  .btn-large {
    padding: var(--spacing-md) var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--font-size-2xl);
  }
  
  h2 {
    font-size: var(--font-size-xl);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   ПЕЧАТЬ
   ============================================ */

@media print {
  header,
  footer,
  .header-actions,
  .btn,
  .action-btn {
    display: none;
  }
  
  body {
    background-color: var(--white);
  }
}

/* ============================================
   МОБИЛЬНОЕ МЕНЮ
   ============================================ */



/* ============================================
   АККОРДЕОНЫ
   ============================================ */

.accordion-item {
  border-bottom: 1px solid var(--medium-gray, #e8e8e8);
}

.accordion-item.open .accordion-header {
  color: var(--primary-green, #28a745);
}

.accordion-header {
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  padding: var(--spacing-md, 16px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  user-select: none;
}

.accordion-header:hover {
  background-color: var(--light-gray, #f5f5f5);
}

.accordion-icon {
  transition: transform 0.3s ease-in-out;
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  overflow: hidden;
}

.accordion-body {
  padding: var(--spacing-md, 16px);
  color: var(--text-gray, #666666);
  line-height: 1.6;
}

/* ============================================
   ТАБЫ
   ============================================ */

[data-tab-panel] {
  transition: opacity 0.3s ease-in-out;
  opacity: 0;
}

[data-tab-panel].active {
  opacity: 1;
}

[data-tab-button].active {
  border-bottom: 3px solid var(--accent-warm, #c4a265);
  color: var(--accent-warm, #c4a265);
}

/* ============================================
   АНИМАЦИИ
   ============================================ */

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   ИНТЕРАКТИВНЫЕ ЭЛЕМЕНТЫ
   ============================================ */

.interactive-hover {
  transition: all var(--transition-fast);
}

.interactive-hover:hover {
  background-color: var(--bg-light);
}

.border-interactive {
  transition: border-color var(--transition-fast);
}

.border-interactive:hover {
  border-color: var(--accent-warm);
}

.social-button {
  flex: 1;
  max-width: 150px;
  padding: var(--spacing-md);
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  background: none;
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
}

.social-button:hover {
  background-color: var(--bg-light);
}

.color-swatch {
  aspect-ratio: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  border: 2px solid;
  border-radius: var(--border-radius);
  transition: border-color var(--transition-fast);
}

/* ============================================
   УВЕДОМЛЕНИЯ
   ============================================ */

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  z-index: 10000;
  animation: slideIn 0.3s ease-out;
}

/* ============================================
   МОБИЛЬНОЕ МЕНЮ (Dropdown)
   ============================================ */

.hamburger {
  display: none;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hamburger::before,
.hamburger::after,
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--dark-gray);
  position: absolute;
  transition: all 0.3s ease-in-out;
}

.home-hero .hamburger::before,
.home-hero .hamburger::after,
.home-hero .hamburger span {
  background-color: var(--white);
}

.hamburger::before {
  content: '';
  top: 0;
}

.hamburger span {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger::after {
  content: '';
  bottom: 0;
}

.hamburger.menu-active::before {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.menu-active span {
  opacity: 0;
}

.hamburger.menu-active::after {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .header-cta-btn {
    display: none;
  }

  .header-nap {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-nav {
    display: flex;
  }

  .header-pill {
    font-size: var(--font-size-xs);
    padding: 6px 12px;
  }

  /* Push hamburger to right edge */
  .header-right {
    margin-left: auto;
  }
}

/* ============================================
   CATALOG SIDEBAR & CATEGORIES
   ============================================ */

/* Hide close button on desktop (JS injects it for mobile) */
.catalog-sidebar-close {
  display: none;
}

.catalog-sidebar {
  min-width: 260px;
  flex-shrink: 0;
  background: var(--white);
  padding: var(--spacing-lg);
  border-right: 2px solid var(--primary-green);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.catalog-sidebar h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--dark-gray);
  margin: 0 0 var(--spacing-md) 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-list li {
  margin: 0;
  padding: 0;
}

.category-list a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-gray);
  text-decoration: none;
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-base);
  border-left: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.category-list a:hover {
  color: var(--primary-green);
  background-color: rgba(158, 210, 0, 0.08);
  border-left-color: var(--primary-green);
  padding-left: calc(var(--spacing-md) + 4px);
}

.category-list a:active {
  color: var(--white);
  background-color: var(--primary-green);
  border-left-color: var(--primary-green);
}

.category-back {
  display: block;
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--primary-green);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  border: 1px solid var(--primary-green);
  border-radius: 4px;
  transition: all 0.3s ease;
  text-align: center;
}

.category-back:hover {
  background-color: var(--primary-green);
  color: var(--white);
  transform: translateX(-2px);
}

.category-current-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--primary-green);
  margin: var(--spacing-md) 0 var(--spacing-sm) 0;
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 2px solid var(--primary-green);
  text-transform: capitalize;
}

.category-empty-message {
  padding: var(--spacing-md);
  background-color: rgba(158, 210, 0, 0.1);
  border-radius: 4px;
  color: var(--text-gray);
  font-size: var(--font-size-sm);
  border-left: 3px solid var(--primary-green);
}

/* default hidden controls (will be visible only on small screens) */
.category-toggle-btn { display: none; }
.catalog-overlay { display: none; }

/* Mobile: off-canvas category sidebar with horizontal toggle button */
@media (max-width: 768px) {
  /* Show category toggle button on mobile */
  .category-toggle-btn { 
    display: inline-flex !important;
  }

  /* Keep page layout stacked, but sidebar will be off-canvas */
  .section:not(.questions-cta):not(.custom-order-cta) { display: block !important; }

  /* Off-canvas sidebar (hidden by default) */
  .catalog-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 260px;
    max-width: 80%;
    padding: 50px var(--spacing-md) var(--spacing-md);
    background: var(--white);
    border-right: 2px solid var(--primary-green);
    box-shadow: 2px 0 18px rgba(0,0,0,0.18);
    z-index: 1200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform 300ms ease-out;
    will-change: transform;
  }

  /* Close button inside sidebar (mobile only) */
  .catalog-sidebar-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--light-gray);
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    color: var(--dark-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 200ms ease, transform 200ms ease;
    z-index: 10;
  }
  .catalog-sidebar-close:hover {
    background: var(--medium-gray);
    transform: scale(1.1);
  }

  /* Visible state */
  .catalog-sidebar.open {
    transform: translateX(0);
  }

  /* During drag, remove transition for instant following */
  .catalog-sidebar.dragging {
    transition: none;
  }

  /* Overlay behind sidebar when open */
  .catalog-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1100;
  }
  .catalog-overlay.visible { display: block; }

  /* Horizontal toggle button above search (mobile only) */
  .category-toggle-btn {
    display: block;
    position: relative;
    width: auto;
    height: auto;
    background: transparent;
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    writing-mode: initial;
    text-orientation: initial;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    letter-spacing: normal;
    cursor: pointer;
    z-index: auto;
    box-shadow: none;
    padding: 8px 12px;
    margin-bottom: var(--spacing-md);
    transition: all 200ms ease-out;
  }

  .category-toggle-btn:hover {
    background: var(--primary-green);
    color: var(--white);
  }

  .category-toggle-btn:active {
    transform: scale(0.98);
  }

  /* During drag, remove transition for instant following */
  .category-toggle-btn.dragging {
    transition: none;
  }

  /* Adjust body/content spacing to avoid interaction with fixed controls */
  .section > .container { padding-left: 12px; padding-right: 12px; }

  /* Make category links compact on mobile */
  .category-list a { padding: 10px 12px; }

  /* Hide original sidebar within flow (so content doesn't reserve space) */
  .catalog-sidebar-placeholder { display: none; }
}

/* Animations */
@keyframes slideInCategory {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.category-list li {
  animation: slideInCategory 0.3s ease forwards;
}

.category-list li:nth-child(1) { animation-delay: 0.05s; }
.category-list li:nth-child(2) { animation-delay: 0.1s; }
.category-list li:nth-child(3) { animation-delay: 0.15s; }
.category-list li:nth-child(4) { animation-delay: 0.2s; }
.category-list li:nth-child(5) { animation-delay: 0.25s; }
.category-list li:nth-child(n+6) { animation-delay: 0.3s; }

/* Category link active state for current category */
.category-list a.active {
  color: var(--white);
  background-color: var(--primary-green);
  border-left-color: var(--primary-green);
  font-weight: var(--font-weight-bold);
}

.category-list a.active:hover {
  background-color: var(--primary-green);
  padding-left: var(--spacing-md);
}

/* ============================================
   KITCHEN CALCULATOR MODAL
   ============================================ */

/* Overlay */
.km-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  touch-action: none;
}

.km-overlay.km-open {
  display: flex;
  opacity: 1;
}

/* Modal container */
.km-modal {
  position: relative;
  background: var(--white);
  border-radius: 18px;
  width: 95%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  animation: kmSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: pan-y;
  -webkit-text-size-adjust: 100%;
}

@keyframes kmSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Close button */
.km-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--light-gray);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  padding: 0 0 2px 0;
  color: var(--text-gray);
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.km-close:hover {
  background: var(--medium-gray);
  color: var(--dark-gray);
}

/* Header */
.km-header {
  padding: 32px 32px 0;
}

.km-title {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--dark-gray);
  margin-bottom: 4px;
}

.km-subtitle {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 24px;
}

/* Progress bar */
.km-progress {
  display: flex;
  gap: 6px;
  padding: 0 32px;
  margin-bottom: 24px;
}

.km-progress-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--light-gray);
  transition: background 0.3s ease;
}

.km-progress-dot.active {
  background: var(--primary-green);
}

.km-progress-dot.done {
  background: var(--primary-green);
  opacity: 0.6;
}

/* Steps container */
.km-body {
  padding: 0 32px 32px;
}

.km-step {
  display: none;
  animation: kmFadeIn 0.3s ease;
}

.km-step.km-active {
  display: block;
}

@keyframes kmFadeIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Step title */
.km-step-title {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--dark-gray);
  margin-bottom: 20px;
}

.km-step-desc {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Form grid */
.km-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.km-row.km-2col {
  grid-template-columns: 1fr 1fr;
}

.km-row.km-1col {
  grid-template-columns: 1fr;
}

/* Form groups */
.km-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.km-label {
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.km-input,
.km-select,
.km-textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--medium-gray);
  border-radius: 10px;
  font-size: 16px;
  font-family: 'Sansation', sans-serif;
  color: var(--dark-gray);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.km-input:focus,
.km-select:focus,
.km-textarea:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(126, 178, 57, 0.12);
}

.km-input.km-error,
.km-select.km-error,
.km-textarea.km-error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.km-textarea {
  resize: vertical;
  min-height: 80px;
}

.km-file-input {
  padding: 10px 14px;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  border: 1.5px solid var(--medium-gray);
  border-radius: 10px;
  background: var(--white);
}

.km-file-input::file-selector-button {
  background: var(--primary-green);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-family: 'Sansation', sans-serif;
  font-size: 13px;
  cursor: pointer;
  margin-right: 12px;
  transition: background 0.2s;
}

.km-file-input::file-selector-button:hover {
  background: #1e3d2c;
}

/* File list with remove buttons */
.km-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.km-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 12px;
  background: var(--white);
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  font-size: 13px;
  color: var(--dark-gray);
}

.km-file-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.km-file-remove {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: var(--text-gray);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.km-file-remove:hover {
  background: #f8d7da;
  color: #c0392b;
}

/* Shape select cards */
.km-shapes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.km-shape {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border: 2px solid var(--light-gray);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  background: var(--white);
}

.km-shape:hover {
  border-color: var(--medium-gray);
  transform: translateY(-2px);
}

.km-shape.km-selected {
  border-color: var(--primary-green);
  background: rgba(126, 178, 57, 0.06);
}

.km-shape-icon {
  font-size: 32px;
  line-height: 1;
}

.km-shape-label {
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--dark-gray);
  text-align: center;
}

/* Section divider */
.km-divider {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--dark-gray);
  margin: 20px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--light-gray);
}

/* Footer buttons */
.km-footer {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--light-gray);
  margin-top: 24px;
}

.km-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  font-family: 'Sansation', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.km-btn-back {
  background: var(--light-gray);
  color: var(--text-gray);
}

.km-btn-back:hover {
  background: var(--medium-gray);
}

.km-btn-next {
  background: linear-gradient(135deg, var(--primary-green), #6eb000);
  color: var(--white);
  margin-left: auto;
}

.km-btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(110, 176, 0, 0.35);
}

.km-btn-next:active {
  transform: translateY(0);
}

.km-btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Success screen */
.km-success {
  text-align: center;
  padding: 48px 32px;
}

.km-success-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.km-success-title {
  font-size: 22px;
  font-weight: var(--font-weight-bold);
  color: var(--dark-gray);
  margin-bottom: 8px;
}

.km-success-text {
  font-size: 15px;
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Spinner */
.km-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: kmSpin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes kmSpin {
  to { transform: rotate(360deg); }
}

/* Privacy note */
.km-privacy {
  font-size: 12px;
  color: var(--light-text);
  margin-top: 12px;
  line-height: 1.4;
}

.km-privacy a {
  color: var(--primary-green);
  text-decoration: underline;
}

.km-privacy-check {
  margin-top: 14px;
}

.km-privacy-check.km-error-text label span {
  color: #e74c3c;
}

.km-privacy-check.km-error-text input[type="checkbox"] {
  outline: 2px solid #e74c3c;
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 600px) {
  .km-overlay.km-open {
    align-items: stretch;
  }

  .km-modal {
    width: 100%;
    max-width: 100%;
    max-height: none;
    min-height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .km-body {
    padding: 0 20px 24px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
  }

  .km-header { padding: 24px 20px 0; }
  .km-progress { padding: 0 20px; }
  .km-title { font-size: 20px; }

  .km-row {
    grid-template-columns: 1fr !important;
  }

  .km-shapes {
    grid-template-columns: repeat(2, 1fr);
  }

  .km-footer {
    flex-direction: column;
    flex-shrink: 0;
  }

  .km-btn {
    width: 100%;
    text-align: center;
  }

  .km-btn-next {
    margin-left: 0;
  }

  /* Prevent horizontal overflow on file upload */
  .km-file-input {
    max-width: 100%;
    overflow: hidden;
  }
  .km-file-item {
    max-width: 100%;
  }
  .km-file-item-name {
    max-width: calc(100% - 40px);
  }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE ADAPTATION
   All screen sizes: 1440px+ → 1200px → 992px → 768px → 576px → 480px → 360px
   ============================================ */

/* ---------- LARGE DESKTOP (1440px+) ---------- */
@media (min-width: 1441px) {
  .container {
    max-width: 1320px;
  }
  header > .container {
    max-width: 1440px;
  }
}

/* ---------- WIDE LAPTOP (≤1350px) ---------- */
@media (max-width: 1350px) {
  header > .container {
    max-width: 100%;
  }
  .header-nav {
    gap: 4px;
  }
  .header-nav a {
    font-size: 14px;
    padding: 7px 8px;
  }
  .header-pill {
    padding: 7px 24px;
    font-size: 13px;
  }
  .header-cta-btn {
    padding: 7px 16px;
    font-size: 13px;
  }
  .header-right {
    gap: var(--spacing-sm);
  }
  .header-nap {
    max-width: 190px;
  }
  .header-phone {
    font-size: 13px;
  }
  .header-address-lines .addr-city,
  .header-address-lines .addr-line {
    font-size: 11px;
  }
}

/* ---------- LAPTOP / SMALL DESKTOP (≤1200px) ---------- */
@media (max-width: 1200px) {
  .container {
    max-width: 1100px;
  }
  header > .container {
    max-width: 100%;
  }

  /* Header: shrink everything proportionally */
  .header-row {
    padding: 18px 0;
  }
  .home-hero .header-row {
    padding: 18px 16px;
  }
  .header-nav {
    gap: 2px;
  }
  .header-nav a {
    font-size: 13px;
    padding: 6px 6px;
  }
  .header-pill {
    padding: 6px 16px;
    font-size: 13px;
  }
  .header-cta-btn {
    padding: 6px 14px;
    font-size: 12px;
  }
  .header-nap {
    max-width: 170px;
  }
  .header-phone {
    font-size: 12px;
  }
  .header-address-lines .addr-city,
  .header-address-lines .addr-line {
    font-size: 10px;
  }
  .logo img {
    height: 40px;
  }
  .header-left {
    gap: var(--spacing-sm);
  }
  .header-right {
    gap: var(--spacing-sm);
  }

  /* Hero: center content */
  .hero-content {
    align-items: center;
    text-align: center;
  }
  .hero-content::before {
    right: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
  }
  .hero-headline {
    font-size: 52px;
  }
  .hero-offer {
    font-size: 17px;
  }
  .hero-benefits {
    justify-content: center;
    margin-left: 0;
  }
  .hero-buttons {
    justify-content: center;
  }
}

/* ---------- MEDIUM LAPTOP (≤1100px) ---------- */
@media (max-width: 1100px) {
  .header-nav a {
    font-size: 12px;
    padding: 5px 4px;
  }
  .header-pill {
    padding: 5px 12px;
    font-size: 12px;
  }
  .header-cta-btn {
    padding: 5px 10px;
    font-size: 11px;
  }
  .header-nap {
    max-width: 145px;
  }
  .header-phone {
    font-size: 11px;
  }
  .header-address-lines .addr-city,
  .header-address-lines .addr-line {
    font-size: 9px;
  }
  .header-address-lines {
    max-width: 145px;
  }
  .logo img {
    height: 36px;
  }
  .header-left {
    gap: var(--spacing-xs);
  }
  .header-right {
    gap: var(--spacing-xs);
  }
}

/* ---------- TABLET LANDSCAPE (≤992px) ---------- */
@media (max-width: 992px) {
  .container {
    max-width: 100%;
    padding: 0 var(--spacing-md);
  }

  /* Header: shrink even more — all elements still visible */
  .header-row {
    padding: 14px 0;
  }
  .home-hero .header-row {
    padding: 14px 12px;
  }
  .header-nav {
    gap: 0;
  }
  .header-nav a {
    font-size: 11px;
    padding: 4px 3px;
  }
  .header-pill {
    padding: 4px 10px;
    font-size: 11px;
  }
  .header-cta-btn {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 6px;
  }
  .header-nap {
    max-width: 120px;
  }
  .header-phone {
    font-size: 10px;
  }
  .header-address-lines .addr-city,
  .header-address-lines .addr-line {
    font-size: 8px;
    line-height: 1.3;
  }
  .header-address-lines {
    max-width: 120px;
  }
  .logo img {
    height: 32px;
  }

  /* Hero — centered */
  .hero-content {
    align-items: center;
    text-align: center;
  }
  .hero-content::before {
    right: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
  }
  .hero-headline {
    font-size: 44px;
    max-width: 500px;
  }
  .hero-offer {
    font-size: 16px;
    max-width: 500px;
  }
  .hero-benefits {
    justify-content: center;
    margin-left: 0;
  }
  .hero-benefits li {
    max-width: 150px;
    font-size: var(--font-size-sm);
  }
  .hero-buttons {
    justify-content: center;
  }

  /* CTA section */
  .cta-title {
    font-size: var(--font-size-2xl);
  }
  .cta-text {
    font-size: var(--font-size-base);
  }

  /* Categories grid */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* About page 2-col grids */
  .grid-2-col {
    grid-template-columns: 1fr;
  }

  /* Footer – 2 columns instead of 3+ */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- TABLET PORTRAIT (576px – 768px) ---------- */
@media (max-width: 768px) {
  /* Base typography – already has some overrides, adding more specificity */
  :root {
    --spacing-xxl: 32px;
    --spacing-xl: 24px;
  }

  /* Container breathing room */
  .container {
    max-width: 100%;
    padding: 0 var(--spacing-sm);
  }

  /* Section spacing reduction */
  .section {
    padding: var(--spacing-lg) 0;
  }

  /* Header adjustments for mobile */
  .header-row {
    padding: 12px 0;
  }
  .home-hero .header-row {
    padding: 12px 14px;
  }
  .home-hero header {
    top: 12px;
    width: calc(100% - 24px);
    border-radius: 10px;
  }

  /* Logo smaller on mobile */
  .logo img {
    height: 30px;
    width: auto;
  }

  /* Hero mobile improvements */
  .hero-content::before {
    width: 120%;
    right: -20%;
    height: 90%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.35) 50%, transparent 70%);
  }
  .hero-benefits {
    justify-content: flex-start;
    gap: var(--spacing-md);
  }
  .hero-benefits li {
    max-width: 130px;
    font-size: 13px;
  }
  .hero-benefits li::before {
    min-width: 36px;
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .hero-cta,
  .hero-cta-outline {
    padding: 14px 24px;
    font-size: var(--font-size-sm);
  }

  /* Modal content responsive */
  .modal-content {
    width: 92vw !important;
    max-width: 92vw !important;
    padding: 24px 16px !important;
  }
  .modal-content h2 {
    font-size: var(--font-size-xl);
  }

  /* Gallery modal on mobile */
  #gallery-modal .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
  #gallery-modal .gallery-wrap {
    padding: 12px;
  }
  #gallery-modal .gallery-prev,
  #gallery-modal .gallery-next {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  #gallery-modal .modal-close {
    width: 36px;
    height: 36px;
    font-size: 22px;
    right: 8px;
    top: 8px;
  }
  #gallery-modal .gallery-thumbs-row {
    padding: 8px 12px;
  }
  #gallery-modal .gallery-thumbs-row img {
    width: 48px !important;
    height: 48px !important;
  }

  /* Catalog sidebar — full-width on small mobile */
  .catalog-sidebar {
    min-width: 100%;
    width: 100%;
    max-width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--primary-green);
    padding: var(--spacing-md);
    padding-top: 50px; /* space for close button */
  }

  /* Accordion */
  .accordion-header {
    padding: var(--spacing-md);
    font-size: var(--font-size-sm);
  }
  .accordion-body {
    padding: var(--spacing-md);
    font-size: var(--font-size-sm);
  }

  /* Profile form */
  .form-input,
  .form-textarea,
  .form-select {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  /* Footer final */
  .footer-content {
    grid-template-columns: 1fr;
  }

  /* Breadcrumb text sizing */
  .breadcrumb {
    font-size: var(--font-size-sm);
  }
  .breadcrumb-item a,
  .breadcrumb-item.active {
    font-size: var(--font-size-sm);
  }

  /* Categories grid */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--spacing-md) !important;
  }

  /* Table-like elements: allow horizontal scroll */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---------- MOBILE LANDSCAPE (480px – 576px) ---------- */
@media (max-width: 576px) {
  h1 {
    font-size: var(--font-size-2xl);
  }
  h2 {
    font-size: var(--font-size-xl);
  }
  h3 {
    font-size: var(--font-size-lg);
  }
  h4 {
    font-size: var(--font-size-base);
  }

  /* Tighter container */
  .container {
    padding: 0 var(--spacing-xs);
  }

  .section {
    padding: var(--spacing-lg) 0;
  }

  /* Hero */
  .hero-headline {
    font-size: 40px;
    letter-spacing: -0.5px;
  }
  .hero-offer {
    font-size: 15px;
    margin-bottom: var(--spacing-md);
  }
  .hero-cta,
  .hero-cta-outline {
    padding: 12px 20px;
    font-size: 14px;
  }
  .hero-benefits li {
    max-width: 110px;
    font-size: 12px;
  }

  /* Product cards */
  .product-card {
    border-radius: 6px;
  }
  .product-info {
    padding: var(--spacing-sm);
  }
  .product-title {
    font-size: var(--font-size-sm);
  }

  /* CTA section */
  .cta-title {
    font-size: var(--font-size-xl);
  }
  .cta-text {
    font-size: var(--font-size-sm);
  }

  /* Buttons */
  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
  }
  .btn-primary {
    padding: var(--spacing-sm) var(--spacing-md);
  }
}

/* ---------- SMALL MOBILE (≤480px) ---------- */
@media (max-width: 480px) {
  /* Sections */
  .section {
    padding: var(--spacing-md) 0;
  }

  /* Header */
  .header-row {
    padding: 12px 0;
  }
  .home-hero .header-row {
    padding: 12px;
  }
  .header-pill {
    font-size: 11px;
    padding: 5px 10px;
  }
  .logo img {
    height: 36px;
  }

  /* Hero */
  .hero-content {
    padding-top: 60px;
  }
  .hero-headline {
    font-size: 24px;
    margin-bottom: var(--spacing-md);
  }
  .hero-offer {
    font-size: 14px;
  }
  .hero-benefits {
    gap: var(--spacing-sm);
  }
  .hero-benefits li {
    max-width: 100px;
    font-size: 11px;
    gap: 6px;
  }
  .hero-benefits li::before {
    min-width: 30px;
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  /* Categories */
  .categories-grid {
    grid-template-columns: 1fr !important;
  }

  /* Modals — full-screen on small phones */
  .modal-content {
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    padding: 20px 12px !important;
    max-height: 100vh;
    overflow-y: auto;
  }

  /* CTA section */
  .cta-container {
    padding: 0 var(--spacing-xs);
  }
  .cta-title {
    font-size: var(--font-size-lg);
  }
  .cta-text {
    font-size: var(--font-size-sm);
  }

  /* Breadcrumb */
  .breadcrumb {
    font-size: var(--font-size-xs);
    gap: 4px;
  }

  /* Mobile nav links bigger touch targets */
  .mobile-nav a {
    padding: var(--spacing-md) var(--spacing-md);
    font-size: var(--font-size-base);
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  /* Footer */
  .footer-bottom {
    text-align: center;
  }
  .footer-copy {
    font-size: var(--font-size-xs);
  }
}

/* ---------- VERY SMALL MOBILE (≤360px) ---------- */
@media (max-width: 360px) {
  .container {
    padding: 0 8px;
  }

  .header-pill {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 6px;
  }
  .logo img {
    height: 32px;
  }

  .hero-headline {
    font-size: 20px;
    margin-bottom: var(--spacing-sm);
  }
  .hero-offer {
    font-size: 12px;
    margin-bottom: var(--spacing-sm);
  }
  .hero-cta,
  .hero-cta-outline {
    padding: 10px 16px;
    font-size: 13px;
  }

  /* Benefits must fit in single row on 360px */
  .hero-benefits {
    flex-wrap: nowrap;
    gap: var(--spacing-xs);
    justify-content: center;
    margin-bottom: var(--spacing-md);
  }
  .hero-benefits li {
    max-width: 90px;
    font-size: 10px;
    gap: 4px;
    line-height: 1.2;
  }
  .hero-benefits li::before {
    min-width: 26px;
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  h1 {
    font-size: var(--font-size-xl);
  }
  h2 {
    font-size: var(--font-size-lg);
  }

  .product-title {
    font-size: var(--font-size-xs);
  }
}

/* ============================================
   MOBILE MENU ENHANCEMENTS
   ============================================ */

/* Frosted glass mobile nav on home page */
.home-hero .mobile-nav {
  background: rgba(30, 30, 30, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* On home page the header is absolute/frosted — menu must not be clipped */
@media (max-width: 768px) {
  .home-hero header {
    overflow: visible;
  }
  .home-hero .mobile-nav.menu-open {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}
.home-hero .mobile-nav a {
  color: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.home-hero .mobile-nav a:hover,
.home-hero .mobile-nav a.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.home-hero .mobile-nav .mobile-cta {
  background: linear-gradient(135deg, var(--primary-green), #6eb000);
  color: var(--white);
  border-bottom: none;
}
.home-hero .mobile-nav .mobile-cta:hover {
  background: linear-gradient(135deg, #6eb000, var(--primary-green));
}

/* NAP info inside mobile menu */
.mobile-nav-nap {
  display: none;
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--light-gray);
  text-align: center;
}
.mobile-nav-nap a {
  display: block;
  color: var(--primary-green);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-xs);
  border-bottom: none;
}
.mobile-nav-nap .mobile-address {
  color: var(--text-gray);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .mobile-nav-nap {
    display: block;
  }
}

.home-hero .mobile-nav-nap {
  border-top-color: rgba(255, 255, 255, 0.08);
}
.home-hero .mobile-nav-nap a {
  color: var(--accent-warm);
}
.home-hero .mobile-nav-nap .mobile-address {
  color: rgba(255, 255, 255, 0.65);
}

/* ============================================
   GLOBAL RESPONSIVE SAFETY NETS
   ============================================ */

/* Prevent any image from overflowing */
img {
  max-width: 100%;
  height: auto;
}

/* Prevent text from overflowing containers */
h1, h2, h3, h4, h5, h6, p, span, a, li, td, th, label, button {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Ensure all inline-styled grids can't overflow on small screens */
@media (max-width: 768px) {
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  /* Exclude specific elements that should keep their grid */
  .products-grid[style*="grid-template-columns"],
  .footer-content[style*="grid-template-columns"] {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  }
}