/* Файл: style.css */

/* ==========
   БАЗА
   ========== */

:root {
    --bg-main: #020617;
    --bg-surface: #0b1120;
    --bg-surface-alt: #020617;
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --primary-accent: #60a5fa;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --border-soft: #1f2937;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-pill: 999px;
    --shadow-soft: 0 20px 40px rgba(15, 23, 42, 0.9);
    --transition-fast: 0.18s ease;
    --container-width: 1160px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Montserrat", sans-serif;
    background:
        radial-gradient(circle at top, #0b1120 0, #020617 50%, #000 100%);
    color: var(--text-main);
    line-height: 1.6;
}

/* Контейнер */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* ==========
   HEADER
   ========== */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.85), transparent);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
}

.header__logo img {
    display: block;
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.9);
}

/* NAV */

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.nav__list {
    display: flex;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav__list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding-bottom: 3px;
    position: relative;
}

.nav__list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #60a5fa, #2563eb);
    border-radius: 999px;
    transition: width var(--transition-fast);
}

.nav__list a:hover {
    color: #f9fafb;
}

.nav__list a:hover::after {
    width: 100%;
}

/* Бургер */

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.nav__toggle span {
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: #e5e7eb;
}

/* Языки */

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-switch__btn {
    border-radius: var(--radius-pill);
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 4px 10px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.lang-switch__btn--active {
    background: var(--primary);
    border-color: var(--primary-accent);
    color: #f9fafb;
}

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

.hero {
    padding: 70px 0 60px;
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.hero__content,
.hero__media {
    opacity: 0;
    animation: fadeInSlow 0.9s ease forwards;
}
.hero__media {
    animation-delay: 0.15s;
}

.hero__subtitle {
    margin: 0 0 14px;
    color: var(--text-muted);
    max-width: 520px;
    font-size: 0.98rem;
}

.hero__list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.hero__list li {
    margin-bottom: 4px;
}

.hero__note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.hero__media img {
    width: 100%;
    display: block;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.55);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    font-size: 0.93rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.btn--primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #f9fafb;
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.7);
}

.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 42px rgba(37, 99, 235, 0.9);
}
.btn {
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.45);
}

/* ==========
   СЕКЦИИ
   ========== */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.7s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section {
    padding: 56px 0;
}

.section__title {
    margin: 0 0 8px;
    font-size: 1.45rem;
}

.section__subtitle {
    margin: 0 0 26px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ==========
   КАТАЛОГ
   ========== */

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: var(--radius-lg);
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.9);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeIn 0.6s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }

.product-card:hover {
    transform: translateY(-4px) scale(1.02);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.95);
    border-color: var(--primary-accent);
    background: rgba(15, 23, 42, 0.98);
}

.product-card img {
    width: 100%;
    border-radius: 14px;
    display: block;
    margin-bottom: 8px;
}

.product-card__title {
    margin: 0;
    font-size: 0.98rem;
}

.product-card__price {
    margin-top: 2px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ==========
   ОТЗЫВЫ
   ========== */

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.review-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.9);
    font-size: 0.9rem;
}

.review-card {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeIn 0.7s ease forwards;
}

.review-card:nth-child(1) { animation-delay: 0.05s; }
.review-card:nth-child(2) { animation-delay: 0.1s; }
.review-card:nth-child(3) { animation-delay: 0.15s; }
.review-card:nth-child(4) { animation-delay: 0.2s; }
.review-card:nth-child(5) { animation-delay: 0.25s; }
.review-card:nth-child(6) { animation-delay: 0.3s; }

.review-card span {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========
   ФОРМА
   ========== */

.form {
    max-width: 480px;
    background: rgba(15, 23, 42, 0.96);
    padding: 18px 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: var(--shadow-soft);
}

.form label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.65);
    background: rgba(15, 23, 42, 0.98);
    color: var(--text-main);
    padding: 9px 11px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    margin-bottom: 10px;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.6);
}

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

.form__consent {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0 12px;
}

.form__consent input {
    margin-top: 3px;
    width: auto;
}

/* ==========
   КОНТАКТЫ
   ========== */

.contacts-list {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contacts-list p {
    margin: 4px 0;
}

.contacts-list i {
    margin-right: 6px;
    color: var(--primary-accent);
}

/* ==========
   FOOTER
   ========== */

.footer {
    padding: 16px 0 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    background: #020617;
}

.footer p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* ==========
   FLOAT BUTTONS
   ========== */

.float-btn {
    position: fixed;
    right: 18px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #f9fafb;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.9);
    z-index: 40;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    opacity: 0;
    animation: floatIn 0.7s ease forwards;
}

.float-btn.whatsapp {
    bottom: 80px;
    background: #22c55e;
    animation-delay: 0.2s;
}

.float-btn.telegram {
    bottom: 20px;
    background: #0ea5e9;
    animation-delay: 0.35s;
}

.float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(0, 0, 0, 1);
}

/* ==========
   MODAL (товар)
   ========== */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 60;
}

.modal--open {
    display: block;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #020617;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 18px 18px 20px;
    width: 92%;
    max-width: 640px;
    box-shadow: 0 26px 52px rgba(0, 0, 0, 0.95);
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 24px;
    cursor: pointer;
}

.modal__title {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.modal__gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}

.modal__gallery img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.modal__gallery img:hover {
    border-color: var(--primary-accent);
    transform: translateY(-1px);
}

