  /* Общие стили */
      body {
        font-family: Arial, sans-serif;
        text-align: center;
        margin: 0;
        padding: 0;
        background-color: #ffe5ec;
        font-size: 12px !important;
      }

      header {
        background-color: #ff4d6d;
        color: white;
        padding: 20px;
      }

        #addToCartFromGallery {
    background-color: #ff4d6d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin: 0 15px;
  }
  #addToCartFromGallery:hover {
    background-color: #e03e5c;
  }
  @media (min-width: 1024px) {
    #imageModal img {
      margin-top: 0;   /* убрать отступ сверху */
      transform: translateY(-1%); /* подвинуть чуть выше */
    }
  }
  .product .gallery {
    position: relative;
  }
  .product {
    position: relative;
  }
  .product .badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, #ff79c6, #bd93f9);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  }

      .intro {
    position: relative;
    background-image: url('images/4.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    overflow: hidden;
  }

  /* полупрозрачный градиент поверх фото */
  .intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.55) 0%,     /* потемнее сверху */
      rgba(0, 128, 0, 0.35) 40%,  /* лёгкий зелёный в середине */
      rgba(0, 0, 0, 0.6) 100%     /* снова затемнение снизу */
    );
    z-index: 0;
  }

  /* чтобы текст был поверх градиента */
  .intro h1,
  .intro p,
  .intro a {
    position: relative;
    z-index: 1;
  }

  /* ссылка в интро, чтобы читалась */
  .intro a {
    color: #b3ffce;
    font-weight: bold;
    text-decoration: underline;
  }
  .intro a:hover {
    color: #ffffff;
  }


    .product {
    position: relative;
    flex: 0 0 auto;
    width: 250px;               /* ✅ вернули фиксированную ширину */
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
      .product img {
        width: 100%;
        height: 250px;
        object-fit: cover;
        border-radius: 5px;
      }

      .add-to-cart {
        background-color: #ff4d6d;
        color: white;
        border: none;
        padding: 10px;
        border-radius: 5px;
        cursor: pointer;
        margin-top: 10px;
      }

      .add-to-cart:hover {
        background-color: #e03e5c;
      }

      .cart {
        margin-top: 20px;
        padding: 20px;
        background: white;
        border-radius: 10px;
        box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
      }

      #cart-items {
        list-style: none;
        padding: 0;
      }
  header {
    background-color: #ff4d6d;
    color: white;
    padding: 20px;
  }
      .add-to-cart, #clear-cart, #buy-cart {
        background-color: #ff4d6d;
        color: white;
        border: none;
        padding: 10px;
        border-radius: 5px;
        cursor: pointer;
        margin-top: 10px;
      }
      #cart-items li {
        display: flex;
        justify-content: space-between;
        background: #fff;
        margin: 5px 0;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
      }

      .remove-item {
        background: red;
        color: white;
        border: none;
        cursor: pointer;
        padding: 5px;
        border-radius: 5px;
      }

      #clear-cart {
        background: #ff4d6d;
        color: white;
        border: none;
        padding: 10px;
        border-radius: 5px;
        cursor: pointer;
        margin-top: 10px;
      }

      .container {
        padding: 20px;
        background: white;
        margin-top: 20px;
        border-radius: 10px;
      }
    
      .highlight {
        font-weight: bold;
        color: #ff4d6d;
      }

      .intro {
    background-image: url('images/4.jpg'); /* фон ВВЕРХУ */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    padding: 20px;
  }

  footer {
    background-image: url('images/8.jpg'); /* фон ВНИЗУ */
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 20px;

      }



  .modal h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    color: #ff4d6d;
  }

  .modal input,
  .modal select,
  .modal textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
  }

  .modal button[type="submit"] {
    width: 100%;
    background: #ff4d6d;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
  }

  .modal button[type="submit"]:hover {
    background: #e03e5c;
  }

  #cardMessage {
    font-size: 12px;
    margin-bottom: 10px;
  }

      .close-button {
        float: right;
        font-size: 20px;
        font-weight: bold;
        border: none;
        background: none;
        cursor: pointer;
      }
    .notification {
      display: none;
      position: fixed;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      background-color: #4CAF50; /* Зелёный фон */
      color: white; /* Белый текст */
      padding: 15px 20px;
      border-radius: 5px;
      font-weight: bold; /* Жирный текст */
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      text-align: center;
      z-index: 1000;
  }

  .notification.show {
      display: block;
  }

  .notification.error {
      background-color: #f44336; /* Красный фон для ошибок */
  }

    
          .modal-overlay {
              display: none;
              position: fixed;
              top: 0; left: 0;
              width: 100%; height: 100%;
              background: rgba(0, 0, 0, 0.5);
              z-index: 1000;

          }
          .notification {
              position: fixed;
              top: 20px; right: 20px;
              padding: 15px;
              border-radius: 5px;
              color: white;
              font-weight: bold;
              display: none;
              z-index: 1000;
          }
          .success { background-color: #4CAF50; }
          .error { background-color: #F44336; }
      .modal input {
        width: 90%;
        padding: 8px;
        margin: 10px 0;
        border: 1px solid #ccc;
        border-radius: 5px;
      }

  .modal button {
    background: linear-gradient(135deg, #ff4d6d, #ff85a2);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
  }

  .modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255,77,109,0.4);
  }

      .modal button:hover {
        background-color: #e03e5c;
      }

    .main-title {
      font-size: 18px; /* Увеличенный заголовок */
      color: black; /* Красный цвет заголовка */
      font-weight: bold;
    }

    .sub-text {
      font-size: 20px; /* Чуть меньше заголовка */
      color: #5a3e1b; /* Темно-коричневый для контраста */
    }


  .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
  }
  /* Контейнер тостов */
  #toastContainer {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
  }

  /* Базовый стиль тоста */
  .toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffbdd3, #ffe5ec);
    color: #3b1d2b;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateX(30px) translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: 280px;
    border: 1px solid rgba(255,255,255,0.8);
    backdrop-filter: blur(6px);
  }

  /* Состояние "показан" */
  .toast.show {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }

  /* Иконка слева через псевдоэлемент */
  .toast::before {
    content: "🍭";
    font-size: 18px;
  }

  /* Успех — зелёный конфетный градиент */
  .toast-success {
    background: linear-gradient(135deg, #9be15d, #00e3ae);
    color: #0b2e1f;
  }

  /* Ошибка — розово-красный конфетный градиент */
  .toast-error {
    background: linear-gradient(135deg, #ff4d6d, #ff9a9e);
    color: #fff;
  }

  /* Свою иконку для типов можно тоже задать */
  .toast-success::before {
    content: "✅";
  }

  .toast-error::before {
    content: "⚠️";
  }
  .products.list-view {
    display: flex;
    flex-direction: column;
  }

  .products.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* сетка */
    gap: 15px;
    overflow: visible; /* убираем горизонтальный скролл */
  }
  
      .sort-controls {
    margin: 15px 0;
    text-align: center;   /* выравнивание по центру */
  }

  .sort-controls label {
    margin-right: 8px;
    font-weight: bold;
  }
      
  .sort-controls select,
  .sort-controls button {
    margin: 5px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 10px;
    cursor: pointer;
  }

  .old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-right: 4px;
  }

  .new-price {
    font-weight: bold;
    color: #ff4d6d;
  }

  /* === Полноэкранная модалка === */
  #modalOverlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 3000;
  }

  #modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    z-index: 3100;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 0;
  }

  #modal h2 {
    text-align: center;
    color: #ff4d6d;
    margin-bottom: 15px;
  }

  #modal form {
    max-width: 600px;
    margin: 0 auto;
  }

  /* Блокировка скролла сайта при открытии */
  body.modal-open {
    overflow: hidden;
  }

  /* Добавляем немного пространства снизу под рандомные товары */
  #randomProducts {
    margin-top: 30px;
  }
  #randomProducts h3 {
    text-align: center;
    color: #ff4d6d;
    margin-bottom: 10px;
  }
  #randomList {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  #randomList div {
    flex: 0 0 150px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  #randomList div img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
  }
  #randomList div button {
    background: #ff69b4;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 6px;
  }
  #randomList div button:hover {
    background: #e03e5c;
  }
  #cartSummaryList {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
  }
  #cartSummaryList input[type="number"] {
    font-size: 12px;
    padding: 2px;
  }
  /* === Красивая корзина с мини-фотками === */
  #cart-items {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  #cart-items li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    margin: 8px 0;
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    gap: 10px;
  }

  /* Левая часть — фото + текст */
  .cart-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
  }

  .cart-item-left img {
    width: 50px;          /* 🔸 маленькая картинка */
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    flex-shrink: 0;
  }

  /* Название и цена */
  .cart-item-info {
    text-align: left;
    font-size: 13px;
    overflow: hidden;
  }

  .cart-item-name {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 3px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cart-item-price {
    color: #555;
    font-size: 12px;
  }

  /* Кнопки управления */
  .cart-controls {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .cart-controls button {
    background: #ff4d6d;
    color: #fff;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
  }

  .cart-controls button:hover {
    background: #e03e5c;
  }

  .cart-controls .remove-item {
    background: none;
    color: #888;
    font-size: 16px;
    width: auto;
  }

  .cart-controls .remove-item:hover {
    color: #ff4d6d;
  }

  .qty-input {
    width: 38px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    height: 26px;
    font-size: 13px;
    padding: 0;
  }
  /* Header: плавное скрытие/появление */
  #topBar {
    position: fixed; /* обязательно fixed */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    transition: transform 0.28s cubic-bezier(.2,.8,.2,1), box-shadow 0.28s;
    will-change: transform;
  }

  /* Когда шапка скрыта — класс .hidden */
  #topBar.hidden {
    transform: translateY(-100%);
  }

  /* Лёгкая тень когда прокручено */
  #topBar.scrolled {
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  }

  /* Чтобы содержимое не скрывалось под шапкой — padding-top динамически задаём JS,
    при желании можно задать запас сразу: */
  body {
    margin: 0;
  }
  #cartHeader {
    transition: all 0.25s ease;
  }
  #cartHeader:hover {
    background: #ffd8e5; /* немного темнее при наведении */
    transform: translateY(-1px);
  }
  body.modal-open {
    overflow: hidden;
  }
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 182, 193, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
  }

  .modal-overlay.hidden { display: none; }
  /* Финальное подтверждение - как основная кнопка корзины */
  #finalConfirmBtn {
    background: linear-gradient(135deg, #ff4d6d, #ff85a2);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  #finalConfirmBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255,77,109,0.4);
  }
  /* Кнопка "Вернуться" */
  #backToCartBtn {
    background: #fff;
    color: #ff4d6d;
    border: 2px solid #ffb3c1;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  #backToCartBtn:hover {
    background: #fff0f4;
    transform: translateY(-1px);
  }

  .modal-content {
    background: linear-gradient(135deg, #fff5f8, #ffffff);
    padding: 30px 25px;
    border-radius: 22px;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(255, 77, 109, 0.25);
    animation: modalPop 0.35s ease;
  }

  /* Анимация появления */
  @keyframes modalPop {
    0% {
      transform: scale(0.85) translateY(10px);
      opacity: 0;
    }
    100% {
      transform: scale(1) translateY(0);
      opacity: 1;
    }
  }
  .nice-title {
    font-size: 20px;
    color: #ff4d6d;
    margin-bottom: 8px;
    font-weight: bold;
  }

  .nice-sub {
    font-size: 13px;
    color: #666;
    margin-bottom: 18px;
  }

  .loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
  }

  .loading-overlay.hidden { display: none; }

  .loader {
    width: 50px;
    height: 50px;
    border: 6px solid #ccc;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s infinite linear;
  }

  @keyframes spin { 100% { transform: rotate(360deg); } }

  .order-toast {
    position: fixed;
    right: -300px;
    top: 30px;
    background: #4caf50;
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    transition: 0.4s ease;
    z-index: 4000;
  }

  .order-toast.show {
    right: 30px;
  }
  /* Бейдж скидки в галерее */
  #galleryDiscountBadge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ff1e00, #ff5e00);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(255,50,0,0.5);

    animation: flame 1.5s infinite alternate;
    display: none; /* по умолчанию скрыт, JS включает */
  }

  /* Анимация огня */
  @keyframes flame {
    0% {
      filter: drop-shadow(0 0 3px #ff3b00);
    }
    100% {
      filter: drop-shadow(0 0 8px #ff8c42);
    }
  }
  /* Сердечко на карточке товара */
  .fav-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ff4d6d;
    cursor: pointer;
    user-select: none;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease,
      background 0.2s ease,
      color 0.2s ease;
  }

  /* лёгкое увеличение при наведении */
  .fav-icon:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  }

  /* активное сердечко (товар в избранном) */
  .fav-icon.active {
    background: radial-gradient(circle at 30% 0%, #ffd1e8 0, #ff4d6d 55%, #ff0066 100%);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 8px 18px rgba(255, 77, 109, 0.5);
  }

  /* небольшая "пульсация" при активации (по желанию) */
  .fav-icon.active {
    animation: fav-pop 0.25s ease-out;
  }

  @keyframes fav-pop {
    0%   { transform: scale(0.6); opacity: 0; }
    70%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1.1); }
  }


  .fav-header-count {
    position: relative;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ff4d6d;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #ffeef3;
  }

  /* Строка избранного во всплывающем списке */
  #favPreviewItems {
    margin: 0;
    padding: 0;
  }

  .favPreviewItem {
    list-style: none;
  }

  .fav-preview-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease, transform 0.15s ease;
  }

  .fav-preview-row:hover {
    background: #ffeef5;
    transform: translateY(-1px);
  }

  .fav-preview-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
  }
  /* Контейнер избранного в шапке (если хочешь — можешь убрать inline-стили и оставить это) */
  #favoritesHeader {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 238, 245, 0.95);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 105, 180, 0.25);
  }

  /* Градиентное сердечко-кружок */
  .fav-header-icon {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    background: radial-gradient(circle at 30% 0%, #ffe6fb 0, #ff8ac9 40%, #ff4d6d 75%, #ff0f7b 100%);
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.6);

    color: #ffffff;
    font-size: 18px;
    line-height: 1;

    transition:
      transform 0.18s ease,
      box-shadow 0.18s ease,
      filter 0.18s ease;
  }

  /* Бейджик количества избранного */
  #favCount {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff4d6d;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #ffeef5;
  }

  /* Ховер по блоку избранного */
  #favoritesHeader:hover .fav-header-icon {
    transform: translateY(-1px) scale(1.08);
    box-shadow: 0 6px 16px rgba(255, 77, 109, 0.7);
    filter: brightness(1.05);
  }

  .fav-preview-info {
    flex: 1;
    text-align: left;
  }

  .fav-preview-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fav-preview-price {
    font-size: 11px;
    color: #666;
  }

  /* Подсветка карточки товара, когда к ней скроллим из избранного */
  .favorite-highlight {
    box-shadow: 0 0 0 3px #ff4d6d;
    transition: box-shadow 0.3s ease;
  }
  .return-view-btn {
    position: fixed;
    right: 12px;
    bottom: 80px;
    z-index: 2200;

    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;

    background: linear-gradient(135deg, #ff4d6d, #ff9a9e);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);

    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
  }

  .return-view-btn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* 🔻 Адаптация под телефоны */
  @media (max-width: 600px) {
    .return-view-btn {
      left: 50%;
      right: auto;
      bottom: max(60px, env(safe-area-inset-bottom, 0px) + 16px); /* чтобы не уехать под нижнюю панель */
      transform: translate(-50%, 10px);
      max-width: 90vw;
      text-align: center;
      font-size: 11px;
      padding: 6px 10px;
      white-space: nowrap;
    }

    .return-view-btn.show {
      transform: translate(-50%, 0);
    }
  }

  .fav-remove-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    margin-left: 4px;
    color: #cc3344;
    transition: transform 0.15s ease, color 0.15s ease;
  }

  .fav-remove-btn:hover {
    transform: scale(1.1);
    color: #ff0033;
  }
  .fav-add-cart-btn {
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    border: none;
    background: #ff4d6d;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: transform .15s, background .15s;
  }

  .fav-add-cart-btn:hover {
    background: #ff234a;
    transform: scale(1.05);
  }

  .fav-remove-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    margin-left: 6px;
    transition: transform .1s ease, color .15s ease;
  }

  .fav-remove-btn:hover {
    transform: scale(1.1);
    color: #ff0033;
  }
  /* Анимация исчезновения элементов корзины при очистке */
  #cart-items.cart-clearing .cart-item-removing {
    animation: cartItemFadeOut 0.35s ease forwards;
  }

  @keyframes cartItemFadeOut {
    to {
      opacity: 0;
      transform: translateX(-10px);
      height: 0;
      margin: 0;
      padding: 0;
    }
  }
  #undoClearCartBtn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background: #333;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 99999;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  /* Показ */
  #undoClearCartBtn.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

  /* Исчезновение */
  #undoClearCartBtn.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    pointer-events: none;
  }
  #cartHeader:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
  }
  /* мобильные фильтры по умолчанию скрыты */
  .mobile-filters {
    display: none;
  }

  /* На маленьких экранах — показываем свои, убираем селекты */
  @media (max-width: 768px) {
    .sort-controls label,
    .sort-controls select,
    .sort-controls button {
      display: none; /* прячем старые селекты и кнопки сброса */
    }

    .mobile-filters {
      display: block;
      margin: 10px 10px 0;
      font-size: 12px;
    }

    .mobile-filters-title {
      display: block;
      font-weight: bold;
      margin-bottom: 4px;
    }

    .mobile-sort,
    .mobile-cats {
      margin-bottom: 8px;
    }

    .mobile-sort button,
    .mobile-cats-scroll button {
      border: none;
      border-radius: 999px;
      padding: 5px 10px;
      margin: 2px 4px 4px 0;
      background: #ffe5ec;
      color: #ff2b5f;
      font-size: 11px;
      cursor: pointer;
      white-space: nowrap;
    }

    .mobile-cats-scroll {
      display: flex;
      overflow-x: auto;
      padding-bottom: 4px;
    }

    .mobile-cats-scroll::-webkit-scrollbar {
      height: 4px;
    }

    .mobile-cats-scroll::-webkit-scrollbar-thumb {
      background: #ff9bbd;
      border-radius: 4px;
    }

    .mobile-sort button.active,
    .mobile-cats-scroll button.active {
      background: #ff4d6d;
      color: #fff;
    }
  }
  @media (max-width: 768px) {
    .mobile-sort-btn.active,
    .mobile-cat-btn.active {
      background: #ff4d6d;
      color: white;
    }
  }
  /* 📱 Мобильный режим: переключение вида → сетка 2 товара */
  @media (max-width: 768px) {

    /* Контейнер превращаем в сетку */
    .products.view-large,
    .products-main.view-large,
    .products-extra.view-large {
      display: grid !important;
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 12px !important;

      overflow-x: visible !important;
      flex-wrap: nowrap !important;
    }

    /* Перебиваем ВСЕ флекс-настройки карточек */
    .products.view-large .product,
    .products-main.view-large .product,
    .products-extra.view-large .product {
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      flex: none !important;
    }

    /* Чтобы изображение вписывалось красиво */
    .products.view-large .product img {
      width: 100% !important;
      height: auto !important;
      object-fit: cover;
    }
  }
  /* 📱 Мобильная сетка: одинаковая высота изображений во всех карточках */
  @media (max-width: 768px) {

    .products.view-large .product img,
    .products-main.view-large .product img,
    .products-extra.view-large .product img {
      width: 100% !important;
      height: 170px !important;      /* можешь 160 / 180 подобрать по вкусу */
      object-fit: cover !important;
      border-radius: 10px;
      display: block;
    }

  }

  @media (min-width: 1024px) {
    .products.grid-view,
    .products-main.grid-view,
    .products-extra.grid-view {
      display: grid !important;
      grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
      gap: 12px !important;
    }

    .products.grid-view .product,
    .products-main.grid-view .product,
    .products-extra.grid-view .product {
      width: 100% !important;   /* 🔥 только в режиме сетки ломаем 250px */
      margin: 0 !important;
    }
  }

  /* ПК: режим "сеткой" = 7 товаров в ряд */
  @media (min-width: 1024px) {
    .products.grid-view,
    .products-main.grid-view,
    .products-extra.grid-view {
      display: grid !important;
      grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
      gap: 10px !important;   /* расстояние между товарами */
    }
  }
