/* iOS 26 Design System - Премиальные Воздушные Шары */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

/* Добавьте это в начало файла style.css, если их там нет */

/* 🌸 Spring Theme - Лёгкие весенние акценты */
.spring-petals-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  opacity: 0.6;
}

.petal {
  position: absolute;
  top: -50px;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #ffb7c5 0%, #ffcfe0 100%);
  border-radius: 50% 0 50% 50%;
  opacity: 0.8;
  animation: fall linear infinite;
  filter: blur(1px);
}

.petal:nth-child(odd) {
  background: linear-gradient(135deg, #ffd1dc 0%, #ffe4ed 100%);
  width: 10px;
  height: 10px;
}

.petal:nth-child(3n) {
  background: linear-gradient(135deg, #c9e4ca 0%, #e8f5e9 100%);
  border-radius: 50% 50% 0 50%;
  width: 8px;
  height: 8px;
}

@keyframes fall {
  0% {
    transform: translateY(-50px) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) translateX(50px);
    opacity: 0;
  }
}

/* 🌸 Spring Glow Effects */
.spring-glow {
  position: relative;
}

.spring-glow::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 183, 197, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: spring-pulse 4s ease-in-out infinite;
}

.spring-glow::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: -15px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(168, 230, 168, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: spring-pulse 4s ease-in-out infinite 2s;
}

@keyframes spring-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* 🌼 Spring Corner Flowers */
.spring-corner {
  position: relative;
}

.spring-corner::before {
  content: '🌸';
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 24px;
  opacity: 0.6;
  animation: spring-wiggle 3s ease-in-out infinite;
  pointer-events: none;
}

.spring-corner::after {
  content: '🌿';
  position: absolute;
  bottom: -8px;
  left: -8px;
  font-size: 20px;
  opacity: 0.5;
  animation: spring-wiggle 3s ease-in-out infinite 1.5s;
  pointer-events: none;
}

@keyframes spring-wiggle {
  0%, 100% {
    transform: rotate(-5deg) scale(1);
  }
  50% {
    transform: rotate(5deg) scale(1.1);
  }
}

/* 🌱 Spring Breeze Effect for text */
.spring-breeze {
  animation: spring-breeze 8s ease-in-out infinite;
}

@keyframes spring-breeze {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(2px);
  }
  75% {
    transform: translateX(-2px);
  }
}

/* Spring-enhanced backgrounds */
.spring-morning-bg {
  background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,250,252,0.9) 30%, rgba(245,255,248,0.8) 60%, rgba(255,255,255,0.95) 100%);
}

.spring-card-enhanced {
  background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(255,248,250,0.9) 100%);
  border: 1px solid rgba(255, 183, 197, 0.15);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 0 40px rgba(255, 183, 197, 0.1);
}

/* Spring pollen/dust particles */
.spring-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 220, 150, 0.4);
  border-radius: 50%;
  animation: particle-float 20s linear infinite;
}

.particle:nth-child(2n) {
  background: rgba(255, 183, 197, 0.3);
  width: 3px;
  height: 3px;
}

@keyframes particle-float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-10vh) translateX(50px);
    opacity: 0;
  }
}

/* Весенние акценты для карточек товаров */
.spring-accent {
  position: relative;
}

.spring-accent::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: radial-gradient(circle, #ffb7c5 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}

/* Лёгкий весенний градиент для фонов */
.spring-gradient-bg {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,248,250,0.8) 50%, rgba(240,255,245,0.6) 100%);
}

/* Весенние микро-анимации для иконок */
.spring-bloom {
  animation: bloom 4s ease-in-out infinite;
}

@keyframes bloom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

:root {
  /* iOS 26 Color Palette */
  --ios-background: #f2f4f8;
  --ios-surface: rgba(255, 255, 255, 0.85);
  --ios-surface-solid: #ffffff;
  --ios-surface-elevated: rgba(255, 255, 255, 0.92);
  --ios-surface-glass: rgba(255, 255, 255, 0.65);
  --ios-primary: #007AFF;
  --ios-primary-light: #5AC8FA;
  --ios-secondary: #8E8E93;
  --ios-accent: #AF52DE;
  --ios-accent-light: #BF5AF2;
  --ios-success: #34C759;
  --ios-warning: #FF9500;
  --ios-danger: #FF3B30;
  --ios-label: #000000;
  --ios-label-secondary: rgba(60, 60, 67, 0.6);
  --ios-label-tertiary: rgba(60, 60, 67, 0.3);
  --ios-separator: rgba(60, 60, 67, 0.1);
  --ios-blur: 40px;
  --ios-radius-small: 12px;
  --ios-radius-medium: 16px;
  --ios-radius-large: 20px;
  --ios-radius-extra: 28px;
  --ios-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --ios-shadow-elevated: 0 12px 48px rgba(0, 0, 0, 0.12);
  --ios-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --ios-transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  scroll-behavior: smooth;
  background-color: var(--ios-background);
  padding-top: 88px;
  color: var(--ios-label);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  body {
    padding-top: 72px;
    font-size: 15px;
    line-height: 1.5;
  }
}

/* iOS Glass Navbar */
custom-navbar {
  --navbar-height: 88px;
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--ios-surface-glass);
  backdrop-filter: saturate(180%) blur(var(--ios-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--ios-blur));
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  z-index: 1000;
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
}

custom-navbar nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

custom-navbar .nav-left,
custom-navbar .nav-right {
  flex: 1;
}

custom-navbar .logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--ios-label);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

custom-navbar .logo img {
  height: 48px;
  width: auto;
  border-radius: var(--ios-radius-small);
}

custom-navbar .nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

