/* Site-specific styles - Tea Theme */

:root {
  /* Tea-inspired color palette */
  --tea-green-light: #e8f5e9;
  --tea-green: #4caf50;
  --tea-green-dark: #2e7d32;
  --tea-brown-light: #d7ccc8;
  --tea-brown: #8d6e63;
  --tea-brown-dark: #5d4037;
  --tea-cream: #fff8e1;
  --tea-gold: #ffc107;
  --tea-olive: #689f38;
  
  --text-primary: #3e2723;
  --text-secondary: #6d4c41;
  --bg-primary: #ffffff;
  --bg-secondary: #faf8f5;
  --bg-tertiary: #efebe9;
  --border-color: #d7ccc8;
  
  --shadow-sm: 0 1px 2px rgba(62, 39, 35, 0.08);
  --shadow-md: 0 4px 8px rgba(62, 39, 35, 0.12);
  --shadow-lg: 0 8px 24px rgba(62, 39, 35, 0.16);
  --shadow-xl: 0 16px 48px rgba(62, 39, 35, 0.2);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

body.web-site {
  font-family: 'Times New Roman', Times, serif;
  margin: 0;
  padding: 0;
  background:
    linear-gradient(135deg, var(--tea-cream) 0%, #fff3e0 50%, var(--tea-green-light) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Decorative leaf pattern overlay */
body.web-site::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5c-2 0-4 1-5 3-1 2-1 5 0 7 1 2 3 3 5 3s4-1 5-3c1-2 1-5 0-7-1-2-3-3-5-3zm0 20c-2 0-4 1-5 3-1 2-1 5 0 7 1 2 3 3 5 3s4-1 5-3c1-2 1-5 0-7-1-2-3-3-5-3zm0 20c-2 0-4 1-5 3-1 2-1 5 0 7 1 2 3 3 5 3s4-1 5-3c1-2 1-5 0-7-1-2-3-3-5-3z' fill='%238d6e63' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.site-loader {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: min(260px, calc(100vw - 32px));
  padding: 14px 16px 12px;
  border: 2px solid rgba(93, 64, 55, 0.18);
  border-radius: 16px;
  background: rgba(255, 248, 225, 0.96);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-loader.visible {
  opacity: 1;
  transform: translateY(0);
}

.site-loader-track {
  position: relative;
  width: 100%;
  height: 34px;
  overflow: hidden;
}

.site-loader-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 3px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    var(--tea-brown) 0 18px,
    transparent 18px 28px
  );
  opacity: 0.45;
}

.site-loader-train {
  position: absolute;
  left: -42px;
  bottom: 5px;
  font-size: 28px;
  line-height: 1;
  animation: site-loader-train 1.6s linear infinite;
}

.site-loader-text {
  color: var(--tea-brown-dark);
  font-size: 15px;
  font-weight: 700;
}

@keyframes site-loader-train {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(300px);
  }
}

@media (max-width: 768px) {
  .site-loader {
    right: 16px;
    bottom: 16px;
    width: min(220px, calc(100vw - 32px));
  }
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  background: linear-gradient(180deg,
    rgba(255, 248, 225, 0.98) 0%,
    rgba(255, 255, 255, 0.95) 100%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px 0;
  gap: 20px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.header-search {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 50px;
  border: 2px solid var(--border-color);
  overflow: visible;
  transition: all 0.3s;
  max-width: 400px;
  flex: 1;
  position: relative;
}

.header-search:focus-within {
  border-color: var(--tea-green);
  box-shadow: 0 0 0 4px rgba(134, 197, 152, 0.15);
}

.header-search input {
  flex: 1;
  border: none;
  padding: 10px 16px;
  font-size: 15px;
  outline: none;
  background: transparent;
  font-family: inherit;
}

.header-search input::placeholder {
  color: #999;
}

.header-search button {
  background: transparent;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
  opacity: 0.7;
}

.header-search button:hover {
  opacity: 1;
  background: var(--tea-cream);
}

/* Search dropdown */
.search-suggestion-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-suggestion-item:hover {
  background: var(--tea-cream);
}

.search-suggestion-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

.search-suggestion-price {
  font-size: 14px;
  color: var(--tea-green-dark);
  font-weight: 700;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  border: 2px solid var(--border-color);
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
}

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

.search-dropdown-item:hover {
  background: var(--tea-cream);
}

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

.search-dropdown-item .search-item-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown-item .search-item-category {
  font-size: 12px;
  color: var(--text-secondary);
}

.search-dropdown-item .search-item-price {
  font-weight: 700;
  font-size: 15px;
  color: var(--tea-green-dark);
  flex-shrink: 0;
}

.search-dropdown-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.search-dropdown-empty p {
  margin: 0;
  font-size: 14px;
}

.brand {
  text-decoration: none;
  color: var(--tea-brown-dark);
  font-size: 32px;
  font-weight: 700;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 1px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand::before {
  content: '';
  display: inline-block;
  width: 60px;
  height: 60px;
  background: url('/assets/images/logo.png') no-repeat center center;
  background-size: contain;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--tea-green-dark);
  transform: scale(1.03);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  order: 3;
  flex-wrap: wrap;
  padding: 8px 0 10px;
  margin-top: -24px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 18px;
  transition: all 0.3s;
  position: relative;
  border-radius: 50px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Вертикальные разделители между кнопками */
.nav-link:not(:last-of-type)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 1px;
  background: var(--text-primary);
  opacity: 0.5;
}






/* Dropdown */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-toggle {
  cursor: default;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-arrow {
  font-size: 10px;
  transition: transform 0.3s;
  display: inline-block;
  margin-top: 2px;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  min-width: 160px;
  max-width: 200px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s;
  z-index: 1000;
  margin-top: 8px;
  border: 2px solid var(--border-color);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu a,
.dropdown-menu .dropdown-item {
  display: block;
  padding: 10px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.dropdown-menu a:hover,
.dropdown-menu .dropdown-item:hover {
  background: var(--tea-green-light);
  color: var(--tea-green-dark);
  padding-left: 20px;
}

.nav-link {
  text-decoration: none;
  color: var(--tea-brown-dark);
  font-weight: 600;
  font-size: 15px;
  font-family: 'Manrope', sans-serif;
  padding: 10px 20px;
  border-radius: 50px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--tea-green), var(--tea-olive));
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 50px;
}

.nav-link:hover::before {
  opacity: 0.15;
}

.nav-link:hover {
  color: var(--tea-green-dark);
}

.nav-link.active {
  background: transparent;
  color: var(--tea-green-dark);
}

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

.header-phone {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: all 0.3s;
  white-space: nowrap;
}

.header-phone:hover {
  background: var(--tea-cream);
  color: var(--tea-green-dark);
}

.cart-btn, .profile-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  position: relative;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-btn:hover, .profile-btn:hover {
  background: var(--tea-cream);
  transform: none;
  box-shadow: none;
}

/* Профиль dropdown */
.profile-dropdown .profile-btn {
  padding: 10px 14px;
}

.profile-dropdown .dropdown-arrow {
  font-size: 10px;
  transition: transform 0.3s;
}

.profile-dropdown:hover .dropdown-arrow,
.profile-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.profile-dropdown.open .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu-right {
  left: auto;
  right: 0;
}

.profile-dropdown-info {
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, var(--tea-gold), #ff9800);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  padding: 3px 8px;
  border-radius: 20px;
  min-width: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 2px solid #fff;
}

.cart-badge.hidden {
  display: none;
}

/* Main content */
.site-main {
  flex: 1;
  padding: 24px 0;
  position: relative;
  z-index: 1;
}

.page {
  display: none;
  animation: fadeIn 0.4s ease;
}

.page.active {
  display: block;
}

/* Показываем правильную страницу до загрузки JS */
html[data-page="homePage"] #homePage,
html[data-page="catalogPage"] #catalogPage,
html[data-page="cartPage"] #cartPage,
html[data-page="productPage"] #productPage,
html[data-page="aboutPage"] #aboutPage,
html[data-page="deliveryPage"] #deliveryPage,
html[data-page="contactsPage"] #contactsPage,
html[data-page="myOrdersPage"] #myOrdersPage,
html[data-page="favoritesPage"] #favoritesPage,
html[data-page="checkoutPage"] #checkoutPage,
html[data-page="loginPage"] #loginPage,
html[data-page="discountPage"] #discountPage {
  display: block;
}

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

/* Hero */
.hero {
  background:
    linear-gradient(135deg,
      rgba(76, 175, 80, 0.9) 0%,
      rgba(104, 159, 56, 0.85) 50%,
      rgba(141, 110, 99, 0.9) 100%),
    url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 20c-5 0-10 3-12 8-3 5-3 12 0 17 2 5 7 8 12 8s10-3 12-8c3-5 3-12 0-17-2-5-7-8-12-8z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E");
  color: #fff;
  text-align: center;
  padding: 14px 24px 18px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin: 0 auto 20px;
  max-width: 1500px;
  box-shadow: var(--shadow-xl);
}

.hero h1 {
  font-size: 40px;
  margin-top: 0;
  margin-bottom: 4px;
  font-weight: 700;
}

.hero p {
  font-size: 18px;
  margin-bottom: 0;
  margin-top: 0;
  opacity: 0.95;
  font-weight: 600;
}

.hero .primary-btn {
  margin-bottom: 4px;
}

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 1fr));
  gap: 36px;
  margin: 0;
}