/* шапка – общая сетка */
#topBar {
  display: flex;
  align-items: center;
}

/* слева — текст */
.header-left {
  flex: 0 0 auto;
}

/* центр – держатель поиска */
.header-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

/* базовый (ПК) вид поиска: широкий, примерно как раньше */
.search-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 360px;  /* широкое поле на ПК */
}

/* Сам инпут – на всю доступную ширину, с запасом под крестик */
#searchInput {
  width: 100%;
  padding-right: 34px; /* чтобы текст не упирался в X */
}

/* На очень узких телефонах – инпут на всю ширину, без max-width */
@media (max-width: 480px) {
  .header-center > div {
    max-width: 100%;
  }

  #searchInput {
    padding-right: 36px;          /* чуть больше места под X */
  }
}
/* Сам инпут – побольше место справа под крестик */
#searchInput {
  width: 100%;
  padding-right: 42px;       /* было 32px – добавили, чтобы текст не залазил под X */
  border-radius: 999px;
}

/* Крестик – максимально вправо + затемнённая подложка */
#clearSearchBtn {
  position: absolute;
  right: 4px;                /* почти к самому краю */
  top: 50%;
  transform: translateY(-50%);

  display: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;

  padding: 2px 6px;          /* маленькая «капсула» вокруг X */
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06); /* лёгкое затемнение под крестиком */

  color: #ff2b5f;
  border: none;
  transition: color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