custom-navbar .nav-links a {
  color: var(--ios-label-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: var(--ios-radius-medium);
  transition: var(--ios-transition-fast);
  position: relative;
}

custom-navbar .nav-links a:hover {
  color: var(--ios-label);
  background: transparent;
}

custom-navbar .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--ios-primary);
  border-radius: 3px;
  transition: var(--ios-transition-fast);
}

custom-navbar .nav-links a:hover::after {
  width: 20px;
}

custom-navbar .cart-btn {
  background: linear-gradient(135deg, #06b6d4 0%, #84ccf8 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--ios-radius-extra);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}

custom-navbar .cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

custom-navbar .cart-btn:active {
  transform: translateY(0) scale(0.98);
}

custom-navbar .cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--ios-danger);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.95);
  z-index: 10;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: none;
  pointer-events: none;
}

/* Mobile Navbar */
@media (max-width: 768px) {
  custom-navbar {
    --navbar-height: 72px;
    --ios-blur: 20px;
  }

  custom-navbar nav {
    padding: 0 16px;
  }

  custom-navbar .nav-links {
    display: none;
  }

  custom-navbar .logo {
    font-size: 20px;
    padding: 8px 0;
  }

  custom-navbar .logo img {
    height: 36px;
  }

  custom-navbar .cart-btn {
    padding: 10px 18px;
    font-size: 14px;
  }

  custom-navbar .cart-count {
    width: 20px;
    height: 20px;
    font-size: 11px;
    top: -5px;
    right: -5px;
  }
}

/* Hero Section with Glass Effect */
section.relative.overflow-hidden.min-h-screen {
  background: linear-gradient(to bottom, #e6f0ff 0%, rgba(230, 240, 255, 0.4) 50%, transparent 100%);
  position: relative;
  overflow: hidden;
  min-height: 90vh;
}

.balloon-animation {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;

  background:
    radial-gradient(ellipse at top,
      rgba(255, 255, 255, 0.35) 0%,
      rgba(255, 255, 255, 0.18) 25%,
      rgba(255, 255, 255, 0.05) 45%,
      transparent 60%),
    linear-gradient(to bottom,
      #dff3ff 0%,
      rgba(21, 169, 238, 0.637) 3%,
      transparent 95%);
}

.balloon-animation::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse at 30% 20%,
      rgba(255, 255, 255, 0.35),
      transparent 60%),
    radial-gradient(ellipse at 70% 25%,
      rgba(255, 255, 255, 0.25),
      transparent 65%);
  opacity: 2;
  animation: mistMove 28s ease-in-out infinite;
  pointer-events: none;
}

.balloon {
  position: absolute;
  width: 240px;
  height: auto;
  will-change: transform;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.12));
  transition: var(--ios-transition);
  pointer-events: none;
}

.balloon-1 {
  top: 13%;
  right: 11%;
  width: 320px;
  animation: float-1 6s ease-in-out infinite;
  animation-delay: 0s;
  animation-fill-mode: both;
}

.balloon-2 {
  top: 44%;
  left: 22%;
  width: 280px;
  animation: float-2 6s ease-in-out infinite;
  animation-delay: 1s;
  animation-fill-mode: both;
}

.balloon-3 {
  bottom: 40%;
  left: 7%;
  width: 320px;
  animation: float-3 6s ease-in-out infinite;
  animation-delay: 2s;
  animation-fill-mode: both;
}

.balloon-4 {
  top: 50%;
  right: 20%;
  width: 230px;
  animation: float-4 6s ease-in-out infinite;
  animation-delay: 3s;
  animation-fill-mode: both;
}

@keyframes float-1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-24px) rotate(2deg); }
  66%       { transform: translateY(-12px) rotate(-2deg); }
}

@keyframes float-2 {
  0%, 100% { transform: translateY(0) rotate(-12deg); }
  33%       { transform: translateY(-24px) rotate(-10deg); }
  66%       { transform: translateY(-12px) rotate(-14deg); }
}

@keyframes float-3 {
  0%, 100% { transform: translateY(0) rotate(10deg); }
  33%       { transform: translateY(-24px) rotate(12deg); }
  66%       { transform: translateY(-12px) rotate(8deg); }
}

@keyframes float-4 {
  0%, 100% { transform: translateY(0) rotate(5deg); }
  33%       { transform: translateY(-24px) rotate(8deg); }
  66%       { transform: translateY(-12px) rotate(10deg); }
}

.container.mx-auto.px-6.py-20.z-10.text-center {
  position: relative;
  z-index: 10;
  background: transparent;
  padding-top: 40px;
  padding-bottom: 60px;
}