.product-card {
  background: linear-gradient(180deg, #faf8f5 0%, #fff 100%);
  border-radius: 24px;
  overflow: visible;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card.has-discount {
  box-shadow: 0 2px 24px rgba(0,0,0,0.08);
}

/* Кнопка избранного */
.favorite-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.favorite-btn:hover {
  background: #fff;
  transform: scale(1.15);
}

.favorite-btn.active {
  background: linear-gradient(135deg, #ff6b6b, #ff4757);
  animation: favoritePulse 0.3s ease;
}

@keyframes favoritePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, var(--tea-gold), #ff9800);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  padding: 5px 12px;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  z-index: 10;
  white-space: nowrap;
}

.harvest-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(62, 39, 35, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  padding: 6px 12px;
  border-radius: 50px;
  z-index: 10;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.product-card.has-discount .harvest-badge {
  top: 46px;
}

.new-badge {
  position: absolute;
  top: 12px;
  right: 48px;
  background: linear-gradient(135deg, #43a047, #1b5e20);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  padding: 4px 10px;
  border-radius: 50px;
  z-index: 10;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.hit-badge {
  position: absolute;
  top: 12px;
  right: 48px;
  background: linear-gradient(135deg, #e53935, #b71c1c);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  padding: 4px 10px;
  border-radius: 50px;
  z-index: 10;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.new-badge ~ .hit-badge {
  top: 40px;
}

.product-image {
  height: 280px;
  background: linear-gradient(135deg, #f0ece6, #e8e2d8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-radius: 20px 20px 0 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  transition: transform 0.5s;
}

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

.product-info {
  padding: 20px 22px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-availability {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8a6a4b;
  font-family: 'Manrope', sans-serif;
}

.product-name {
  font-size: 20px;
  margin: 0 0 8px;
  font-weight: 600;
  font-family: 'Cormorant Garamond', serif;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: 0.3px;
  min-height: 50px;
  flex-shrink: 0;
}

.product-description-short {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
}

.product-price {
  font-size: 22px;
  color: var(--tea-green-dark);
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  margin: 0 0 4px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}

.product-price::after {
  content: "/ " attr(data-unit);
  font-size: 15px;
  color: var(--tea-green-dark);
  font-weight: 600;
  margin-left: 1px;
}

.old-price {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: line-through;
  font-weight: 400;
  font-family: 'Manrope', sans-serif;
  margin: 0 0 6px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Нижняя часть карточки - корзина + количество */
.product-actions-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 10px;
  flex-wrap: nowrap;
  overflow: visible;
}

.cart-btn-card {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  line-height: 1;
  position: relative;
  z-index: 2;
}

.cart-btn-card:hover {
  background: var(--tea-cream);
  border-color: var(--tea-green);
}

.cart-btn-card.added {
  animation: cartPulse 0.3s ease;
}

@keyframes cartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.product-card-mode-selector {
  display: inline-flex;
  border: none;
  border-radius: 0;
  overflow: visible;
  flex-shrink: 0;
  background: transparent;
  gap: 1px;
}

.mode-btn-inline {
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  border: 1.5px solid #d4c8b8;
  background: #f5f0e8;
  color: #5d4037;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Manrope', sans-serif;
  position: relative;
  z-index: 3;
  line-height: 1.2;
  border-radius: 12px;
}

.mode-btn-inline:first-child {
  margin-right: -1px;
}



.mode-btn-inline:hover {
  background: rgba(93, 64, 55, 0.1);
}

.mode-btn-inline.active {
  background: #4caf50;
  color: #fff;
  border-color: #4caf50;
}

.qty-controls-row {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--text-primary);
  flex-shrink: 0;
}

.qty-btn:hover {
  background: var(--tea-cream);
}

.product-qty-input {
  width: 32px;
  height: 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
  color: var(--text-primary);
  background: transparent;
  flex-shrink: 0;
  /* Убираем стрелки у input type="number" */
  -moz-appearance: textfield;
}

/* Убираем стрелки для Chrome, Safari, Edge, Opera */
.product-qty-input::-webkit-outer-spin-button,
.product-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-qty-input:focus {
  outline: none;
  border-color: var(--tea-green);
}

/* Catalog layout */
.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin-top: 0;
  align-items: start;
  padding-left: 0;
  padding-right: 0;
}

/* Когда sidebar скрыт — контент на всю ширину */
.catalog-layout.no-sidebar {
  grid-template-columns: 1fr;
}

.catalog-layout.no-sidebar .catalog-sidebar-wrapper {
  display: none !important;
}

.category-title {
  cursor: pointer;
  transition: color 0.3s;
}

.category-title:hover {
  color: var(--tea-green-dark);
}

.catalog-layout.no-sidebar .catalog-content {
  display: flex;
  justify-content: center;
  width: 100%;
}

.catalog-layout.no-sidebar .catalog-content .products-grid {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  justify-items: center;
}

/* Пустое состояние в каталоге */
.catalog-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  grid-column: 1 / -1;
  min-height: 400px;
  color: var(--text-secondary);
  padding: 40px 20px;
}

.catalog-empty-state__title {
  font-size: 22px;
  margin-bottom: 12px;
}

.catalog-empty-state__subtitle {
  font-size: 15px;
  opacity: 0.8;
}

.catalog-sidebar-wrapper {
  display: flex;
  justify-content: flex-start;
}

.catalog-sidebar {
  background: linear-gradient(180deg, #fff 0%, var(--tea-cream) 100%);
  padding: 16px 32px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  height: fit-content;
  position: sticky;
  top: 100px;
  border: 2px solid var(--tea-brown-light);
  width: 100%;
}

.catalog-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
}

.seo-section-desc {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.catalog-content .products-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  width: 100%;
}

.catalog-load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  min-height: 72px;
}

.catalog-load-more-wrap[hidden] {
  display: none;
}

.catalog-load-more-status {
  color: var(--tea-brown);
  font-size: 18px;
  font-weight: 700;
}

.catalog-load-more-sentinel {
  width: 100%;
  height: 1px;
}

.catalog-sidebar h3,
.catalog-sidebar-toggle {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Cormorant Garamond', serif;
  color: var(--tea-brown-dark);
  letter-spacing: 1px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--tea-green);
  text-align: center;
}

.product-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.product-actions .primary-btn,
.product-actions .ghost-btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.product-actions .ghost-btn.details-btn {
  border: 2px solid rgba(141, 110, 99, 0.35);
  background: rgba(255, 255, 255, 0.65);
}

.catalog-sidebar-toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-sidebar-toggle > span:first-child {
  flex: 1;
  text-align: center;
}

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

.category-list li {
  margin: 10px 0;
}

.category-link {
  text-decoration: none;
  color: var(--text-secondary);
  display: block;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  transition: all 0.3s;
  font-weight: 500;
  font-size: 18px;
  font-family: 'Manrope', sans-serif;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  text-align: left;
  background: none;
  cursor: pointer;
  width: 100%;
}

.category-link::before {
  content: '🌿';
  position: absolute;
  left: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.category-link:hover::before {
  opacity: 0;
}

.category-link:hover {
  background: var(--tea-green-light);
  color: var(--tea-green-dark);
}

.category-link.active {
  background: linear-gradient(135deg, var(--tea-green), var(--tea-olive));
  color: #fff;
  box-shadow: var(--shadow-md);
  padding: 10px 20px 10px 45px;
}

.category-link.active::before {
  opacity: 1;
  left: 15px;
}

.category-group {
  margin: 10px 0;
}

.category-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-group-toggle span:first-child {
  min-width: 0;
}

.category-group-arrow {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.category-group.expanded .category-group-arrow {
  transform: rotate(180deg);
}

.category-sublist {
  list-style: none;
  padding: 4px 0 0 18px;
  margin: 0;
  display: none;
}

.category-group.expanded .category-sublist {
  display: block;
}

.category-sublink {
  font-size: 16px;
  padding-left: 18px;
}

/* Catalog filter bar */
.catalog-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.catalog-filter-btn {
  padding: 7px 18px;
  border-radius: 50px;
  border: 2px solid var(--tea-green, #4a7c59);
  background: #fff;
  color: var(--tea-green, #4a7c59);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Manrope', sans-serif;
}

.catalog-filter-btn:hover {
  background: var(--tea-green, #4a7c59);
  color: #fff;
}

.catalog-filter-btn.active {
  background: linear-gradient(135deg, var(--tea-green), var(--tea-olive));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(74,124,89,0.3);
}

/* Buttons */
.primary-btn {
  background: linear-gradient(135deg, var(--tea-green), var(--tea-olive));
  color: #fff;
  border: none;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.primary-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.primary-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.back-btn {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 28px;
  padding: 14px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.back-btn::before {
  content: '←';
  font-size: 20px;
  transition: transform 0.3s;
}

.back-btn:hover {
  background: var(--tea-green);
  color: #fff;
  border-color: var(--tea-green);
}

.back-btn:hover::before {
  transform: translateX(-4px);
}

.danger-btn {
  background: linear-gradient(135deg, #d84315, #bf360c);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  font-family: 'Manrope', sans-serif;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.danger-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Cart */
.cart-items {
  background: linear-gradient(180deg, #fff 0%, var(--tea-cream) 100%);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--tea-brown-light);
}

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

.cart-empty p {
  margin-bottom: 24px;
}

.cart-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-color);
  transition: all 0.3s;
}

.cart-item h4 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  font-family: 'Times New Roman', Times, serif;
}

.cart-item:hover {
  background: rgba(76, 175, 80, 0.05);
  padding-left: 12px;
  padding-right: 12px;
  margin-left: -12px;
  margin-right: -12px;
  border-radius: var(--radius-md);
  border-bottom-color: var(--tea-green);
}

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

.cart-item-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cart-item-price-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 20px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.cart-item-line-total {
  font-size: 24px;
  font-weight: 700;
  color: var(--tea-green-dark);
}

.cart-item-unit-old {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
  font-weight: 400;
  margin-right: 4px;
}

.cart-item-unit-new {
  color: var(--tea-green-dark);
  font-weight: 700;
}

.cart-item-line-new {
  color: var(--tea-green-dark);
}

.cart-qty-input {
  width: 70px;
  padding: 8px 12px;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  font-family: 'Times New Roman', Times, serif;
  transition: all 0.3s;
  text-align: center;
  /* Убираем стрелки у input type="number" */
  -moz-appearance: textfield;
}

/* Убираем стрелки для Chrome, Safari, Edge, Opera */
.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-qty-input:focus {
  outline: none;
  border-color: var(--tea-green);
  box-shadow: 0 0 0 3px var(--tea-green-light);
}

/* Quantity controls in product card */
.product-quantity-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.qty-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Mode selector for product cards */
.product-card-mode-selector {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.mode-btn-card {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.product-qty-input {
  width: 35px;
  padding: 8px 4px;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Times New Roman', Times, serif;
  transition: all 0.3s;
  text-align: center;
  /* Убираем стрелки у input type="number" */
  -moz-appearance: textfield;
}

/* Убираем стрелки для Chrome, Safari, Edge, Opera */
.product-qty-input::-webkit-outer-spin-button,
.product-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-qty-input:focus {
  outline: none;
  border-color: var(--tea-green);
  box-shadow: 0 0 0 3px rgba(134, 197, 152, 0.3);
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.qty-btn:hover {
  background: var(--tea-green);
  border-color: var(--tea-green);
  color: #fff;
}

.qty-btn:active {
  transform: scale(0.95);
}

/* Extra button - smaller and more compact */
.qty-extra-btn {
  width: 28px;
  height: 28px;
  font-size: 16px;
  margin-left: 4px;
}

/* Inline mode selector for product detail - buttons are now above quantity controls */
.product-detail-mode-selector-inline {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.mode-btn-inline {
  width: 30px;
  height: 30px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mode-btn-inline:hover {
  background: var(--tea-green);
  border-color: var(--tea-green);
  color: #fff;
}

.mode-btn-inline.active {
  background: var(--tea-green);
  border-color: var(--tea-green);
  color: #fff;
  box-shadow: 0 0 0 3px var(--tea-green-light);
}

.mode-btn-inline:active {
  transform: scale(0.95);
}

/* Mode selector for product cards */
.product-card-mode-selector {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  margin-top: 7px;
}

.mode-btn-card {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.cart-total-block {
  background: linear-gradient(135deg, var(--tea-cream) 0%, #fff3e0 100%);
  padding: 24px 32px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--tea-brown-light);
  box-shadow: var(--shadow-md);
}

.cart-promo-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--tea-green-light) 0%, #e8f5e9 100%);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--tea-green);
}

.cart-promo-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--tea-green-dark);
}

.cart-discount-card {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
  border-color: var(--tea-gold);
}

.cart-discount-card .cart-promo-text {
  color: var(--tea-brown-dark);
}

.cart-promo-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--tea-green-dark);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.cart-promo-remove:hover {
  background: rgba(0, 0, 0, 0.1);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cart-actions-left {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

#clearCartBtn, #checkoutBtn {
  flex: 1 1 auto;
  overflow: visible;
  padding-left: 12px;
  padding-right: 12px;
  text-align: center;
  white-space: nowrap;
}

.cart-total {
  font-size: 32px;
  font-weight: 800;
  color: var(--tea-brown-dark);
  font-family: 'Times New Roman', Times, serif;
  letter-spacing: 1px;
  white-space: nowrap;
}

#checkoutBtn {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

#clearCartBtn {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  border: 2px solid #d32f2f;
  color: #d32f2f;
  background: transparent;
}

#clearCartBtn:hover {
  background: #d32f2f;
  color: #fff;
  border-color: #d32f2f;
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, var(--tea-brown-dark) 0%, var(--tea-brown) 100%);
  color: var(--tea-brown-light);
  text-align: center;
  padding: 56px 24px;
  margin-top: 50px;
  position: relative;
  z-index: 1;
}

.site-footer::before {
  content: '🍃 🌿 🍃';
  display: block;
  font-size: 28px;
  margin-bottom: 20px;
  opacity: 0.6;
  letter-spacing: 30px;
}

.site-footer p {
  margin: 0;
  font-size: 15px;
  font-family: 'Manrope', sans-serif;
}

/* Поиск в низу хедера (только мобильный) */
.header-mobile-search-bar {
  display: none;
  background: linear-gradient(180deg, rgba(255,248,225,0.98) 0%, rgba(255,255,255,0.95) 100%);
  border-top: 1px solid rgba(141,110,99,0.15);
  border-bottom: 1px solid rgba(141,110,99,0.10);
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 998;
}

.header-mobile-search-inner {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid #e0d6c8;
  border-radius: 10px;
  overflow: visible;
}

.header-mobile-search-inner input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  outline: none;
  color: var(--text-primary);
}

.header-mobile-search-inner input::placeholder {
  color: #aaa;
}

.header-mobile-search-inner button {
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 17px;
  color: var(--tea-green-dark);
  flex-shrink: 0;
}

.header-mobile-search-inner:focus-within {
  border-color: var(--tea-green);
  box-shadow: 0 0 0 3px rgba(134,197,152,0.15);
}

#mobileHeaderSearchDropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  max-height: 50vh;
  overflow-y: auto;
  z-index: 1100;
}

/* Modal */
.modal-shell {
  background: linear-gradient(180deg, #fff 0%, var(--tea-cream) 100%);
  border: none;
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 460px;
  width: 90%;
  margin: 80px auto;
  box-shadow: var(--shadow-xl);
  animation: modalSlide 0.4s ease;
  border: 2px solid var(--tea-brown-light);
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(-30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--tea-green);
}

.modal-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  font-family: 'Cormorant Garamond', serif;
  color: var(--tea-brown-dark);
  letter-spacing: 1px;
}

.close-btn {
  background: var(--bg-tertiary);
  border: none;
  font-size: 24px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.close-btn:hover {
  background: var(--tea-green);
  color: #fff;
  transform: rotate(90deg);
}

.dialog-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px dashed var(--border-color);
}

.ghost-btn {
  background: transparent;
  border: 2px solid var(--border-color);
  padding: 14px 28px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  font-family: 'Manrope', sans-serif;
  transition: all 0.3s;
  color: var(--text-secondary);
}

.ghost-btn:hover {
  border-color: var(--tea-green);
  color: var(--tea-green-dark);
  background: var(--tea-green-light);
}

/* Checkout form */
.checkout-form {
  max-width: 700px;
  margin: 50px auto;
}

.checkout-field {
  display: block;
  margin-bottom: 28px;
}

.checkout-field label {
  display: block;
  font-weight: 600;
  font-size: 16px;
  font-family: 'Manrope', sans-serif;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.contact-method-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.contact-method-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  background: var(--bg-primary);
}

.contact-method-option:has(input:checked) {
  border-color: var(--tea-green);
  background: var(--tea-green-light);
  color: var(--tea-green-dark);
}

.contact-method-option input[type="radio"],
.contact-method-option input[type="checkbox"] {
  display: none;
}

.contact-method-required {
  opacity: 0.85;
  cursor: default;
}

.contact-required-tag {
  font-size: 11px;
  font-weight: 600;
  background: var(--tea-green);
  color: #fff;
  border-radius: 50px;
  padding: 1px 7px;
  margin-left: 4px;
  vertical-align: middle;
}

.checkout-field select,
.checkout-field textarea,
.checkout-field input {
  width: 100%;
  max-width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s;
  background: var(--bg-primary);
  box-sizing: border-box;
}

.checkout-field select {
  cursor: pointer;
}

.checkout-field select option {
  padding: 8px 12px;
}

.checkout-field select:focus,
.checkout-field textarea:focus,
.checkout-field input:focus {
  outline: none;
  border-color: var(--tea-green);
  box-shadow: 0 0 0 4px var(--tea-green-light);
}

.checkout-field textarea {
  min-height: 130px;
  resize: vertical;
}

/* Section title */
.section-title, .page-title {
  font-size: 42px;
  text-align: center;
  font-weight: 700;
  font-family: 'Times New Roman', Times, serif;
  color: var(--tea-brown-dark);
  letter-spacing: 2px;
  display: block;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: -10px;
}

/* Баннер акций */
.promo-banner {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.promo-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.promo-header {
  width: 100%;
  text-align: center;
  margin-bottom: 0px;
}

.promo-header-title {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.promo-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.promo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 8px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.promo-item-name {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.promo-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.promo-item-discount {
  background: #fff;
  color: #ff6b6b;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.promo-item-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #ff6b6b;
  border: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.promo-item-btn:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.promo-text {
  flex: 1;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
}

.promo-text strong {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}



.promo-link:hover {
  background: #fff3e0;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.category-title {
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
 margin-top: -24px;
}

/* About content */
.about-content, .delivery-content, .contacts-content {
  background: linear-gradient(180deg, #fff 0%, var(--tea-cream) 100%);
  padding: 50px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--tea-brown-light);
  white-space: pre-wrap;
}

.about-content p, .delivery-content p, .contacts-content p {
  font-size: 18px;
  line-height: 1.9;
  color: var(--text-secondary);
  font-family: 'Manrope', sans-serif;
}

/* Menu items */
.menu-item {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--tea-brown-light));
  border: none;
  padding: 16px 22px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  font-family: 'Manrope', sans-serif;
  transition: all 0.3s;
  color: var(--text-primary);
  text-align: left;
  width: 100%;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.menu-item::before {
  content: '🍃';
  position: absolute;
  left: 15px;
  opacity: 0;
  transition: all 0.3s;
}

.menu-item:hover::before {
  opacity: 1;
  left: 20px;
}

.menu-item:hover {
  background: linear-gradient(135deg, var(--tea-green), var(--tea-olive));
  color: #fff;
  padding-left: 45px;
}

/* Row */
.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1024px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  
  .catalog-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .checkout-form {
    max-width: 100%;
    padding: 0 10px;
  }
  
  .checkout-field select,
  .checkout-field textarea,
  .checkout-field input {
    min-width: auto;
  }
  
  .header-content {
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
  }

  .main-nav .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0;
    min-width: auto;
    display: none;
  }

  .main-nav .nav-dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 8px;
  }

  .main-nav .dropdown-menu a {
    padding: 10px 14px;
    font-size: 13px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 18px;
  }

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

  .section-title, .page-title {
    font-size: 32px;
  }
}

/* Product Detail Page */
.product-detail-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: 24px auto;
  max-width: 1200px;
}

.product-detail-images {
  background: #f5f5f5;
  padding: 0;
  position: relative;
}

.product-detail-gallery-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-img-main {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
}

/* Стрелки галереи */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: background-color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 0 0 2px 0;
}

.gallery-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-lg);
}

.gallery-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-prev {
  left: 12px;
}

.gallery-next {
  right: 12px;
}

.gallery-arrow[style*="visibility: hidden"] {
  pointer-events: none;
  opacity: 0.3;
}

/* Точки навигации */
.product-detail-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
}

.product-detail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--tea-green);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.product-detail-dot:hover {
  background: var(--tea-green-light);
  transform: scale(1.2);
}

.product-detail-dot.active {
  background: var(--tea-green);
  transform: scale(1.3);
}

.product-detail-info {
  padding: 32px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0px;
}

.product-detail-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: -36px 0px 16px;
}

.product-detail-price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.product-detail-current-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--tea-green-dark);
}