#clearSearchBtn:hover {
  background: rgba(0, 0, 0, 0.12); /* чуть сильнее при наведении */
  color: #ff003c;
  transform: translateY(-50%) scale(1.08);
}

#clearSearchBtn:hover {
  color: #ff2b5f;
  transform: translateY(-50%) scale(1.08);
}
.product-description {
  font-size: 12px;
  color: #555;
  margin: 5px 0 8px;
  line-height: 1.3;
}
/* 📱 Мобильный вид поиска – делаем ровно как в твоём inline-примере */
@media (max-width: 768px) {

  .search-wrapper {
      width: 68px;
    max-width: 50px;     /* уменьшили ширину поиска, как у тебя */
    margin-left: -100px; /* сдвиг влево */
    margin-right: -20px; /* и чуть ещё поджали справа */
  }

  #searchInput {
    margin-left: 20px;   /* как у тебя в style="" */
    font-size: 15px;     /* можно оставить так же */
  }

  #clearSearchBtn {
    right: 4px;
    transform: translateY(-50%);
  }
}
@media (max-width: 768px) {
  #searchInput {
    padding-right: 42px;
  }

  #clearSearchBtn {
    right: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
  }

  #clearSearchBtn:hover {
    background: rgba(0, 0, 0, 0.12);
    transform: translateY(-50%) scale(1.08);
  }
}
#toggleView {
  width: 150px;
  text-align: center;
}
/* 📱 Когда включён "крупный вид" на телефоне — чуть сужаем карточки */
@media (max-width: 768px) {
  .products.view-large,
  .products-main.view-large,
  .products-extra.view-large {
    /* делаем колонки не по 1fr, а по 0.9fr → между товарами появляется чуть больше воздуха */
    grid-template-columns: repeat(1, minmax(0, 0.1)) !important;
    column-gap: 1px !important;  /* можешь 14/16 поставить, если хочешь ещё больше расстояние */
  }

  .products.view-large .product,
  .products-main.view-large .product,
  .products-extra.view-large .product {
    padding: 0px;   /* вместо 10px → визуально тоже чуть уже и аккуратнее */
  }
}