.container.mx-auto.px-6.py-20.z-10.text-center h1 {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: #000000;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.container.mx-auto.px-6.py-20.z-10.text-center p {
  font-size: 20px;
  color: #000000;
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Mobile Hero */
@media (max-width: 768px) {
  section.relative.overflow-hidden.min-h-screen {
    min-height: 80vh;
  }

  .balloon {
    width: 120px !important;
  }

  .balloon-1 {
    top: 13%;
    right: 5%;
    width: 300px;
  }

  .balloon-2 {
    top: 50%;
    left: 5%;
    width: 220px;
  }

  .balloon-3 {
    bottom: 60%;
    left: 2%;
    width: 155px;
  }

  .balloon-4 {
    top: 50%;
    right: 5%;
    width: 120px;
  }

  .container.mx-auto.px-6.py-20.z-10.text-center {
    padding: 40px 20px;
  }

  .container.mx-auto.px-6.py-20.z-10.text-center h1 {
    font-size: 36px;
    margin-bottom: 16px;
  }

  .container.mx-auto.px-6.py-20.z-10.text-center p {
    font-size: 16px;
    padding: 0 10px;
    margin-bottom: 30px;
  }

  .container.mx-auto.px-6.py-20.z-10.text-center a.inline-block {
    padding: 14px 28px;
    font-size: 16px;
  }
}

/* Adjust for very small screens */
@media (max-width: 480px) {
  .container.mx-auto.px-6.py-20.z-10.text-center h1 {
    font-size: 32px;
  }

  .balloon {
    width: 100px !important;
  }
}

/* iOS Glass Buttons - Consistent Gradient Hover Style */
a.inline-block,
button[type="submit"],
button.bg-cyan-500,
.add-to-cart,
.checkout-btn,
.ios-primary-btn {
  padding: 16px 32px;
  border-radius: var(--ios-radius-extra);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Gradient on hover for ALL buttons */
a.inline-block:hover,
button[type="submit"]:hover,
button.bg-cyan-500:hover,
.add-to-cart:hover,
.checkout-btn:hover,
.ios-primary-btn:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, var(--ios-primary) 0%, var(--ios-primary-light) 100%);
  color: white;
  box-shadow: var(--ios-shadow-elevated);
}

/* Common hover effects */
a.inline-block:hover::after,
button[type="submit"]:hover::after,
button.bg-cyan-500:hover::after,
.add-to-cart:hover::after,
.checkout-btn:hover::after,
.ios-primary-btn:hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
  opacity: 1;
  pointer-events: none;
}

.add-to-cart {
  position: relative;
  /* обязательно для ::after */
}

.add-to-cart:hover {
  background: linear-gradient(135deg, var(--ios-primary) 0%, var(--ios-primary-light) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

.add-to-cart-btn:disabled,
.ios-primary-btn:disabled,
.add-to-cart-btn[disabled],
.ios-primary-btn[disabled] {
  background: #d1d5db !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}
.add-to-cart-btn:disabled:hover,
.ios-primary-btn:disabled:hover {
  background: #d1d5db !important;
  transform: none !important;
}

.add-to-cart::after {
  display: none;
}

a.inline-block:active,
button[type="submit"]:active,
button.bg-cyan-500:active,
.add-to-cart:active,
.checkout-btn:active {
  transform: translateY(-2px) scale(0.98);
}

a.inline-block::after,
button[type="submit"]::after,
button.bg-cyan-500::after,
.add-to-cart::after,
.checkout-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: var(--ios-transition-fast);
}

a.inline-block:hover::after,
button[type="submit"]:hover::after,
button.bg-cyan-500:hover::after,
.add-to-cart:hover::after,
.checkout-btn:hover::after {
  opacity: 1;
}

/* Primary Action Button */
a.inline-block.bg-cyan-500,
button.bg-cyan-500 {
  background: linear-gradient(135deg, var(--ios-primary) 0%, var(--ios-primary-light) 100%);
  color: white;
  border: none;
}

/* Mobile buttons */
@media (max-width: 768px) {

  a.inline-block,
  button[type="submit"],
  button.bg-cyan-500,
  .add-to-cart,
  .checkout-btn,
  .ios-primary-btn {
    padding: 14px 24px;
    font-size: 15px;
    border-radius: var(--ios-radius-large);
  }
}

/* iOS Glass Cards */
.product-card,
.work-item,
.bg-gray-50,
.bg-white,
.bg-gray-200 {
  background: var(--ios-surface-elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--ios-radius-large);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--ios-shadow);
  transition: var(--ios-transition);
  overflow: hidden;
}

/*** НОВАЯ КАРТОЧКА ТОВАРА В КАТАЛОГЕ (iOS стиль) - ИСПРАВЛЕННАЯ ГЕОМЕТРИЯ ***/
.product-card.ios-card {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  height: auto;
  background: var(--ios-surface-elevated);
  border-radius: var(--ios-radius-large);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--ios-shadow);
  overflow: hidden;
  transition: var(--ios-transition);
  cursor: pointer;
}

.product-card.ios-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--ios-shadow-elevated);
  border-color: rgba(255, 255, 255, 0.95);
}

/* Верхний блок: изображение */
.product-card-image {
  flex: 0 0 auto;
  height: 280px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Нижний блок: контент */
.product-card-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  background: transparent;
  height: auto;
  min-height: 240px;
}

.product-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ios-label);
  line-height: 1.4;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
}

.product-card-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--ios-primary);
  margin: 0 0 12px 0;
  flex-shrink: 0;
}

.product-card-description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ios-label-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
  min-height: 0;
  padding: 8px 0;
}

/* Блок управления - ИСПРАВЛЕНО: участвует в normal flow */
.product-card-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
  flex-shrink: 0;
  height: auto;
}

.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.02);
  padding: 12px;
  border-radius: var(--ios-radius-medium);
  border: 1px solid var(--ios-separator);
  gap: 12px;
}

.quantity-btn {
  background: var(--ios-surface-elevated);
  border: 1px solid var(--ios-separator);
  color: var(--ios-label);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--ios-transition-fast);
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.quantity-btn:hover {
  background: var(--ios-surface-solid);
  border-color: var(--ios-primary);
  color: var(--ios-primary);
  transform: translateY(-1px);
}

.quantity-input-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-input {
  width: 80px;
  background: var(--ios-surface-elevated);
  border: 1px solid var(--ios-separator);
  border-radius: var(--ios-radius-small);
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ios-label);
  text-align: center;
  transition: var(--ios-transition-fast);
  backdrop-filter: blur(20px);
  -moz-appearance: textfield;
}