.product-detail-old-price {
  font-size: 20px;
  color: #999;
  text-decoration: line-through;
}

.product-detail-discount {
  background: linear-gradient(135deg, #ff5a6e, #ff8a3d);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

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

/* Переключатель режима покупки */
.product-detail-mode-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.mode-btn {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--border-color);
  background: #fff;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.mode-btn:hover {
  border-color: var(--tea-green);
  color: var(--tea-green-dark);
  background: var(--tea-green-light);
}

.mode-btn.active {
  border-color: var(--tea-green-dark);
  background: var(--tea-green);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.product-detail-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: nowrap;
}

/* Выравниваем все элементы в product-detail-actions на одном уровне */
.product-quantity-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  height: auto;
}

.product-detail-mode-selector-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.product-detail-qty {
  width: 60px;
  padding: 8px 4px;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Times New Roman', Times, serif;
  transition: all 0.3s;
  text-align: center;
  /* Убираем стрелки у input type="number" */
  -moz-appearance: textfield;
}

/* Убираем стрелки для Chrome, Safari, Edge, Opera */
.product-detail-qty::-webkit-outer-spin-button,
.product-detail-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-detail-qty:focus {
  outline: none;
  border-color: var(--tea-green);
  box-shadow: 0 0 0 3px rgba(134, 197, 152, 0.3);
}

