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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #ffffff;
    color: #111111;
    line-height: 1.5;
}

/* Верхняя панель */
.top-bar {
    text-align: center;
    padding: 15px;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 90;
}

.phone-link {
    font-weight: 800;
    font-size: 1.1rem;
    color: #111111;
    text-decoration: none;
    letter-spacing: -0.02em;
}

/* Расширенный главный контейнер */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 80px 20px;
}

.category-section {
    margin-bottom: 70px;
}

.category-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 40px;
    letter-spacing: -0.03em;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 200px;
}

/* КАРТОЧКА ТОВАРА */
.product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    height: 440px;              /* Задаём фиксированную высоту фона */
    padding: 0 60px;            /* Оставляем только боковые отступы */
    border-radius: 40px;
    background-color: transparent; /* Если заливка только при ховере */
    transition: background-color 0.5s ease, transform 0.4s ease;
    overflow: visible;          /* Позволяет картинке выходить за границы плашки */
    position: relative;
}

.product-card:hover {
    background-color: var(--bg-color);
    transform: translateY(-2px);
}

.product-card:nth-child(even) {
    flex-direction: row-reverse;
}

/* КОНТЕЙНЕР ДЛЯ ИЗОБРАЖЕНИЯ */
.product-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;               /* Центрирование относительно высоты карточки */
}

/* ИЗОБРАЖЕНИЕ: ВЫСОТА 600px, ШИРИНА АДАПТИВНАЯ */
.product-image {
    height: 500px;              /* Задайте нужную высоту (больше 440px) */
    width: auto;
    max-width: none;            /* Предотвращает сжатие картинки */
    object-fit: contain;
    background: transparent;
    box-shadow: none;
    margin: 0;                  /* Убираем старые отрицательные марджины */
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.12));
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.03) rotate(-1deg);
}