.quantity-input:focus {
  outline: none;
  border-color: var(--ios-primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
  background: var(--ios-surface-solid);
}

/* Убрать стрелки у input[type=number] */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Кнопка "Добавить в корзину" – всегда видимая, в normal flow */
.ios-primary-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--ios-primary) 0%, var(--ios-primary-light) 100%);
  color: white;
  border: none;
  padding: 16px;
  border-radius: var(--ios-radius-medium);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--ios-transition);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  margin-top: 0;
  flex-shrink: 0;
}

.ios-primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

.ios-primary-btn:active {
  transform: translateY(0) scale(0.98);
}

.ios-primary-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: var(--ios-transition-fast);
}

.ios-primary-btn:hover::after {
  opacity: 1;
}

/* Мобильная адаптация карточек товаров */
@media (max-width: 768px) {
  .product-card.ios-card {
    min-height: auto;
    height: auto;
    max-width: 100%;
  }

  .product-card-image {
    height: 200px;
  }

  .product-card-content {
    padding: 16px;
    min-height: auto;
  }

  .product-card-title {
    font-size: 16px;
    -webkit-line-clamp: 2;
  }

  .product-card-price {
    font-size: 20px;
  }

  .product-card-description {
    font-size: 13px;
    -webkit-line-clamp: 2;
    margin-bottom: 12px;
  }

  .product-card-controls {
    gap: 12px;
  }

  .quantity-selector {
    padding: 10px;
  }

  .quantity-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .quantity-input {
    width: 60px;
    padding: 8px;
    font-size: 15px;
  }

  .ios-primary-btn {
    padding: 14px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .product-card.ios-card {
    min-height: auto;
  }

  .product-card-image {
    height: 180px;
  }

  .product-card-content {
    padding: 14px;
  }
}

/* Удаляем старые стили overlay */
.work-item {
  display: none;
}

.work-overlay {
  display: none !important;
}

/* iOS Glass Modals */
#img-modal,
#order-popup {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#img-modal .max-w-\[90\%\],
#order-popup .bg-white {
  background: var(--ios-surface-elevated);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  border-radius: var(--ios-radius-large);
}

/* iOS Glass Sidebar */
cart-sidebar {
  background: var(--ios-surface-glass);
  backdrop-filter: saturate(180%) blur(var(--ios-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--ios-blur));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--ios-shadow-elevated);
}

cart-sidebar .cart-sidebar {
  background: transparent;
}

cart-sidebar .cart-item-card {
  background: var(--ios-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--ios-radius-medium);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* Каталог: layout-обёртка для sticky-сайдбара */
.catalog-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

@media (min-width: 1024px) {
  .catalog-layout {
    flex-direction: row;
  }
}

/* iOS Glass Filters Panel */
.filters-panel {
  background: var(--ios-surface-glass);
  backdrop-filter: saturate(180%) blur(var(--ios-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--ios-blur));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--ios-shadow);
  position: relative;
  z-index: 40;
}

/* Sticky-сайдбар на десктопе */
@media (min-width: 1024px) {
  .filters-panel {
    position: sticky;
    top: calc(88px + 16px);
    max-height: calc(100vh - 88px - 32px);
    overflow-y: auto;
    scroll-behavior: smooth;
    width: 320px;
    flex-shrink: 0;
    /* Скрываем полосу прокрутки во всех браузерах */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .filters-panel::-webkit-scrollbar {
    display: none;
  }
}

.filter-section {
  border-bottom: 1px solid var(--ios-separator);
}

.accordion-header {
  color: var(--ios-label);
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 0;
}

.accordion-content {
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--ios-radius-small);
  padding: 12px;
  margin-top: 8px;
}

/* Стили для многоуровневых аккордеонов */
.nested-accordion-header {
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--ios-label-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nested-accordion-header:hover {
  color: var(--ios-primary);
}

.nested-accordion-icon {
  transition: transform 0.2s ease;
  width: 18px;
  height: 18px;
}

.nested-accordion-icon.rotate-90 {
  transform: rotate(90deg);
}

.nested-accordion-content {
  transition: all 0.2s ease;
  border-left: 2px solid var(--ios-separator);
  padding-left: 0.75rem;
  margin-left: 0.5rem;
  margin-bottom: 0.5rem;
}

.nested-accordion-content label {
  display: flex;
  align-items: center;
  padding: 0.35rem 0;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ios-label-secondary);
  transition: color 0.2s ease;
}

.nested-accordion-content label:hover {
  color: var(--ios-primary);
}

.nested-accordion-content .filter-checkbox {
  margin-right: 0.5rem;
  width: 16px;
  height: 16px;
  accent-color: var(--ios-primary);
}

.nested-filter-section {
  margin-bottom: 0.25rem;
}

.filter-checkbox {
  accent-color: var(--ios-primary);
  width: 18px;
  height: 18px;
}

.filter-checkbox+span {
  color: var(--ios-label-secondary);
  font-size: 14px;
  transition: var(--ios-transition-fast);
}

.filter-checkbox:checked+span {
  color: var(--ios-label);
  font-weight: 500;
}


/* =========================================================
   МОБИЛЬНАЯ ПАНЕЛЬ ФИЛЬТРОВ
   ========================================================= */

/* Кнопка "Фильтры" — полоска сверху */
.mobile-filter-bar {
  display: none;
}

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

/* Счётчик активных фильтров на кнопке */
.filter-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: #fff;
  color: var(--ios-primary);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  margin-left: 4px;
}

/* Overlay */
.filters-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 998;
  transition: background 0.3s ease;
  pointer-events: none;
}