.product-detail-stock {
  color: var(--text-secondary);
  font-size: 14px;
}

.product-detail-description,
.product-detail-section {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
}

.product-detail-description h2,
.product-detail-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px;
}

.product-detail-description p,
.product-detail-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 16px;
  white-space: pre-wrap;
}

.product-detail-reviews {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-detail-review-item {
  background: var(--tea-cream);
  padding: 16px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--tea-green);
}

.product-detail-review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.product-detail-review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-detail-review-stars {
  color: var(--tea-gold);
  font-size: 20px;
  letter-spacing: 2px;
}

.product-detail-review-date {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

.delete-review-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.delete-review-btn:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.product-detail-review-text {
  margin: 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

.product-detail-no-reviews {
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  padding: 20px;
}

.product-detail-review-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.product-detail-review-form h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--text-primary);
}

.product-detail-rating-select {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rating-label {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 600;
}

.star-rating {
  display: flex;
  gap: 4px;
  direction: ltr;
}

.star-rating .star {
  font-size: 28px;
  color: var(--tea-brown-light);
  cursor: pointer;
  transition: color 0.15s ease;
  user-select: none;
}

/* Подсветка при наведении */
.star-rating .star:hover,
.star-rating .star.hover {
  color: var(--tea-gold);
}

/* Активные звёзды (выбранные) */
.star-rating .star.active {
  color: var(--tea-gold);
}

.product-detail-review-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  margin-bottom: 12px;
  background: var(--bg-primary);
}

.product-detail-review-input:focus {
  outline: none;
  border-color: var(--tea-green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.product-detail-review-form .primary-btn {
  width: 100%;
}

.product-detail-review-login {
  margin-top: 24px;
  padding: 20px;
  background: var(--tea-cream);
  border-radius: var(--radius-md);
  text-align: center;
}

.product-detail-review-login p {
  margin: 0;
  color: var(--text-secondary);
}

.product-detail-review-login a {
  color: var(--tea-green);
  font-weight: 600;
  text-decoration: none;
}

.product-detail-review-login a:hover {
  text-decoration: underline;
}

/* Back button */
.back-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  margin: 24px 0;
  transition: background-color 0.2s ease;
}

.back-btn:hover {
  background: var(--bg-secondary);
}

/* Мои заказы */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.order-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

/* Дисконт */
.discount-card {
  background: linear-gradient(135deg, var(--tea-green-light) 0%, var(--tea-cream) 100%);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--tea-green);
  text-align: center;
  margin-bottom: 40px;
}

.discount-card h2 {
  color: var(--tea-brown-dark);
  margin-bottom: 20px;
  font-size: 28px;
}

.discount-percent {
  font-size: 72px;
  font-weight: 700;
  color: var(--tea-green-dark);
  margin: 20px 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.discount-description {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.current-discount-summary {
  text-align: center;
  margin-bottom: 20px;
}

.summary-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 5px 0;
}

.summary-text .level-text {
  font-size: 24px;
  color: var(--tea-green-dark);
}

.progress-section {
  margin: 20px 0;
}

.progress-label {
  text-align: center;
  font-weight: 600;
  color: var(--tea-green-dark);
  margin-bottom: 10px;
  font-size: 16px;
}

.progress-bar-bg {
  width: 100%;
  height: 12px;
  background: var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--tea-green), var(--tea-green-dark));
  border-radius: 6px;
  transition: width 0.5s ease;
}

.progress-section.max-level .progress-bar-fill {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.discount-tiers {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 20px 0;
}

.tiers-title {
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--tea-brown-dark);
}

.discount-tier {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}

.discount-tier:last-child {
  border-bottom: none;
}

.discount-tier.active {
  background: var(--tea-green-light);
  border-radius: var(--radius-sm);
}

.tier-amount {
  font-weight: 600;
  color: var(--tea-brown-dark);
}

.tier-percent {
  font-weight: 700;
  color: var(--tea-green-dark);
  font-size: 18px;
}