/* 📸 В режиме переключённого вида — изображение делаем чуть уже */
.products.view-large .product img,
.products-main.view-large .product img,
.products-extra.view-large .product img {
  width: 90% !important;   /* было 100% — теперь чуть уже */
  margin: 0 auto;          /* центрируем */
  display: block;          /* чтобы margin сработал */
}
.variant-price-note {
  font-size: 11px;
  margin-top: 4px;
  color: #666;
  opacity: 0.9;
}
.product-variants {
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  background: #fff7fb;
  border: 1px solid #ffd6e9;
  display: none;
}

.product-variants.open {
  display: block;
}

.product-variant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.product-variant-row img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
}

.product-variant-info {
  flex: 1;
  font-size: 12px;
}

.product-variant-name {
  font-weight: bold;
  margin-bottom: 2px;
}

.product-variant-price {
  color: #555;
  margin-bottom: 4px;
}

.product-variant-row .add-to-cart {
  font-size: 11px;
  padding: 4px 8px;
}
#siteVersion {
  position: fixed;      /* всегда внизу экрана */
  bottom: 4px;
  right: 6px;
  font-size: 9px;        /* почти прозрачный */
  color: #000;          /* или #fff, если фон тёмный */
  pointer-events: none; /* чтобы не мешал кликам */
  user-select: none;    /* чтобы нельзя было выделить */
  z-index: 1;           /* под основными элементами UI */
  mix-blend-mode: soft-light; /* ещё больше прячет на фоне */
}
.snowflake{
  will-change: transform;
  transform: translateZ(0);
}
.intro { position: relative; overflow: hidden; }
.intro-bg{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  z-index:0;
}
.intro::before{ z-index:1; }
.intro h1, .intro p, .intro a{ z-index:2; }
@media (max-width: 768px) {
  #snow-container { display: none !important; }
}
.social-bar {
  display: flex;
  align-items: center;
  gap: 15px;

  padding: 15px 20px;
}

.social-bar span {
  font-weight: 500;
}

.social-link {
  font-size: 22px;
  color: #333;
  text-decoration: none;
}

.social-link:hover {
  color: #0088cc; /* можно разные цвета */
}
/* ===== НОВИНКИ ===== */
.novinki-section {
  margin: 30px 10px;
  padding: 15px;
  background: #fff7fb;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.novinki-title {
  text-align: center;
  font-size: 22px;
  margin-bottom: 15px;
  color: #ff2b5f;
}

.novinki-list {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.novinki-item {
  min-width: 270px;
  max-width: 270px;
  background: white;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* чтобы iframe красиво вписывался */
.novinki-item iframe {
  width: 100%;
  border-radius: 10px;
}