.filters-overlay--active {
  display: block;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

/* Мобильная панель */
@media (max-width: 768px) {
  .filters-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 340px;
    height: 100vh;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-radius: 0 20px 20px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .filters-mobile--open {
    transform: translateX(0);
  }

  /* Скроллируемая область фильтров */
  .filters-mobile__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
  }

  .filters-mobile__body::-webkit-scrollbar {
    width: 4px;
  }

  .filters-mobile__body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
  }

  /* Липкий футер с кнопками */
  .filters-mobile__footer {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: var(--ios-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--ios-separator);
    flex-shrink: 0;
  }

  .filters-mobile__apply-btn {
    flex: 1;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--ios-primary) 0%, var(--ios-primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: var(--ios-radius-medium);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ios-transition-fast);
    min-height: 48px;
  }

  .filters-mobile__apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.35);
  }

  .filters-mobile__reset-btn {
    padding: 14px 14px;
    background: var(--ios-surface-elevated);
    color: var(--ios-label-secondary);
    border: 1px solid var(--ios-separator);
    border-radius: var(--ios-radius-medium);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ios-transition-fast);
    min-height: 48px;
    white-space: nowrap;
  }

  .filters-mobile__reset-btn:hover {
    border-color: var(--ios-danger);
    color: var(--ios-danger);
  }

  /* Увеличенная область клика чекбоксов */
  .filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 8px;
    min-height: 44px;
    cursor: pointer;
    border-radius: var(--ios-radius-small);
    transition: background 0.15s ease;
  }

  .filter-label:hover {
    background: rgba(0, 122, 255, 0.05);
  }

  .filter-label .filter-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--ios-primary);
  }

  .filter-label span {
    font-size: 14px;
    color: var(--ios-label-secondary);
    line-height: 1.3;
  }

  .filter-label:has(.filter-checkbox:checked) span {
    color: var(--ios-label);
    font-weight: 500;
  }

  /* Поиск внутри группы фильтров */
  .filter-search-input {
    width: 100%;
    padding: 9px 12px;
    margin-bottom: 6px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--ios-separator);
    border-radius: var(--ios-radius-small);
    font-size: 14px;
    color: var(--ios-label);
    min-height: auto;
    box-sizing: border-box;
  }

  .filter-search-input:focus {
    outline: none;
    border-color: var(--ios-primary);
    background: var(--ios-surface-solid);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
  }

  /* Мобильные стили аккордеонов */
  .accordion-header {
    font-size: 15px;
  }

  .filter-checkbox + span {
    font-size: 14px;
  }

  .nested-accordion-header {
    font-size: 0.9rem;
    padding: 0.4rem 0;
  }

  .nested-accordion-content {
    padding-left: 0.5rem;
    margin-left: 0.25rem;
  }

  .nested-accordion-content .filter-label {
    padding: 10px 6px;
    min-height: 40px;
  }

  .nested-accordion-content label {
    font-size: 0.85rem;
    padding: 0.3rem 0;
  }
}

/* На десктопе скрываем мобильный футер */
@media (min-width: 1024px) {
  /* На десктопе footer кнопок — статичный, под фильтрами */
  .filters-mobile__footer {
    display: flex;
    gap: 8px;
    position: static;
    padding: 16px 0 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid var(--ios-separator);
    margin-top: 12px;
  }

  .filters-mobile__apply-btn {
    flex: 1;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--ios-primary) 0%, var(--ios-primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
  }

  .filters-mobile__apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.35);
  }

  .filters-mobile__apply-btn:active {
    transform: translateY(0) scale(0.98);
  }

  .filters-mobile__reset-btn {
    padding: 12px 14px;
    background: transparent;
    color: var(--ios-label-secondary);
    border: 1px solid var(--ios-separator);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    white-space: nowrap;
  }

  .filters-mobile__reset-btn:hover {
    border-color: var(--ios-danger);
    color: var(--ios-danger);
    background: rgba(255, 59, 48, 0.04);
  }

  .filters-mobile__reset-btn:active {
    transform: scale(0.98);
  }

  .filters-mobile__body {
    padding: 0;
    overflow: visible;
    flex: unset;
  }
}

/* Десктоп: filter-label как обычный flex */
@media (min-width: 769px) {
  .filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
  }

  .filter-label span {
    font-size: 14px;
    color: var(--ios-label-secondary);
  }

  .filter-label:has(.filter-checkbox:checked) span {
    color: var(--ios-label);
    font-weight: 500;
  }

  .filter-search-input {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--ios-separator);
    border-radius: var(--ios-radius-small);
    font-size: 14px;
    color: var(--ios-label);
    min-height: auto;
    box-sizing: border-box;
  }

  .filter-search-input:focus {
    outline: none;
    border-color: var(--ios-primary);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
  }
}

/* iOS Glass Footer */
custom-footer {
  background: var(--ios-surface-glass);
  backdrop-filter: saturate(180%) blur(var(--ios-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--ios-blur));
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--ios-label);
}

custom-footer .footer-container {
  background: transparent;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

custom-footer .footer-col {
  background: transparent;
}

custom-footer .social-links a {
  background: var(--ios-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--ios-label);
  transition: var(--ios-transition-fast);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

custom-footer .social-links a:hover {
  background: var(--ios-surface-solid);
  transform: translateY(-2px);
  box-shadow: var(--ios-shadow);
}

/* Mobile footer */
@media (max-width: 768px) {
  custom-footer .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px;
  }

  custom-footer {
    padding: 40px 0;
  }

  .copyright {
    text-align: center;
    font-size: 14px;
  }
}

/* iOS Glass Inputs */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  background: var(--ios-surface-elevated);
  border: 1px solid var(--ios-separator);
  border-radius: var(--ios-radius-medium);
  padding: 14px 16px;
  font-size: 16px;
  color: var(--ios-label);
  transition: var(--ios-transition-fast);
  backdrop-filter: blur(20px);
  width: 100%;
  box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ios-primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
  background: var(--ios-surface-solid);
}