.discount-note {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 15px;
  font-style: italic;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.order-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.order-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.order-total-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-total-short {
  font-size: 17px;
  font-weight: 700;
  color: var(--tea-green-dark);
  white-space: nowrap;
}

.order-discount-badge {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #e53935;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.order-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  border-radius: 50%;
}

.order-toggle-btn:hover {
  background: var(--tea-cream);
}

.order-toggle-arrow {
  font-size: 16px;
  color: var(--text-secondary);
  display: inline-block;
  transition: transform 0.3s;
}

.order-number {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
  word-break: break-all;
}

.order-date {
  font-size: 16px;
  color: var(--text-secondary);
}

.order-status {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.order-status-new {
  background: #e3f2fd;
  color: #1976d2;
}

.order-status-processing {
  background: #fff3e0;
  color: #f57c00;
}

.order-status-completed {
  background: #e8f5e9;
  color: #388e3c;
}

.order-status-cancelled {
  background: #ffebee;
  color: #d32f2f;
}

/* Информация о доставке */
.order-delivery-info {
  background: var(--tea-cream);
  padding: 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.order-delivery-item {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.order-delivery-item:last-child {
  margin-bottom: 0;
}

.order-delivery-item strong {
  color: var(--text-primary);
}

/* Сворачиваемое содержимое заказа */
.order-content {
  transition: all 0.3s ease;
  overflow: hidden;
}

.order-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border: none;
}

/* Товары */
.order-items-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.order-items {
  margin-bottom: 20px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.order-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.order-item-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-item-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.order-item-quantity {
  font-size: 15px;
  color: var(--text-secondary);
  background: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  align-self: flex-start;
}

.order-item-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--tea-green-dark);
  white-space: nowrap;
  margin-left: 16px;
}

/* Итоговый блок */
.order-total-block {
  border-top: 2px solid var(--border-color);
  padding-top: 16px;
  margin-top: 16px;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 17px;
  color: var(--text-secondary);
}

.order-total-row span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.order-discount-row {
  color: #d32f2f;
}

.order-discount-row span:last-child {
  color: #d32f2f;
}

.order-total-final {
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
  padding-top: 12px;
  padding-left: 16px;
  padding-right: 16px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.order-total-final span:last-child {
  font-size: 22px;
  font-weight: 700;
  color: var(--tea-green-dark);
}

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

.orders-empty p {
  margin-bottom: 20px;
}

/* Login page styles */
.login-page-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 40px 20px;
}

.login-card {
  background: linear-gradient(180deg, #fff 0%, var(--tea-cream) 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--tea-brown-light);
}

.login-title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.login-description {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-info {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

.login-field {
  display: block;
}

.login-field .field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.login-field input[type="tel"],
.login-field input[type="email"],
.login-field input[type="password"],
.login-field input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--bg-primary);
}

.login-field input[type="tel"]:focus,
.login-field input[type="email"]:focus,
.login-field input[type="password"]:focus,
.login-field input[type="text"]:focus {
  outline: none;
  border-color: var(--tea-green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.login-field input[type="tel"]::placeholder,
.login-field input[type="email"]::placeholder,
.login-field input[type="password"]::placeholder,
.login-field input[type="text"]::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* Предупреждение о домене почты */
.email-domain-warning {
  display: block;
  margin-top: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: #7a4f00;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  line-height: 1.4;
}

.login-field input.input-foreign {
  border-color: #ffb300 !important;
  box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.18) !important;
}

.form-error-msg {
  color: #c62828;
  background: #fff3f3;
  border: 1px solid #ffcdd2;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 0 0 8px;
  text-align: center;
}

.email-warning-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #b8860b;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

/* Модальное окно: иностранная почта */
.foreign-email-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.foreign-email-modal {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.foreign-email-modal__icon {
  font-size: 44px;
  display: block;
  margin-bottom: 14px;
}

.foreign-email-modal__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.foreign-email-modal__text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
}

.foreign-email-modal__domains {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 14px;
  text-align: left;
  line-height: 1.8;
}

.foreign-email-modal__hint {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 24px;
  padding: 10px 12px;
  background: #f0f7f0;
  border-radius: 6px;
  border-left: 3px solid var(--tea-green);
  text-align: left;
}

.foreign-email-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.login-switch-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin: 8px 0 0;
}

.login-switch-text a {
  color: var(--tea-green-dark);
  text-decoration: none;
  font-weight: 600;
}

.login-switch-text a:hover {
  text-decoration: underline;
}

.forgot-password-link {
  display: block;
  font-size: 13px;
  color: var(--tea-green-dark);
  text-decoration: none;
  font-weight: 500;
  margin-top: 6px;
  text-align: right;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.login-code-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.login-code-step[hidden] {
  display: none;
}

.login-code-row input {
  flex: 1;
}

.login-resend-code-btn {
  padding: 10px 14px;
  font-size: 14px;
  white-space: nowrap;
}

.login-code-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

@media (max-width: 520px) {
  .login-code-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.login-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 12px;
}

.login-actions .ghost-btn {
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}

.login-actions .ghost-btn:hover {
  border-color: var(--tea-brown);
  color: var(--text-primary);
  background: var(--tea-cream);
}

.login-actions .primary-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--tea-green), var(--tea-olive));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.login-actions .primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.login-actions .primary-btn:active {
  transform: translateY(0);
}

/* Profile page styles */
.profile-card {
  background: linear-gradient(180deg, #fff 0%, var(--tea-cream) 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--tea-brown-light);
}

.profile-title {
  margin: 0 0 24px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.profile-info-row .label {
  color: var(--text-secondary);
  font-size: 14px;
}

.profile-info-row .value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
}

/* Profile info group with change link */
.profile-info-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-change-link {
  background: transparent;
  border: none;
  color: var(--tea-green);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  padding: 0 18px;
  transition: all 0.2s;
  font-family: inherit;
}

.profile-change-link:hover {
  color: var(--tea-green-dark);
  text-decoration: underline;
}

/* Password masked display */
.password-masked {
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.password-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-toggle-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  opacity: 0.6;
}

.password-toggle-btn:hover {
  opacity: 1;
  background: var(--tea-cream);
  transform: scale(1.1);
}

.password-hidden-text {
  color: var(--text-secondary);
  font-family: 'Courier New', monospace;
}

/* New profile page styles */
.profile-sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.profile-section {
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
}

.profile-section.profile-stats {
  background: linear-gradient(135deg, var(--tea-green-light) 0%, var(--tea-cream) 100%);
}

.profile-stats {
  display: flex;
  gap: 24px;
}

.profile-stat-item {
  flex: 1;
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
}

.profile-stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.profile-stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--tea-green-dark);
}

.profile-field {
  margin-bottom: 16px;
}

.profile-field:last-child {
  margin-bottom: 0;
}

.profile-field label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-field-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}

.profile-edit-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 20px;
  background: var(--tea-green);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.profile-edit-btn:hover {
  background: var(--tea-green-dark);
  transform: translateY(-1px);
}

.profile-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

.subscription-toggle-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--tea-green);
  background: transparent;
  color: var(--tea-green-dark);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subscription-toggle-btn:hover {
  background: var(--tea-green-light);
}

.subscription-toggle-btn.subscribed {
  background: var(--tea-green);
  color: #fff;
  border-color: var(--tea-green);
}

.subscription-toggle-btn.subscribed:hover {
  background: var(--tea-green-dark);
  border-color: var(--tea-green-dark);
}

.subscription-toggle-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.profile-empty {
  text-align: center;
  padding: 40px 20px;
}

.profile-empty p {
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.profile-error {
  color: #d32f2f;
  text-align: center;
  padding: 20px;
}

.profile-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* Profile modal */
.profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.profile-modal {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
}

.profile-modal-title {
  margin: 0 0 20px;
  font-size: 20px;
  color: var(--text-primary);
}

.profile-modal-hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  text-align: center;
}

.profile-modal-success {
  color: var(--tea-green-dark);
  font-weight: 600;
  text-align: center;
  padding: 20px;
}

.profile-modal-error {
  color: #d32f2f;
  text-align: center;
  padding: 20px;
}

.profile-form-group {
  margin-bottom: 20px;
}

.profile-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.profile-form-group input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: border-color 0.2s;
}

.profile-form-group input:focus {
  outline: none;
  border-color: var(--tea-green);
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  flex: 1;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.password-toggle:hover {
  opacity: 1;
}

.profile-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* No products message */
.no-products {
  text-align: center;
  padding: 60px 20px;
}

.no-products h2 {
  color: var(--text-primary);
  margin-bottom: 10px;
}

.no-products p {
  color: var(--text-secondary);
}

/* Profile modal styles */
.profile-modal {
  max-width: 450px;
}

.modal-info {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 0 0 20px;
  font-size: 14px;
  color: #856404;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.profile-stat-card {
  background: linear-gradient(135deg, var(--tea-green), var(--tea-olive));
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  color: #fff;
}

.profile-stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-stat-card .stat-label {
  font-size: 13px;
  opacity: 0.9;
}

.profile-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

/* Checkout page styles */
.checkout-page-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 60vh;
  padding: 40px 20px;
}

.checkout-card {
  background: linear-gradient(180deg, #fff 0%, var(--tea-cream) 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 700px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--tea-brown-light);
}

.checkout-title {
  margin: 0 0 24px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkout-field {
  display: block;
}

.checkout-field .field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.checkout-field select,
.checkout-field textarea,
.checkout-field input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--bg-primary);
  resize: vertical;
}

.checkout-field select:focus,
.checkout-field textarea:focus,
.checkout-field input:focus {
  outline: none;
  border-color: var(--tea-green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.checkout-field textarea {
  min-height: 80px;
}

.checkout-promo-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.checkout-promo-row button {
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--tea-green), var(--tea-olive));
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.24);
}

.checkout-promo-note {
  min-height: 20px;
  margin: 6px 0 0;
  color: var(--tea-green-dark);
  font-size: 14px;
  font-weight: 600;
}

.checkout-summary {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 8px 0;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.summary-line.discount-line {
  color: var(--tea-green-dark);
  font-weight: 600;
}

.summary-line.total {
  border-top: 2px solid var(--border-color);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Скрытие поля адреса и строки доставки при самовывозе */
.checkout-address-hidden {
  display: none !important;
}

.delivery-line-hidden {
  display: none !important;
}

.checkout-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 12px;
}

.checkout-actions .ghost-btn {
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}

.checkout-actions .ghost-btn:hover {
  border-color: var(--tea-brown);
  color: var(--text-primary);
  background: var(--tea-cream);
}

.checkout-actions .primary-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--tea-green), var(--tea-olive));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.checkout-actions .primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.checkout-actions .primary-btn:active {
  transform: translateY(0);
}

