:root {
    --accent: #8A2BE2;
    --glass: rgba(0, 0, 0, 0.03); /* Swapped to dark tint */
    --border: rgba(0, 0, 0, 0.08); /* Swapped to dark tint */
    --bg-main: #ffffff;
    --bg-secondary: #f8f8f8;
    --text-main: #111111;
    --text-muted: #666666;
}

body {
    background: var(--bg-main) !important;
    color: var(--text-main);
}

.product-page-container {
    background: var(--bg-main);
    color: var(--text-main);
    padding: 60px 30px;
    min-height: 100vh;
}



.product-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
}

/* Gallery */
.main-image-wrapper {
    border-radius: 40px;
    padding: 60px;
    display: flex;
    justify-content: center;
    position: sticky;
    top: 100px;
}

/* Info Block */
.stock-status { color: #8A2BE2 !important; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; }
.product-title { color: var(--text-main); font-size: 3.5rem; font-weight: 800; margin: 15px 0; letter-spacing: -2px; }
.product-sku { color: #bbb; margin-bottom: 30px; }

.price-section { margin-bottom: 40px; }
.old-price { color: #999; text-decoration: line-through; font-size: 1.2rem; }
.main-price { color: var(--text-main); font-size: 3rem; font-weight: 900; }

/* Buttons */
.buy-now-btn {
    flex: 4;
    background: #000; /* Inverted: Black button on white bg */
    color: #fff;
    border: none;
    padding: 20px;
    border-radius: 20px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}
.add-cart-outline {
    flex: 1;
    background: transparent;
    border: 1px solid #ddd;
    color: #000;
    border-radius: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}

.buy-now-btn:hover { background: var(--accent); color: #fff; }
.add-cart-outline:hover { border-color: #000; }

/* Stats Cards */
.tech-stat-card {
    background: #fff;
    border: 1px solid rgba(138, 43, 226, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 15px;
    border-radius: 20px;
}

.s-label { color: #999; }
.s-value { color: var(--text-main); }

/* Universal Stats Bar */
.universal-stats-bar {
    border-top: 1px solid #eee;
}

.u-stat-card {
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.u-value { color: black !important; }

/* Full Description */
.full-description-area {
    background: #fafafa;
    border: 1px solid #eee;
    padding: 30px;
}

.content-text { color: #444; }

/* Widget */
.widget-card {
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.w-title { color: #000; }
.w-desc { color: #777; }

/* Checkout Modal */
.cart-overlay {
    background: rgba(255, 255, 255, 0.9); /* White overlay instead of black */
}

.checkout-modal {
    background: #ffffff;
    border: 1px solid #eee;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.checkout-form-side {
    background: #ffffff;
}

.checkout-info-side {
    background: #f9f9f9;
    border-left: 1px solid #eee;
}

.cyber-full-form input {
    background: #f3f3f3;
    border: 1px solid #eee;
    color: #000;
}

.total-line {
    color: #000;
    border-top: 1px solid #eee;
}

.close-full-modal { color: #000; }

    .product-main-grid {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        align-items: start;
    }

    /* Галерея */
    .main-image-wrapper {
        border-radius: 40px;
        padding: 60px;
        display: flex;
        justify-content: center;
        position: sticky;
        top: 100px;
    }
    .main-image-wrapper img { max-width: 100%; height: auto; object-fit: contain; }

    /* Инфо-блок */
    .stock-status { color: #00ff88; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
    .product-title { font-size: 3.5rem; font-weight: 800; margin: 15px 0; letter-spacing: -2px; }
    .product-sku { color: #444; margin-bottom: 30px; }

    .price-section { margin-bottom: 40px; }
    .old-price { display: block; color: #666; text-decoration: line-through; font-size: 1.2rem; }
    .main-price { font-size: 3rem; font-weight: 900; }

    /* Кнопки */
    .buying-buttons { display: flex; gap: 20px; margin-bottom: 50px; }
    .buy-now-btn { flex: 4; background: #fff; color: #000; border: 1px solid #8A2BE2; padding: 20px; border-radius: 20px; font-weight: 800; font-size: 1.1rem; cursor: pointer; transition: 0.3s; }
    .add-cart-outline { flex: 1; background: black; border: 1px solid #333; color: #fff; border-radius: 20px; font-size: 1.5rem; cursor: pointer; transition: 0.3s; }

    .buy-now-btn:hover { background: #8A2BE2; color: #fff; }
    .add-cart-outline:hover { border-color: #fff; transform: scale(1.05);}

    /* Мини-фичи */
    .feature-row { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; color: #aaa; }
    .feature-row i { color: #8A2BE2; }

    .description-block h3 { margin: 40px 0 20px; font-size: 1.5rem; }
    .description-block p { color: #888; line-height: 1.6; font-size: 1.1rem; }

    @media (max-width: 992px) {
        .product-main-grid { grid-template-columns: 1fr; }
        .main-image-wrapper { position: static; padding: 30px; }
        .product-title { font-size: 2.5rem; }
    }

.tech-stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.tech-stat-card {
    background: linear-gradient(145deg, #111, #080808);
    border: 1px solid rgba(138, 43, 226, 0.2);
    padding: 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s ease;
}

.tech-stat-card:hover {
    border-color: #8A2BE2;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.15);
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 1.2rem;
    color: #8A2BE2;
    background: rgba(138, 43, 226, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.s-label {
    font-size: 0.65rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.s-value {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

@media (max-width: 600px) {
    .tech-stats-container { grid-template-columns: 1fr; }
}

/* Контейнер для статов */
.universal-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px; /* Отступ от верхнего блока */
    padding: 30px 0;
}

.u-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.u-stat-card:hover {
    background: rgba(138, 43, 226, 0.05);
    border-color: #8A2BE2;
    transform: translateY(-5px);
}

.u-stat-card i {
    font-size: 1.8rem;
    color: #8A2BE2; /* Твой фирменный фиолетовый */
    filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.5));
}

.u-stat-texts { display: flex; flex-direction: column; }

.u-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.u-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

/* Секция полного описания */
.full-description-area {
    background: #080808;
    border-radius: 40px;
    border: 1px solid #111;
}

.full-description-area h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.full-description-area .content {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #aaa;
    max-width: 900px;
}

.tech-line-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.tech-line-wrapper .line {
    height: 1px;
    width: 100px;
    background: #333;
}

.tech-line-wrapper .dot {
    width: 6px;
    height: 6px;
    background: #8A2BE2;
    border-radius: 50%;
    box-shadow: 0 0 8px #8A2BE2;
}

.tech-code {
    font-size: 0.7rem;
    font-family: monospace;
    color: #444;
    letter-spacing: 2px;
}

.description-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.5fr; /* Текст шире, виджет уже */
    gap: 60px;
    align-items: start;
}

.content-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #ccc;
}

/* Виджет справа */
.info-side-widget {
    position: sticky;
    top: 120px; /* Прилипает при скролле */
}

.widget-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.widget-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.icon-box {
    color: #8A2BE2;
    font-size: 1.2rem;
    padding-top: 3px;
}

.w-title {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 2px;
}

.w-desc {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
}

/* Мини-баннер внизу виджета */
.promo-mini-banner {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), transparent);
    border-left: 2px solid #8A2BE2;
    border-radius: 0 15px 15px 0;
}

.promo-mini-banner .badge {
    font-size: 0.6rem;
    font-weight: 900;
    color: #8A2BE2;
    background: rgba(138, 43, 226, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 8px;
    display: inline-block;
}

.promo-mini-banner p {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
}

@media (max-width: 1100px) {
    .description-grid { grid-template-columns: 1fr; }
    .info-side-widget { position: static; }
}

.payout-overlay {
    height: 600px;
    padding: 10px 60px !important;
    margin: 100px;
    background: rgba(226, 226, 226, 0.2);
    border: 1px solid white;
    border-radius: 30px;
}
.ultra-title {
    font-size: 70px;
}
.gradient-text {
    background: linear-gradient(180deg, #8A2BE2 0%, #4b0082 100%);

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;

    font-weight: 900;
    letter-spacing: -2px;
}

/* Полноэкранный оверлей */
.cart-overlay.full-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.checkout-modal {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: #0a0a0a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(138, 43, 226, 0.2);
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    min-height: 500px;
}

/* Форма */
.checkout-form-side {
    padding: 40px;
    background: linear-gradient(135deg, #0d0d0d 0%, #151515 100%);
}

.input-section {
    margin-top: 25px;
}

.input-section h4 {
    color: #8A2BE2;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cyber-full-form input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    color: white;
    margin-bottom: 15px;
}

/* Ввод карты */
.card-input-wrapper {
    background: rgba(138, 43, 226, 0.05);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.2);
}

.card-extra {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Правая сторона (Итого) */
.checkout-info-side {
    padding: 40px;
    background: rgba(138, 43, 226, 0.03);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.total-line {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    font-size: 1.4rem;
    font-weight: bold;
}

.close-full-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

.pay-now-btn {
    width: 100%;
    padding: 18px;
    background: #8A2BE2;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
}

.pay-now-btn:hover {
    background: #a045ff;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
}

/* Базовое состояние оверлея — ОН СКРЫТ */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Затемнение фона */
    backdrop-filter: blur(10px); /* Размытие заднего плана */
    z-index: 9999; /* Чтобы был поверх всего */
    display: none; /* Изначально полностью убираем */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Состояние когда класс .active добавлен через JS */
.cart-overlay.active {
    display: flex; /* Показываем */
    opacity: 1;
}

/* Ограничиваем высоту модалки, чтобы она не улетала за экран */
.checkout-modal {
    position: relative;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto; /* Скролл если экран маленький */
    background: #0a0a0a;
    border: 1px solid rgba(138, 43, 226, 0.4);
    border-radius: 24px;
    box-shadow: 0 0 50px rgba(138, 43, 226, 0.2);
}

/* Исправляем отступы для мобилок */
@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr; /* В одну колонку на телефонах */
    }
    .checkout-info-side {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .tech-line-wrapper{justify-content: center;}
    .product-header-info {display: flex;
    flex-direction: column;
    align-items: center;
    }
}

/* Контейнер для полей карты */
.card-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Расстояние между номером карты и блоком срок/cvc */
    background: rgba(138, 43, 226, 0.05);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.2);
    margin-top: 10px;
}

/* Блок с ММ/ГГ и CVC */
.card-extra {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Убедись, что инпуты не имеют абсолютного позиционирования */
.cyber-full-form input {
    position: relative;
    width: 100%;
    margin-bottom: 0; /* Управляем через gap */
}

/* Глобальное правило для правильных размеров */
* {
    box-sizing: border-box;
}

/* Контейнер всей формы */
.cyber-full-form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Расстояние между логическими блоками (Контакты / Оплата) */
}

/* Блок с заголовком и инпутами внутри секции */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Расстояние между самими инпутами */
}

/* Сами поля ввода */
.cyber-full-form input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    display: block; /* Убираем инлайновое поведение */
    margin: 0; /* Обнуляем, чтобы управлять через gap */
}

/* Контейнер для ММ/ГГ и CVC */
.card-extra {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px; /* Чтобы поля ММ/ГГ и CVC стояли ровно и с отступом */
    margin-top: 5px;
}

/* Чтобы поля не сливались в режиме "одно под другим" */
.card-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 768px) {
    .product-page-container {
        padding: 40px 15px;
    }

    .product-title {
        font-size: 2.2rem; /* Более читаемо на iPhone */
        text-align: center;
    }

    .buying-buttons {
        flex-direction: column; /* Кнопки одна под другой для удобства тапа */
        gap: 12px;
    }

    .buy-now-btn, .add-cart-outline {
        width: 100%;
        padding: 15px;
    }

    /* Галерея: убираем лишние отступы */
    .main-image-wrapper {
        padding: 30px 15px;
        border-radius: 24px;
    }

}

/* Уточняем стили для чекаута */
.checkout-modal {
    background: #080808;
    border: 1px solid rgba(138, 43, 226, 0.2);
}

.input-section h4 {
    margin-top: 10px;
    opacity: 0.8;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.cyber-full-form input:focus {
    border-color: #8A2BE2;
    background: rgba(138, 43, 226, 0.05);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.2);
}

/* Эффект для списка товаров в чекауте */
.checkout-info-side #checkoutItemsList div {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.universal-stats-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 60px;
}

@media (max-width: 992px) {
    .universal-stats-bar {
        grid-template-columns: 1fr; /* На планшетах в колонку */
        gap: 10px;
    }

    .u-stat-card {
        padding: 15px 20px;
    }
}

                    .product-selection {
    margin: 25px 0;
}

.selection-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}

.color-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
}
.selection-title {
    color: black;
}
.color-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;

    margin-bottom: 5px;
    transition: 0.3s;
    border: 1px solid black;
}

.color-item:hover .color-circle {
    transform: scale(1.1);
}

.color-item.active .color-circle {
    transform: scale(1.2);
    border: 2px solid var(--accent);
}

.color-name {
    font-size: 0.7rem;
    opacity: 0.8;
}
/* 1. ГАРАНТИРУЕМ ПОРЯДОК: Сначала картинка, потом надпись */
.product-image-wrapper {
    display: flex !important;
    flex-direction: column !important; /* Строго в колонку */
    align-items: center !important;    /* Центрируем и то и то */
    gap: 30px !important;              /* Четкий отступ между ними */
    position: relative !important;
    padding: 20px 0;
}

/* 2. ЧИНИМ КАРТИНКУ ТЕЛЕФОНА */
#main-product-img {
    max-width: 100%;
    height: auto;
    position: relative !important;
    display: block;
    margin: 0 auto;
    /* Убираем любые попытки картинки уехать вверх */
    top: 0 !important;
    transform: none !important;
}

/* 3. ЧИНИМ ТЕКСТ "IPHONE" */
.product-image-wrapper h2,
.product-image-wrapper img:last-child,
.product-image-wrapper .brand-logo {
    position: relative !important;
    margin: 0 !important; /* Никаких отрицательных маржинов! */
    display: block !important;
    opacity: 1;
    z-index: 2;
}

.full-description-area h2 {
    font-size: 2.5rem; /* Если слишком большой, уменьши до 2rem */
    line-height: 1.2;
    word-wrap: break-word; /* Чтобы слова переносились, а не уходили за край */
    overflow: visible !important; /* Чтобы ничего не обрезалось */
    height: auto !important;
    margin-bottom: 20px;
    display: block !important;
}

/* На мобилках текст должен быть еще податливее */
@media (max-width: 768px) {
    .full-description-area h2 {
        font-size: 1.8rem; /* Уменьшаем на телефонах, чтобы влезло */
        text-align: center;
    }
}