@media (max-width: 768px) {

  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  select,
  textarea {
    padding: 12px 14px;
    font-size: 15px;
  }

  .order-form-card {
    padding: 20px !important;
  }

  .order-form-card h2 {
    font-size: 22px;
  }

  .order-items {
    font-size: 14px;
  }
}

/* iOS Glass Table */
table {
  background: var(--ios-surface-elevated);
  border-radius: var(--ios-radius-medium);
  overflow: hidden;
  border: 1px solid var(--ios-separator);
  width: 100%;
}

thead {
  background: rgba(0, 0, 0, 0.02);
}

th {
  font-weight: 600;
  color: var(--ios-label);
  font-size: 14px;
  padding: 12px 16px;
  text-align: left;
}

td {
  color: var(--ios-label-secondary);
  border-top: 1px solid var(--ios-separator);
  padding: 12px 16px;
  font-size: 14px;
}

@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th,
  td {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* iOS Glass Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 4px;
  transition: var(--ios-transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.24);
}

/* iOS Glass Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-pulse {
  animation: pulse 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

/* iOS Glass Tags */
.quick-select-tag,
.bg-cyan-100,
.bg-purple-100,
.bg-green-100,
.bg-yellow-100 {
  background: var(--ios-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--ios-label);
  font-weight: 500;
  border-radius: var(--ios-radius-extra);
  padding: 6px 12px;
  font-size: 13px;
  transition: var(--ios-transition-fast);
}

.quick-select-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--ios-shadow);
  background: var(--ios-surface-solid);
}

/* Responsive Grid & Layout */
.container.mx-auto {
  padding-left: 20px;
  padding-right: 20px;
}

section {
  padding-left: 20px;
  padding-right: 20px;
}

.grid {
  display: grid;
}

@media (max-width: 768px) {
  .container.mx-auto {
    padding-left: 16px;
    padding-right: 16px;
  }

  section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .grid-cols-1 {
    grid-template-columns: 1fr;
  }

  .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .lg\:grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .gap-6 {
    gap: 16px;
  }

  .py-12 {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .py-20 {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .px-6 {
    padding-left: 16px;
    padding-right: 16px;
  }

  .text-3xl {
    font-size: 24px;
  }

  .text-4xl {
    font-size: 28px;
  }

  .text-2xl {
    font-size: 20px;
  }

  .text-xl {
    font-size: 18px;
  }

  #delivery .grid-cols-3 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  #contact .flex-col {
    flex-direction: column;
  }

  #contact .md\:flex-row {
    flex-direction: column;
  }

  #contact .md\:w-1\/2 {
    width: 100%;
  }
}

/* iOS Glass Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Стили для уведомления о добавлении в корзину */
.cart-notification {
  animation: slideInUp 0.3s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* iOS Glass Focus States */
:focus-visible {
  outline: 2px solid var(--ios-primary);
  outline-offset: 2px;
}

/* iOS Glass Selection */
::selection {
  background: rgba(0, 122, 255, 0.2);
  color: var(--ios-label);
}

/* iOS Glass Disabled States */
:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* iOS Glass Utility Classes */
.glass {
  background: var(--ios-surface-glass);
  backdrop-filter: saturate(180%) blur(var(--ios-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--ios-blur));
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.glass-elevated {
  background: var(--ios-surface-elevated);
  backdrop-filter: saturate(180%) blur(var(--ios-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--ios-blur));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--ios-shadow);
}

/* Anchor offset for fixed navbar */
:target {
  scroll-margin-top: 120px;
}

section[id] {
  scroll-margin-top: 120px;
}

html {
  scroll-padding-top: 120px;
  scroll-behavior: smooth;
}

@keyframes mistMove {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.55;
  }

  50% {
    transform: translateY(-2%) translateX(5%) scale(1.04);
    opacity: 0.7;
  }

  100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.55;
  }
}


/* ФИКС дергания курсора в форме заказа */
.order-form-card {
  background: rgba(252, 252, 252, 1) !important;
  border: 1px solid rgba(230, 230, 230, 1) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06) !important;
}

.order-form-card input,
.order-form-card textarea,
.order-form-card select {
  cursor: text !important;
}

.order-form-card button {
  cursor: pointer !important;
}

.order-form-card label {
  cursor: pointer !important;
}

.order-form-card a {
  cursor: pointer !important;
}

button[type="submit"]::after {
  pointer-events: none;
}

.order-form-card button[type="submit"]:hover {
  background: linear-gradient(135deg, var(--ios-primary) 0%, var(--ios-primary-light) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

/* Специально для кнопок в админке */
.admin-btn::after {
  display: none !important;
  /* убираем overlay iOS стиля */
}

.admin-btn {
  transform: none !important;
  /* отключаем сдвиги при hover/active */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
  /* обычная тень */
}

.admin-btn:hover {
  background-color: #38bdf8 !important;
  /* простой hover */
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12) !important;
}

/* Дополнительные стили для мобильной адаптации */

/* Улучшение отступов для мобильных устройств */
@media (max-width: 768px) {
  section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .container.mx-auto {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Улучшение формы контактов */
  #contact form {
    gap: 20px;
  }

  #contact .flex-wrap {
    gap: 12px;
  }

  /* Улучшение карточек доставки */
  #delivery .grid-cols-3>div {
    padding: 20px;
    text-align: center;
  }

  #delivery .w-16 {
    width: 48px;
    height: 48px;
  }

  /* Улучшение секции about */
  #about .lg\:flex-row {
    flex-direction: column;
  }

  #about .lg\:pr-12 {
    padding-right: 0;
    margin-bottom: 30px;
  }

  /* Карусель управляется JS */

  /* Улучшение таблиц */
  table {
    font-size: 14px;
  }

  th,
  td {
    padding: 10px;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
  .container.mx-auto.px-6.py-20.z-10.text-center h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  .container.mx-auto.px-6.py-20.z-10.text-center p {
    font-size: 16px;
  }

  .text-3xl,
  .text-4xl {
    font-size: 24px;
  }

  .text-xl {
    font-size: 18px;
  }

  #works-carousel .work-img {
    height: 320px;
  }

  .bg-gray-50.rounded-xl.p-8 {
    padding: 20px !important;
  }

  .space-y-4>div {
    flex-direction: column;
    align-items: flex-start;
  }

  .space-y-4 i {
    margin-bottom: 8px;
  }
}