/* Dialog styles - для checkout */
dialog {
  border: none !important;
  outline: none !important;
  box-shadow: var(--shadow-xl) !important;
  background: transparent !important;
  padding: 0 !important;
  margin: auto !important;
  max-width: 420px !important;
  width: 90% !important;
}

dialog::backdrop {
  background: rgba(62, 39, 35, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Убираем рамки у формы внутри dialog */
dialog form {
  border: none !important;
  outline: none !important;
  width: 100%;
  height: 100%;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* === Планшеты (до 1024px) === */
@media (max-width: 1024px) {
  /* Контейнер */
  .container {
    max-width: 960px;
    padding: 0 20px;
  }

  /* Header */
  .header-content {
    padding: 14px 20px;
    gap: 16px;
  }

  .brand {
    font-size: 28px;
  }

  .brand::before {
    font-size: 30px;
  }

  .main-nav {
    margin-right: 40px;
  }

  .nav-link {
    font-size: 15px;
    padding: 6px 14px;
  }

  /* Hero */
  .hero {
    padding: 100px 20px 80px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 20px;
  }

  /* Сетка товаров - 2 колонки */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Каталог */
  .catalog-layout {
    grid-template-columns: 240px 1fr;
    gap: 24px;
  }

  .catalog-sidebar {
    padding: 14px 24px 24px;
  }

  /* Карточки товаров */
  .product-image {
    height: 220px;
  }

  .product-info {
    padding: 20px;
  }

  .product-name {
    font-size: 20px;
  }

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

  /* Checkout */
  .checkout-form {
    max-width: 600px;
  }
}

/* === Мобильные (до 768px) === */

/* Кнопка бургера скрыта на десктопе */
.mobile-menu-btn {
  display: none;
}

/* Элементы только для мобильного меню */
.mobile-menu-footer {
  display: none;
}

.catalog-sidebar-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  transform: rotate(90deg);
  font-size: 14px;
  opacity: 0.8;
}

.catalog-sidebar.collapsed .catalog-sidebar-arrow {
  transform: rotate(0deg);
}

.catalog-sidebar.collapsed #categoryList {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --mobile-menu-w: min(98vw, 420px);
    --mobile-menu-gap: 4px;
  }

  body.web-site.mobile-menu-open {
    overflow: hidden;
  }

  body.web-site.profile-menu-open {
    overflow: hidden;
  }

  /* Контейнер */
  .container {
    max-width: 100%;
    padding: 0 16px;
  }

  /* Header */
  .site-header {
    /* border-bottom removed */
  }

  .header-content {
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
  }

  .header-left {
    flex: 1;
    min-width: 0;
  }

  .header-search {
    max-width: 250px;
  }

  .brand {
    font-size: 24px;
  }

  .brand::before {
    font-size: 26px;
  }

  /* Навигация — мобильное меню (overlay) */
  .main-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: fixed;
    top: calc(var(--mobile-menu-gap) + env(safe-area-inset-top));
    left: 50%;
    width: var(--mobile-menu-w);
    max-width: none;
    height: auto;
    max-height: calc(100dvh - (var(--mobile-menu-gap) * 2) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 248, 225, 0.98) 100%);
    border-radius: 18px;
    border: 2px solid rgba(141, 110, 99, 0.22);
    padding: 8px 8px 8px;
    margin-top: 0;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.25s ease, opacity 0.2s ease, visibility 0s linear 0.25s;
    transform: translateX(-50%) translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    will-change: transform;
    gap: 0;
  }

  .mobile-menu-footer {
    display: block;
    margin-top: auto;
    padding: 8px 6px 2px;
    border-top: 1px solid rgba(141, 110, 99, 0.18);
  }

  .mobile-menu-phone {
    display: block;
    width: 100%;
    text-decoration: none;
    text-align: center;
    padding: 12px 12px;
    border-radius: 12px;
    background: rgba(255, 248, 225, 0.9);
    border: 1px solid rgba(141, 110, 99, 0.22);
    font-weight: 700;
    color: var(--text-primary);
    font-family: inherit;
  }

  .mobile-menu-phone:active {
    transform: scale(0.99);
  }

  .main-nav.mobile-open {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  /* Затемнение фона */
  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 999;
  }

  .mobile-overlay.active {
    display: block;
  }

  /* Профиль-меню как "бургер" */
  .profile-dropdown .dropdown-menu {
    position: fixed;
    top: calc(var(--mobile-menu-gap) + env(safe-area-inset-top));
    left: 50%;
    width: var(--mobile-menu-w);
    max-height: calc(100dvh - (var(--mobile-menu-gap) * 2) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-50%) translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: block;
    z-index: 1001;
  }

  /* На мобилке отключаем открытие профиля по :hover (иначе меню "залипает") */
  .profile-dropdown:hover .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(-8px);
  }

  .profile-dropdown.open .dropdown-menu {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Мобильный поиск — простой текстовый список без фото */
  .mobile-search-wrapper {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
    padding-right: 54px;
  }

  .mobile-search-wrapper input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
  }

  .mobile-search-wrapper input:focus {
    border-color: var(--tea-green);
  }

  .mobile-search-wrapper #mobileSearchDropdown,
  .mobile-search-results {
    margin-top: 4px;
    max-height: 40vh;
    overflow-y: auto;
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    position: static !important;
    z-index: auto !important;
  }

  .mobile-search-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 4px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
  }

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

  .mobile-search-item:active {
    background: #f5f5f0;
  }

  .mobile-search-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
  }

  .mobile-search-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
  }

  .mobile-search-item-price {
    color: var(--tea-green-dark);
    font-weight: 600;
    font-size: 14px;
  }

  .main-nav .nav-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
  }

  .nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
  }

  .nav-link:not(:last-child)::after {
    display: none;
  }

  /* Кнопка мобильного меню */
  .mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    order: 2;
    margin-left: auto;
    position: relative;
    z-index: 1002;
    flex-shrink: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(141, 110, 99, 0.25);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    font-size: 0;
    line-height: 0;
    -webkit-tap-highlight-color: transparent;
  }

  body.web-site.mobile-menu-open .mobile-menu-btn {
    position: fixed;
    top: calc(var(--mobile-menu-gap) + env(safe-area-inset-top) + 6px);
    left: calc(50% + (var(--mobile-menu-w) / 2) - 44px - var(--mobile-menu-gap) - 2px);
    z-index: 1002;
  }

  .mobile-menu-btn::before,
  .mobile-menu-btn::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 999px;
    transition: transform 0.2s ease, top 0.2s ease, box-shadow 0.2s ease;
  }

  .mobile-menu-btn::before {
    top: 15px;
    box-shadow: 0 6px 0 var(--text-primary);
  }

  .mobile-menu-btn::after {
    top: 27px;
  }

  .mobile-menu-btn[aria-expanded="true"]::before {
    top: 21px;
    transform: rotate(45deg);
    box-shadow: none;
  }

  .mobile-menu-btn[aria-expanded="true"]::after {
    top: 21px;
    transform: rotate(-45deg);
  }

  .mobile-menu-btn:active {
    transform: scale(0.98);
  }

  .mobile-menu-btn:focus-visible {
    outline: 2px solid var(--tea-green);
    outline-offset: 2px;
  }

  /* Header actions */
  .header-actions {
    gap: 8px;
  }

  .header-phone {
    display: none;
  }

  /* Мобильное меню для ссылок */
  .main-nav .nav-link[data-section] {
    display: block;
  }

  .cart-btn, .profile-btn {
    font-size: 20px;
    padding: 6px;
  }

  /* Hero */
  .hero {
    padding: 44px 16px 32px;
    margin: 0 auto 16px;
  }

  .hero h1 {
    font-size: 28px;
    margin-bottom: 8px;
  }

  .hero p {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .primary-btn {
    padding: 14px 28px;
    font-size: 16px;
  }

  /* Сетка товаров - 1 колонка */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Каталог */
  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0;
  }

  .catalog-sidebar-wrapper {
    display: block;
  }

  .catalog-sidebar {
    position: static;
    margin-bottom: 20px;
    padding: 14px 18px 20px;
  }

  .catalog-sidebar h3,
  .catalog-sidebar-toggle {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .category-link {
    font-size: 16px;
    padding: 10px 16px;
  }

  .catalog-content .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Карточки товаров */
  .product-card {
    border-radius: 18px;
  }

  .product-image {
    height: 220px;
  }

  .product-info {
    padding: 16px 18px 14px;
  }

  .product-name {
    font-size: 18px;
    min-height: auto;
  }

  .product-description-short {
    font-size: 12px;
  }

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

  .product-actions-row {
    gap: 6px;
    padding-top: 10px;
  }

  .cart-btn-card {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .qty-btn {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }

  .product-qty-input {
    width: 38px;
    height: 26px;
    font-size: 12px;
  }

  .product-card-mode-selector {
    border-radius: 16px;
  }

  .mode-btn-inline {
    padding: 4px 10px;
    font-size: 11px;
  }

  .old-price {
    font-size: 14px;
  }

  /* Страница товара */
  .product-detail-card {
    flex-direction: column;
  }

  .product-detail-images {
    width: 100%;
  }

  .product-detail-info {
    width: 100%;
  }

  .product-detail-title {
    font-size: 24px;
  }

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

  /* Корзина */
  .cart-items {
    padding: 14px 16px;
  }

  .cart-item h4 {
    font-size: 18px;
  }

  .cart-item-price-info {
    font-size: 15px;
  }

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

  .cart-item-line-total {
    font-size: 18px;
    flex-shrink: 0;
  }

  .cart-total-block {
    padding: 18px 24px;
  }

  .cart-total-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cart-total {
    font-size: 22px;
    text-align: right;
  }

  #checkoutBtn {
    padding: 12px 24px;
    font-size: 15px;
  }

  #clearCartBtn {
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Checkout */
  .checkout-form {
    max-width: 100%;
    margin: 20px auto;
  }

  .checkout-field label {
    font-size: 14px;
  }

  .checkout-summary {
    padding: 16px;
  }

  .checkout-promo-row {
    grid-template-columns: 1fr;
  }

  .summary-line {
    font-size: 15px;
  }

  .checkout-actions {
    flex-direction: column;
    gap: 12px;
  }

  .checkout-actions .ghost-btn,
  .checkout-actions .primary-btn {
    width: 100%;
    padding: 14px;
  }

  /* Страница входа/регистрации */
  .login-card {
    padding: 24px;
  }

  .login-title {
    font-size: 24px;
  }

  /* Страница профиля */
  .profile-card {
    padding: 24px;
  }

  .profile-title {
    font-size: 24px;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .login-field input[type="tel"],
  .login-field input[type="email"],
  .login-field input[type="password"],
  .login-field input[type="text"] {
    padding: 12px 14px;
    font-size: 15px;
  }

  /* Login code field */
  .login-field > div[style*="display: flex"] {
    flex-direction: column;
    gap: 12px;
  }

  .login-field > div[style*="display: flex"] button {
    width: 100%;
    padding: 12px !important;
  }

  /* Footer */
  .site-footer {
    padding: 40px 16px;
  }

  .site-footer::before {
    font-size: 24px;
    letter-spacing: 20px;
  }

  /* Dropdown меню */
  .dropdown-menu {
    min-width: 200px;
  }

  /* Modal */
  .modal-shell {
    padding: 24px;
    margin: 40px auto;
    max-width: 95%;
  }

  .modal-head h2 {
    font-size: 22px;
  }

  /* Страницы заказов и избранного */
  .orders-list,
  .order-card {
    padding: 16px;
  }
}

/* === Маленькие мобильные (до 480px) === */
@media (max-width: 480px) {
  /* Header */
  .header-content {
    padding: 10px 12px;
  }

  .header-search {
    display: none;
  }

  .brand {
    font-size: 20px;
  }

  .brand::before {
    font-size: 22px;
  }

  /* Hero */
  .hero {
    padding: 10px 12px 5px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 16px;
  }

  .primary-btn {
    padding: 12px 24px;
    font-size: 15px;
  }

  /* Карточки */
  .product-image {
    height: 180px;
  }

  .product-info {
    padding: 14px;
  }

  .product-name {
    font-size: 16px;
  }

  .product-price {
    font-size: 18px;
  }

  /* Каталог */
  .catalog-sidebar {
    padding: 12px 14px 1px;
  }

  .category-link {
    font-size: 15px;
    padding: 8px 14px;
  }

  /* Корзина */
  .cart-item h4 {
    font-size: 16px;
  }

  .cart-item-price-info {
    font-size: 14px;
  }

  .cart-item-line-total {
    font-size: 16px;
  }

  /* Checkout */
  .checkout-title {
    font-size: 22px;
  }

  /* Login */
  .login-card {
    padding: 18px;
  }

  .login-title {
    font-size: 20px;
  }

  /* Кнопки */
  .ghost-btn,
  .primary-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
}

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

/* === Ориентация landscape на мобильных === */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 60px 16px 40px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .modal-shell {
    margin: 20px auto;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* ========================================
   DISCOUNT PAGE STYLES
   ======================================== */

.discount-content {
  max-width: 800px;
  margin: 0 auto;
}

.discount-page-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
}

.discount-hero {
  text-align: center;
  border-bottom: 2px solid var(--tea-green);
}

.discount-hero h2 {
  font-size: 28px;
  color: var(--tea-brown-dark);
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 8px;
}

.discount-hero-text {
  font-size: 18px;
  color: var(--text-secondary);
}

.discount-current-status {
  text-align: center;
}

.discount-page-content .discount-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  position: static;
}