/* ИНФОРМАЦИЯ О ТОВАРЕ */
.product-info {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.product-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

/* Заголовок Font 70 */
.product-title {
    font-size: 70px;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

/* Текст описания и вес: Font 18 */
.product-desc {
    font-size: 18px;
    color: #555555;
    margin-bottom: 10px;
}

.product-meta {
    font-size: 18px;
    color: #777777;
    margin-bottom: 25px;
}

.product-bottom {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

/* ЦЕНА И КНОПКА: FONT 16 С АНИМАЦИЕЙ СДВИГА И ОБВОДКИ */
.product-price {
    font-size: 16px;
    font-weight: 800;
    padding: 10px 22px;
    border: 2px solid transparent;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap;
}

.order-btn {
    padding: 10px 26px;
    background: transparent;
    color: #111111;
    border: 2px solid transparent;
    border-radius: 50px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap;
}

/* Нечётный контейнер (1, 3, 5...) - сдвиг вправо при наведении */
.product-card:nth-child(odd):hover .product-price {
    transform: translateX(25px);
    border-color: #111111;
}

.product-card:nth-child(odd):hover .order-btn {
    transform: translateX(25px);
    background: #111111;
    border-color: #111111;
    color: var(--bg-color, #ffffff);
}

/* Чётный контейнер (2, 4, 6...) - сдвиг влево при наведении */
.product-card:nth-child(even):hover .product-price {
    transform: translateX(-25px);
    border-color: #111111;
}

.product-card:nth-child(even):hover .order-btn {
    transform: translateX(-25px);
    background: #111111;
    border-color: #111111;
    color: var(--bg-color, #ffffff);
}

/* Подвал */
footer {
    padding: 60px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.slogan {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.address {
    color: #666;
    margin-bottom: 20px;
}

.socials a {
    color: #111;
    font-weight: 700;
    text-decoration: none;
    margin: 0 10px;
}

/* Кнопка корзины */
.cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #111111;
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 100;
    transition: transform 0.2s ease;
}

.cart-btn:hover {
    transform: scale(1.05);
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 20px; right: 25px;
    font-size: 28px;
    cursor: pointer;
    font-weight: 700;
}

/* ЭЛЕМЕНТЫ В КОРЗИНЕ */
.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-name {
    font-weight: 800;
    font-size: 1rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: #666;
}

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

.quantity-controls {
    display: flex;
    align-items: center;
    background: #f4f4f4;
    border-radius: 20px;
    padding: 4px 8px;
    gap: 10px;
}

.qty-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.qty-count {
    font-weight: 800;
    font-size: 0.95rem;
    min-width: 15px;
    text-align: center;
}

.remove-item-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #aaa;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}

.remove-item-btn:hover {
    color: #e03131;
}

/* ВНОУТРЕННИЙ БЛОК ПОДТВЕРЖДЕНИЯ УДАЛЕНИЯ «Ви впевнені?» */
.confirm-delete-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff0f0;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #ffc9c9;
}

.confirm-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e03131;
}

.confirm-btn {
    border: none;
    border-radius: 50px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

.confirm-btn.yes-btn {
    background: #e03131;
    color: #ffffff;
}

.confirm-btn.yes-btn:hover {
    background: #c92a2a;
}

.confirm-btn.no-btn {
    background: #e9ecef;
    color: #495057;
}

.confirm-btn.no-btn:hover {
    background: #dee2e6;
}

.cart-total {
    font-size: 1.3rem;
    font-weight: 800;
    margin-top: 20px;
    text-align: right;
}

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

.checkout-form input {
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
}

.checkout-form button {
    padding: 16px;
    background: #111111;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.checkout-form button:disabled {
    background: #888;
    cursor: not-allowed;
}

/* ЧЕК */
.receipt-content {
    background: #ffffff;
    padding: 30px 25px;
    width: 320px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-top: 4px dashed #ccc;
    border-bottom: 4px dashed #ccc;
}

.receipt-header, .receipt-footer {
    text-align: center;
}

.receipt-header h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.receipt-total-line {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 10px 0;
}

.receipt-sub {
    font-size: 0.8rem;
    margin-bottom: 15px;
}

#close-receipt {
    padding: 8px 16px;
    background: #111;
    color: #fff;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

/* Анимация полёта */
.flying-img {
    position: fixed;
    z-index: 999;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0.85;
    pointer-events: none;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ПЛАВАЮЩЕЕ УВЕДОМЛЕНИЕ (TOAST) ВНИЗУ СПРАВА */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #111111;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* Адаптивность для мобильных устройств */
@media (max-width: 900px) {
    .product-card, .product-card:nth-child(even) {
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
    }

    .product-info {
        align-items: center;
    }

    .product-bottom {
        justify-content: center;
    }

    .product-title {
        font-size: 42px;
    }

    .product-image {
        height: 350px;
        margin: -10px 0;
    }

    .product-card:nth-child(odd):hover .product-price,
    .product-card:nth-child(odd):hover .order-btn,
    .product-card:nth-child(even):hover .product-price,
    .product-card:nth-child(even):hover .order-btn {
        transform: none;
    }
}



/* ==========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (экран до 900px)
   ========================================== */
@media (max-width: 900px) {
    
    /* Контейнер страницы */
    .main-container {
        padding: 20px 15px 100px 15px;
    }

    /* Уменьшаем межкарточный интервал с ПК-шных 200px до 80px */
    .products-list {
        gap: 80px;
    }

    .category-title {
        font-size: 2.2rem;
        margin-bottom: 25px;
        text-align: center;
    }

    /* Карточка товара на мобильных */
    .product-card, 
    .product-card:nth-child(even) {
        flex-direction: column;
        height: auto; /* Снимаем жесткую высоту ПК-версии */
        padding: 30px 20px;
        text-align: center;
        border-radius: 30px;
        gap: 15px;
        background-color: var(--bg-color); /* Показываем цвет фона сразу */
    }

    /* Сбрасываем боковые сдвиги картинок из ПК-версии */
    .product-card:nth-child(odd) .product-image-container,
    .product-card:nth-child(even) .product-image-container {
        justify-content: center;
    }

    .product-card:nth-child(odd) .product-image,
    .product-card:nth-child(even) .product-image {
        margin: 0;
    }

    .product-image-container {
        height: auto;
        width: 100%;
    }

    /* Картинка товара: уменьшена, чтобы не перекрывать кнопки */
    .product-image {
        height: 250px; /* Аккуратная высота для смартфонов */
        width: auto;
        max-width: 100%;
        filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
    }

    .product-card:hover .product-image {
        transform: none;
    }

    /* Блок текста */
    .product-info {
        width: 100%;
        align-items: center;
    }

    /* Заголовок товара на мобильных */
    .product-title {
        font-size: 42px; /* Уменьшаем до 42px, чтобы помещался без сломов */
        line-height: 1.1;
        margin-bottom: 12px;
        word-break: break-word;
    }

    .product-desc {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .product-meta {
        font-size: 15px;
        margin-bottom: 18px;
    }

    /* Панель с ценой и кнопкой */
    .product-bottom {
        justify-content: center;
        gap: 12px;
        flex-wrap: nowrap;
    }

    /* Статичные кнопки без анимаций и сдвигов */
    .product-price {
        font-size: 15px;
        padding: 10px 18px;
        border: 2px solid #111111;
        transform: none !important;
    }

    .order-btn {
        font-size: 15px;
        padding: 10px 22px;
        background: #111111;
        color: #ffffff;
        border: 2px solid #111111;
        transform: none !important;
    }

    /* Отключаем любые ховер-эффекты и сдвиги для мобильных устройств */
    .product-card:nth-child(odd):hover .product-price,
    .product-card:nth-child(odd):hover .order-btn,
    .product-card:nth-child(even):hover .product-price,
    .product-card:nth-child(even):hover .order-btn {
        transform: none !important;
    }

    /* Кнопка корзины */
    .cart-btn {
        bottom: 20px;
        right: 20px;
        padding: 14px 20px;
        font-size: 1rem;
    }

    /* Окно корзины адаптивное под экран смартфона */
    .modal-content {
        width: 92%;
        max-width: 400px;
        padding: 24px 18px;
        max-height: 85vh;
        overflow-y: auto;
        border-radius: 20px;
    }

    /* Уведомление внизу экрана */
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        text-align: center;
    }
}

/* ==========================================
   СВІЙ ТОРТ + ГАЛЕРЕЯ + ФОРМА
   ========================================== */
.hp-field {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.custom-modal-content {
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.custom-modal-content .close-btn {
    z-index: 5;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}

.custom-modal-content h2 {
    margin-bottom: 6px;
}

.custom-note {
    font-size: 0.9rem;
    color: #666;
}

/* Стрічка, що їде вліво */
.gallery {
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 22px;
}

.gallery-track {
    display: flex;
    width: max-content;
    animation: gallery-scroll 30s linear infinite;
}

.gallery:hover .gallery-track {
    animation-play-state: paused;
}

.gallery-item {
    flex: 0 0 auto;
    height: 150px;
    padding-right: 10px;
}

.gallery-item img {
    height: 100%;
    width: auto;
    display: block;
    border-radius: 12px;
}

@keyframes gallery-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Поля форми */
.checkout-form textarea {
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.file-label {
    padding: 14px;
    border: 2px dashed #ccc;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.file-label:hover {
    border-color: #111;
    background: #fafafa;
}

.photo-preview-wrap {
    position: relative;
    align-self: flex-start;
}

.photo-preview-wrap.hidden {
    display: none;
}

.photo-preview-wrap img {
    height: 110px;
    width: auto;
    border-radius: 12px;
    display: block;
}

.photo-preview-wrap button {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 16px;
    line-height: 1;
}

@media (max-width: 900px) {
    .gallery-item { height: 110px; }
}


/* Прихований від очей, але видимий для пошукових систем заголовок h1 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}