/* Предотвращение горизонтального скролла */
body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Улучшение читаемости на мобильных устройствах */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.5;
  }

  p,
  li,
  td,
  label {
    font-size: 16px;
  }

  h1,
  h2,
  h3,
  h4 {
    line-height: 1.2;
  }
}

/* Улучшение кнопок на мобильных устройствах */
@media (max-width: 768px) {

  button,
  .btn,
  a.inline-block {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 24px;
  }

  input,
  textarea,
  select {
    font-size: 16px;
    min-height: 44px;
  }
}

/* Адаптация модального окна */
@media (max-width: 768px) {
  #img-modal {
    padding: 20px;
  }

  #img-modal .max-w-\[90\%\] {
    max-width: 95% !important;
    max-height: 80vh !important;
  }
}

/* Улучшение футера на мобильных устройствах */
@media (max-width: 768px) {
  custom-footer .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  custom-footer .social-links {
    justify-content: center;
  }

  custom-footer h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }
}

/* Адаптация отступов для якорных ссылок с учетом фиксированной шапки */
@media (max-width: 768px) {
  :target {
    scroll-margin-top: 80px;
  }

  section[id] {
    scroll-margin-top: 80px;
  }

  html {
    scroll-padding-top: 80px;
  }
}

/* ---------------------------------------------------------------------------
   Пагинация каталога
--------------------------------------------------------------------------- */

.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  padding: 16px 0 8px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ios-radius-medium);
  border: 1px solid var(--ios-separator);
  background: var(--ios-surface-elevated);
  color: var(--ios-label);
  cursor: pointer;
  transition: var(--ios-transition-fast);
  flex-shrink: 0;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--ios-primary);
  color: var(--ios-primary);
  transform: translateY(-1px);
  box-shadow: var(--ios-shadow);
}

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

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-page {
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: var(--ios-radius-medium);
  border: 1px solid var(--ios-separator);
  background: var(--ios-surface-elevated);
  color: var(--ios-label-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--ios-transition-fast);
}

.pagination-page:hover {
  border-color: var(--ios-primary);
  color: var(--ios-primary);
  transform: translateY(-1px);
  box-shadow: var(--ios-shadow);
}

.pagination-page.active {
  background: linear-gradient(135deg, var(--ios-primary) 0%, var(--ios-primary-light) 100%);
  border-color: transparent;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.pagination-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 40px;
  color: var(--ios-label-secondary);
  font-size: 15px;
  user-select: none;
}

@media (max-width: 480px) {
  .pagination-page,
  .pagination-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 14px;
  }

  .pagination-nav {
    gap: 4px;
  }
}

/* ---------------------------------------------------------------------------
   Product Modal (каталог)
--------------------------------------------------------------------------- */

.product-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.product-modal {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 600px;
  overflow: hidden;
  background: var(--ios-surface-elevated);
  border-radius: var(--ios-radius-large);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  z-index: 1;
  animation: productModalIn 0.3s ease;
}

@keyframes productModalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.product-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--ios-separator);
  border-radius: 50%;
  color: var(--ios-label);
  cursor: pointer;
  transition: var(--ios-transition-fast);
  z-index: 10;
}

.product-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--ios-danger);
}

.product-modal-body {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
  padding: 28px;
  align-items: stretch;
  height: 100%;
  box-sizing: border-box;
}

.product-modal-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--ios-separator);
  border-radius: 50%;
  color: var(--ios-label);
  cursor: pointer;
  transition: var(--ios-transition-fast);
  box-shadow: var(--ios-shadow);
}

.product-modal-nav:hover {
  background: white;
  color: var(--ios-primary);
}

.product-modal-prev {
  left: 12px;
}

.product-modal-next {
  right: 12px;
}

.product-modal-nav.is-hidden {
  display: none;
}

.product-modal-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.product-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ios-label);
  margin: 0;
  line-height: 1.3;
}

.product-modal-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--ios-primary);
  margin: 0;
}

.product-modal-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ios-label-secondary);
  margin: 0;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
}


/* Gallery: main image wrapper + thumbnails */
.product-modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.product-modal-main-wrap {
  position: relative;
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--ios-radius-medium);
  overflow: hidden;
  flex: 1;
  min-height: 0;
  max-height: 440px;
}