.discount-level-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.discount-level-percent {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.discount-progress-section {
  margin-top: 16px;
}

.discount-progress-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.discount-progress-bar {
  width: 100%;
  max-width: 400px;
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto 8px;
}

.discount-progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.discount-purchases-info {
  font-size: 14px;
  color: var(--text-secondary);
}

.discount-levels-grid {
  margin-bottom: 32px;
}

.discount-levels-grid h3 {
  font-size: 22px;
  color: var(--tea-brown-dark);
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 16px;
  text-align: center;
}

.discount-levels-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.discount-level-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  transition: all 0.3s;
}

.discount-level-item.current {
  border-color: var(--tea-green);
  background: var(--tea-green-light);
}

.discount-level-item.achieved {
  opacity: 0.7;
}

.discount-level-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

.discount-level-info {
  flex: 1;
}

.discount-level-info .discount-level-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.discount-level-discount {
  font-size: 16px;
  color: var(--tea-green-dark);
  font-weight: 600;
  margin-bottom: 2px;
}

.discount-level-min {
  font-size: 14px;
  color: var(--text-secondary);
}

.discount-info-block {
  background: var(--tea-cream);
  padding: 24px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--tea-green);
}

.discount-info-block h3 {
  font-size: 20px;
  color: var(--tea-brown-dark);
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 12px;
}

.discount-info-block ul {
  margin: 0;
  padding-left: 20px;
}

.discount-info-block li {
  margin-bottom: 8px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.discount-info-block p {
  margin-top: 16px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Mobile styles for discount page */
@media (max-width: 768px) {
  .discount-page-content {
    padding: 24px;
  }

  .discount-hero h2 {
    font-size: 24px;
  }

  .discount-level-item {
    padding: 12px;
  }

  .discount-level-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* === Modal Styles (для профиля и других модальных окон) === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-primary);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin: 0 0 20px;
  font-size: 24px;
  color: var(--tea-brown-dark);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--tea-green);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
}

.modal-actions .ghost-btn,
.modal-actions .primary-btn {
  min-width: 100px;
}

/* === Promotions Page === */
.promotions-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Discounted Products Section */
.discounted-products-section {
  margin-top: 40px;
  padding: 24px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.discounted-products-section .section-title {
  font-size: 24px;
  color: var(--text-primary);
  margin: 0 0 20px 0;
  text-align: center;
}

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

.discounted-products-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.discounted-category-group .discounted-products-grid {
  margin-top: 12px;
}

.discounted-category-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--tea-green-dark);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tea-green-light, #a8c08a);
  margin: 0;
}

/* Пустое состояние внутри сетки товаров */
.products-grid > .orders-empty {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.discounted-product-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

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

.discounted-product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  z-index: 1;
}

.discounted-product-image {
  width: 100%;
  height: 140px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.discounted-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discounted-product-image .no-image {
  font-size: 48px;
  opacity: 0.3;
}

.discounted-product-info {
  padding: 12px;
}

.discounted-product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discounted-product-prices {
  display: flex;
  align-items: center;
  gap: 8px;
}

.original-price {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}

.final-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--tea-green-dark);
}