.modal__desc {
    margin: 0 0 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modal__price {
    margin: 0 0 14px;
    font-weight: 600;
}

/* ==========
   ЛАЙТБОКС (внутри модалки)
   ========== */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox--open {
    display: flex;
}

.lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
}

.lightbox__img {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    border-radius: 14px;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.95);
    z-index: 2;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.lightbox__img.zoomed {
    transform: scale(1.6);
    cursor: zoom-out;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    z-index: 3;
    border: none;
    background: rgba(15, 23, 42, 0.6);
    color: #f9fafb;
    font-size: 28px;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.lightbox__close {
    top: 18px;
    right: 20px;
}

.lightbox__prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
    background: rgba(37, 99, 235, 0.7);
    transform: translateY(-1px);
}

/* ==========
   COOKIE
   ========== */

.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    max-width: 420px;
    width: calc(100% - 32px);
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    z-index: 70;
    font-size: 0.8rem;
}

.cookie-banner span {
    color: var(--text-muted);
}

.cookie-banner button {
    border-radius: var(--radius-pill);
    border: none;
    background: var(--primary);
    color: #f9fafb;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* ==========
   АДАПТИВ
   ========== */

@media (max-width: 992px) {
    .hero__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        padding-top: 60px;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal__gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
    }

    .nav__list {
        position: absolute;
        top: 40px;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        border-radius: 14px;
        border: 1px solid rgba(148, 163, 184, 0.7);
        padding: 8px 12px;
        box-shadow: 0 18px 34px rgba(0, 0, 0, 0.9);
        flex-direction: column;
        gap: 8px;
        min-width: 180px;
        display: none;
    }

    .nav.nav--open .nav__list {
        display: flex;
    }


    .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    }

    .reviews-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .modal__content {
        width: 94%;
        padding: 16px;
    }

    .modal__gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cookie-banner {
        bottom: 12px;
    }

    .float-btn.whatsapp {
        bottom: 76px;
        right: 12px;
    }

    .float-btn.telegram {
        bottom: 18px;
        right: 12px;
    }
}

@media (max-width: 480px) {

    /* Уменьшаем саму модалку */
    .modal__content {
        width: 92% !important;
        max-height: 88vh !important;
        padding: 12px !important;
        border-radius: 16px !important;
        overflow-y: auto !important;
    }

    /* Делаем крестик всегда видимым */
    .modal__close {
        top: 6px !important;
        right: 8px !important;
        font-size: 20px !important;
        z-index: 999 !important;
    }

    /* Галерею уменьшаем */
    .modal__gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px !important;
        margin-bottom: 10px !important;
    }

    .modal__gallery img {
        border-radius: 6px !important;
    }

    /* Заголовок и текст — компактнее */
    .modal__title {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }

    .modal__desc {
        font-size: 0.82rem !important;
        margin-bottom: 8px !important;
    }

    .modal__price {
        font-size: 0.9rem !important;
        margin-bottom: 12px !important;
    }

    /* Кнопка купить — фиксируем снизу если нужно */
    #modal-buy {
        width: 100% !important;
        padding: 12px !important;
        font-size: 1rem !important;
        border-radius: 12px !important;
        margin-top: 12px !important;
    }
}


.logo-img {
    height: 46px;
    width: auto;
    object-fit: contain;
}
@media (max-width: 480px) {
    .logo-img {
        height: 40px;
    }
}

.hero-img {
    width: 100%;
    height: auto;
    max-width: 520px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.product-card .product-badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;

    background: linear-gradient(135deg, #f97316, #ea580c) !important;

    color: #fff !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;

    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;

    z-index: 50 !important;
    display: inline-block !important;

    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
}

.badge-wrap {
    position: relative;
    z-index: 10;
    overflow: visible !important;
}

.product-badge {
    position: absolute !important;
    top: 8px;
    left: 8px;

    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;

    font-size: 0.75rem;
    font-weight: 600;

    z-index: 999999 !important; /* ПОДНИМАЕМ НАД ФОТО */
    pointer-events: none;
}

/* ============== */
/* АНИМАЦИИ БЛОКОВ */
/* ============== */

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

@keyframes fadeInSlow {
    0% { opacity: 0; transform: translateY(35px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.85);
    }
    60% {
        opacity: 1;
        transform: translateY(0) scale(1.05);
    }
    100% {
        opacity: 1; /* ← ЭТО ОБЯЗАТЕЛЬНО */
        transform: translateY(0) scale(1);
    }
}
 
/* ============== */
/* Пагинация */
/* ============== */

.catalog-pagination {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.catalog-page-btn {
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.4);
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
}

.catalog-page-btn:hover {
    background: rgba(37, 99, 235, 0.6);
    border-color: #2563eb;
}

.catalog-page-btn.active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: white;
}

#popup-success {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    background: rgba(0,0,0,0.35);
    z-index: 9999;
}

.popup-box {
    background: #020617;
    border-radius: 16px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(34,197,94,0.6);
    animation: popupFade 0.3s ease;
}

.popup-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.popup-check {
    width: 100%;
    height: 100%;
    display: block;
}

.popup-text {
    color: #e5e7eb;
    font-size: 0.95rem;
    font-weight: 600;
}

/* анимация появления */
@keyframes popupFade {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


@keyframes popupFade {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