.product-modal-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pmt-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.pmt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pmt-thumb--active {
  border-color: var(--ios-primary);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.pmt-thumb:hover:not(.pmt-thumb--active) {
  border-color: var(--ios-separator);
}

/* Micro-tabs */
.product-modal-tabs {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  padding: 4px;
}

.pmt-tab {
  flex: 1;
  min-width: 0;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ios-label-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.pmt-tab--active {
  background: var(--ios-surface-elevated, #fff);
  color: var(--ios-label);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.pmt-tab:hover:not(.pmt-tab--active) {
  color: var(--ios-label);
}

/* Tab panels */
.product-modal-tab-content {
  height: 200px;
  flex-shrink: 0;
  overflow: hidden;
}

.pmt-panel {
  display: none;
  height: 100%;
}

.pmt-panel--active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Specs table */
.pmt-specs-table-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
}

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

.pmt-specs-table tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.025);
}

.pmt-spec-name {
  padding: 8px 10px;
  color: var(--ios-label-secondary);
  font-weight: 500;
  width: 45%;
  vertical-align: top;
  border-bottom: 1px solid var(--ios-separator);
}

.pmt-spec-value {
  padding: 8px 10px;
  color: var(--ios-label);
  border-bottom: 1px solid var(--ios-separator);
  vertical-align: top;
}

.pmt-specs-empty {
  font-size: 14px;
  color: var(--ios-label-secondary);
  padding: 12px 0;
}

/* Actions row: quantity + add to cart */
.product-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.product-modal-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.02);
  padding: 8px 10px;
  border-radius: var(--ios-radius-medium);
  border: 1px solid var(--ios-separator);
  flex-shrink: 0;
}

.product-modal-quantity .quantity-btn {
  width: 32px;
  height: 32px;
}

.product-modal-quantity .quantity-input {
  width: 44px;
  text-align: center;
}

.product-modal-cart-btn {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .product-modal {
    max-height: 92vh;
    overflow-y: auto;
  }

  .product-modal-body {
    grid-template-columns: 1fr;
    padding: 20px;
    height: auto;
    align-items: start;
  }

  .product-modal-info {
    height: auto;
  }

  .pmt-tab {
    white-space: normal;
  }

  .product-modal-main-wrap {
    aspect-ratio: 4/3;
    max-height: none;
    flex: none;
  }

  .product-modal-title {
    font-size: 20px;
  }

  .product-modal-price {
    font-size: 22px;
  }

  /* D: Фиксированная высота контента вкладок на мобильных */
  .product-modal-tab-content {
    height: 180px;
    overflow: hidden;
  }

  .pmt-panel--active {
    min-height: 100%;
  }

  .pmt-specs-table-wrap {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
  }

  /* C: Характеристики — список вместо таблицы */
  .pmt-specs-table {
    width: 100%;
    max-width: 100%;
  }

  .pmt-specs-table,
  .pmt-specs-table tbody,
  .pmt-specs-table tr {
    display: block;
    min-width: 0;
  }

  .pmt-specs-table tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--ios-separator);
  }

  .pmt-specs-table tr:last-child {
    border-bottom: none;
  }

  .pmt-spec-name,
  .pmt-spec-value {
    display: block;
    width: 100% !important;
    max-width: 100%;
    padding: 4px 0;
    border: none;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .pmt-spec-name {
    font-size: 12px;
    color: var(--ios-label-secondary);
    padding-bottom: 2px;
  }

  .pmt-spec-value {
    padding-bottom: 8px;
    padding-left: 0;
  }

  .product-modal-actions {
    flex-wrap: wrap;
    margin-top: 0;
  }

  .product-modal-quantity {
    width: 100%;
    justify-content: center;
  }

  .product-modal-cart-btn {
    width: 100%;
  }
}

/* =========================================================
   ГЛОБАЛЬНЫЙ ПОИСК ПО ФИЛЬТРАМ
   ========================================================= */

.filter-global-search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.filter-global-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ios-label-secondary);
  pointer-events: none;
}

.filter-global-search-input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--ios-separator);
  border-radius: var(--ios-radius-medium);
  font-size: 14px;
  color: var(--ios-label);
  box-sizing: border-box;
  min-height: auto;
  transition: var(--ios-transition-fast);
}

.filter-global-search-input:focus {
  outline: none;
  border-color: var(--ios-primary);
  background: var(--ios-surface-solid);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

/* Скрытая группа фильтров при поиске */
.filter-section--hidden-by-search {
  display: none;
}

/* =========================================================
   СЕТКА ТОВАРОВ — ЦЕНТРИРОВАНИЕ
   ========================================================= */

.products-grid {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 24px;
  width: 100%;
  box-sizing: border-box;
}

/* Десктоп: 3 колонки при широком экране */
@media (min-width: 1024px) {
  .products-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Планшет */
@media (min-width: 640px) and (max-width: 1023px) {
  .products-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Мобильные — одна колонка, без смещений */
@media (max-width: 639px) {
  .products-container {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
    padding: 0;
  }

  .products-grid {
    width: 100%;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
  }

  /* Исправляем catalog-layout на мобильных */
  .catalog-layout {
    padding: 0;
    gap: 0;
  }
}

/* Предотвращаем горизонтальный скролл */
body {
  overflow-x: hidden;
}

.catalog-layout {
  width: 100%;
  box-sizing: border-box;
}

/* =========================================================
   СОГЛАСИЕ С ОФЕРТОЙ (страница заказа)
   ========================================================= */

.order-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ios-label-secondary);
  margin-top: 16px;
  margin-bottom: 4px;
  cursor: pointer;
}

.order-consent input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--ios-primary);
  cursor: pointer;
  border-radius: 4px;
}

.order-consent span {
  user-select: none;
}

.order-consent a {
  color: #0891b2;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s ease;
}

.order-consent a:hover {
  opacity: 0.75;
}

@media (max-width: 768px) {
  .order-consent {
    min-height: 44px;
    align-items: center;
    gap: 12px;
    font-size: 15px;
  }

  .order-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0;
  }
}