.more-products-link {
  text-align: center;
  margin-top: 20px;
  color: var(--tea-green);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.more-products-link:hover {
  color: var(--tea-green-dark);
}

.promotion-item {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.promotion-item:hover {
  box-shadow: var(--shadow-md);
}

.promotion-item.promotion-unavailable {
  opacity: 0.7;
}

.promotion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--tea-cream) 0%, white 100%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.promotion-header.expanded {
  border-bottom: 1px solid var(--border-color);
}

.promotion-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.promotion-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.promotion-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.promotion-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.promotion-status-badge.inactive {
  background: #e0e0e0;
  color: #757575;
}

.promotion-status-badge.expired {
  background: #ffcdd2;
  color: #c62828;
}

.promotion-status-badge.applied {
  background: #c8e6c9;
  color: #2e7d32;
}

.promotion-status-badge.unavailable {
  background: #ffe0b2;
  color: #e65100;
}

.promotion-discount-badge {
  background: linear-gradient(135deg, var(--tea-green) 0%, var(--tea-green-dark) 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.promotion-discount-badge.discount-inactive {
  background: linear-gradient(135deg, #bdbdbd 0%, #9e9e9e 100%);
}

.promotion-arrow {
  font-size: 20px;
  color: var(--text-secondary);
  transition: transform 0.2s;
  margin-left: 12px;
}

.promotion-arrow.expanded {
  transform: rotate(90deg);
}

.promotion-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.promotion-body.expanded {
  padding: 20px;
  max-height: 1000px;
}

.promotion-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.promotion-details {
  background: var(--tea-green-light);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.promotion-details-text {
  font-size: 14px;
  color: var(--text-primary);
}

.promotion-details-text strong {
  color: var(--tea-green-dark);
}

.promotion-apply-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--tea-green) 0%, var(--tea-green-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
}

.promotion-apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.promotion-apply-btn:active {
  transform: translateY(0);
}

.promotion-apply-btn:disabled {
  background: var(--border-color);
  cursor: not-allowed;
  transform: none;
}

.promotion-applied-badge {
  display: inline-block;
  background: var(--tea-green);
  color: white;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.promotions-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.promotions-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.promotions-empty-text {
  font-size: 18px;
}

/* === New Promotions Page Styles === */
.promotions-section {
  margin-bottom: 48px;
}

.promotions-section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 20px 0;
  text-align: center;
}

/* Special Promotions Grid */
.special-promotions-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.special-promotion-card {
  background: linear-gradient(135deg, #faf8f5 0%, #fff8e1 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--tea-brown-light);
  width: 100%;
  cursor: pointer;
}

.special-promotion-card::before {
  display: none;
}

.special-promotion-card:hover {
  box-shadow: var(--shadow-lg);
}

.special-promotion-card.expanded {
  box-shadow: var(--shadow-xl);
}

/* Заголовок акции (видимая часть) */
.special-promotion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  gap: 20px;
}

.special-promotion-content {
  flex: 1;
  min-width: 0;
}

.special-promotion-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.special-promotion-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tea-brown);
}

.special-promotion-arrow svg {
  transition: transform 0.3s ease;
}

.special-promotion-card.expanded .special-promotion-arrow svg {
  transform: rotate(90deg);
}

/* Детали акции (раскрывающаяся часть) */
.special-promotion-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: white;
  border-top: 2px solid transparent;
}

.special-promotion-card.expanded .special-promotion-details {
  max-height: 300px;
  padding: 20px 32px 24px;
  border-top-color: var(--tea-brown-light);
}

.special-promotion-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.special-promotion-discount-info {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.special-promotion-discount-info strong {
  color: var(--tea-green-dark);
  font-size: 20px;
}

.special-promotion-code-inline {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.special-promotion-code-inline code {
  background: var(--tea-green-light);
  color: var(--tea-green-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.special-promotion-expiry-inline {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 16px;
}

.special-promotion-apply-btn {
  width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--tea-green) 0%, var(--tea-green-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.special-promotion-apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.special-promotion-apply-btn:active {
  transform: translateY(0);
}

.special-promotion-applied-badge {
  display: inline-block;
  background: var(--tea-green-light);
  color: var(--tea-green-dark);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  width: 100%;
  border: 1px solid var(--tea-green);
}

.special-promotion-card.expired {
  opacity: 0.6;
}

.special-promotion-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.special-promotion-badge {
  display: inline-block;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(93, 64, 55, 0.2);
}

/* Бейдж для акции "Первый заказ" - бежевый/серый */
.special-promotion-badge.badge-first-order {
  background: linear-gradient(135deg, #b8b5ad 0%, #a09e96 100%);
}

/* Бейдж для скидки - зелёный */
.special-promotion-badge.badge-discount {
  background: linear-gradient(135deg, var(--tea-green) 0%, var(--tea-green-dark) 100%);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.special-promotion-card.expired .special-promotion-badge {
  background: linear-gradient(135deg, #999 0%, #666 100%);
}

.special-promotion-code {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: var(--radius-md);
  border: 2px dashed var(--tea-green);
  margin-bottom: 14px;
}

.special-promotion-code span {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

.special-promotion-code code {
  font-size: 18px;
  font-weight: 700;
  color: var(--tea-green-dark);
  background: var(--tea-green-light);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
}

.special-promotion-expiry {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Discounted Products Grid */
.discounted-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.discounted-product-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.discounted-product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.discounted-product-image-wrapper {
  position: relative;
  width: 100%;
}

.discounted-product-discount {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(238, 90, 36, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.discounted-product-image {
  width: 100%;
  height: 200px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.discounted-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.discounted-product-image img[src$=".svg"] {
  object-fit: contain;
  padding: 20px;
}

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

.discounted-product-placeholder {
  font-size: 64px;
  opacity: 0.3;
}

.discounted-product-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  padding: 16px 16px 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discounted-product-prices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 16px 16px;
}

.discounted-product-old {
  font-size: 15px;
  color: #999;
  text-decoration: line-through;
}

.discounted-product-new {
  font-size: 22px;
  font-weight: 700;
  color: var(--tea-green-dark);
}

.discounted-product-btn,
.discounted-add-to-cart-btn {
  width: calc(100% - 32px);
  margin: auto 16px 16px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--tea-green) 0%, var(--tea-green-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.discounted-product-btn:hover,
.discounted-add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

@media (max-width: 768px) {
  .promotion-header {
    padding: 16px;
  }

  .promotion-title {
    font-size: 16px;
  }

  .promotion-discount-badge {
    padding: 6px 12px;
    font-size: 14px;
  }

  .promotion-body.expanded {
    padding: 16px;
  }
  
  .special-promotion-card {
    max-width: 100%;
  }
  
  .discounted-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

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

/* ===================== BLOG ===================== */

.blog-grid-wrapper {
  padding: 0 0 40px;
}

.blog-loading,
.blog-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 0;
}

/* Hero row: small card + featured card */
.blog-hero-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* 3-column grid for the rest */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* === Base card === */
.blog-card {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
}

.blog-card-img-wrap {
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.blog-card:hover .blog-card-img {
  transform: scale(1.03);
}

.blog-card-img--placeholder {
  background: var(--bg-secondary, #f5f0e8);
}

/* === Small card === */
.blog-card--small .blog-card-img-wrap {
  height: 220px;
}

.blog-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.blog-card-cat {
  font-size: 12px;
  font-weight: 600;
  color: var(--tea-green-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-card-cat--light {
  color: rgba(255,255,255,0.85);
}

.blog-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #2d1b0e);
  line-height: 1.35;
  margin: 0;
}

.blog-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.blog-card-meta--light {
  color: rgba(255,255,255,0.75);
}

.blog-card-views {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* === Featured card === */
.blog-card--featured {
  position: relative;
  min-height: 340px;
}

.blog-card--featured .blog-card-img-wrap {
  position: absolute;
  inset: 0;
  height: 100%;
}

.blog-card-featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 22px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
}

.blog-card-featured-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin: 0;
}

/* === Article full page === */
.article-back-btn {
  background: none;
  border: none;
  color: var(--tea-green-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-back-btn:hover {
  opacity: 0.75;
}

.article-full {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.article-cover {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 28px;
  display: block;
}

.article-header {
  margin-bottom: 28px;
}

.article-category {
  font-size: 12px;
  font-weight: 700;
  color: var(--tea-green-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 10px;
}

.article-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary, #2d1b0e);
  margin: 0 0 12px;
}

.article-meta {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  gap: 16px;
}

.article-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary, #2d1b0e);
}

.article-body h1,
.article-body h2,
.article-body h3 {
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-primary, #2d1b0e);
}

.article-body h1 { font-size: 26px; }
.article-body h2 { font-size: 22px; }
.article-body h3 { font-size: 18px; }

.article-body p {
  margin: 0 0 16px;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body a {
  color: var(--tea-green-dark);
  text-decoration: underline;
}

.article-body img,
.article-inline-img {
  max-width: 100%;
  border-radius: 10px;
  margin: 16px 0;
  display: block;
}

.article-body strong { font-weight: 700; }
.article-body em { font-style: italic; }

/* === Responsive === */
@media (max-width: 900px) {
  .blog-hero-row {
    grid-template-columns: 1fr;
  }

  .blog-card--featured {
    min-height: 280px;
  }

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

@media (max-width: 560px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card--small .blog-card-img-wrap {
    height: 180px;
  }

  .blog-card-featured-title {
    font-size: 18px;
  }

  .article-title {
    font-size: 24px;
  }
}


/* ── Toast-уведомления ─────────────────────────────────────────────────────── */
#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 360px;
  width: calc(100% - 40px);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
  pointer-events: all;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-size: 14px;
  line-height: 1.5;
  border-left: 4px solid transparent;
  word-break: break-word;
}

.toast--visible  { opacity: 1; transform: translateX(0); }
.toast--hiding   { opacity: 0; transform: translateX(24px); }

.toast--success { border-left-color: #4caf50; }
.toast--error   { border-left-color: #d32f2f; }
.toast--warning { border-left-color: #ffb300; }
.toast--info    { border-left-color: #1976d2; }

.toast__icon {
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1.5;
  font-weight: 700;
}
.toast--success .toast__icon { color: #4caf50; }
.toast--error   .toast__icon { color: #d32f2f; }
.toast--warning .toast__icon { color: #e65100; }
.toast--info    .toast__icon { color: #1976d2; }

.toast__message { flex: 1; color: #222; }

.toast__close {
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  font-size: 13px;
  padding: 0;
  flex-shrink: 0;
  line-height: 1.5;
  transition: color 0.15s;
}
.toast__close:hover { color: #555; }

@media (max-width: 480px) {
  #toastContainer {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
}
/* ─────────────────────────────────────────────────────────────────────────── */


/* ── Confirm-диалог ─────────────────────────────────────────────────────── */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 20px;
}
.confirm-modal-overlay[hidden] { display: none; }

.confirm-modal {
  background: var(--bg-primary, #fff);
  border-radius: 14px;
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.confirm-modal__message {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary, #222);
  margin: 0 0 24px;
  white-space: pre-wrap;
}

.confirm-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-btn-danger {
  background: #d32f2f !important;
  border-color: #d32f2f !important;
}
.confirm-btn-danger:hover {
  background: #b71c1c !important;
}
/* ─────────────────────────────────────────────────────────────────────────── */
