/* products.css */

/* Наследуем некоторые стили из style.css для body, шрифтов и фона */
/* .container уже стилизован в style.css, но мы добавим специфичный класс */

.product-container {
    max-width: 800px; /* Контейнер для товаров может быть шире */
    text-align: left; /* Текст внутри товаров по левому краю */
    padding: 20px 30px;
}

.product-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Кнопка назад слева, заголовок справа/по центру */
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
}

.product-header h1 {
    font-family: var(--font-header);
    font-size: 2.2em;
    color: var(--primary-color);
    text-shadow: 0 0 7px rgba(var(--primary-color-rgb), 0.4);
    margin: 0; /* Убираем стандартный отступ */
    flex-grow: 1; /* Чтобы заголовок занимал доступное место */
    text-align: center; /* Центрируем заголовок */
    position: relative; /* Для позиционирования логотипа */
}
.dsg-coin-logo {
    font-size: 0.3em; /* Размер текста логотипа */
    font-family: 'Arial', sans-serif; /* Простой шрифт для лого */
    font-weight: bold;
    color: #fff;
    background-color: #7289DA; /* Цвет Discord */
    border-radius: 50%;
    padding: 5px 3px;
    line-height: 0.9;
    display: inline-block;
    text-align: center;
    vertical-align: middle; /* Выравнивание с текстом "Товары" */
    margin-left: 10px;
    width: 40px; /* Фиксированная ширина и высота для круга */
    height: 40px;
    box-sizing: border-box; /* Чтобы padding не влиял на размер */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.3);
}


.back-button {
    display: inline-flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.back-button svg {
    margin-right: 8px;
}

.back-button:hover {
    background-color: rgba(var(--primary-color-rgb), 0.15);
    color: var(--primary-color);
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Пространство между товарами */
}

.product-item {
    background-color: rgba(30, 30, 55, 0.7); /* Чуть темнее фон для элементов */
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.product-name-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap; /* Для переноса на маленьких экранах */
}

.role-name {
    font-size: 1.2em;
    font-weight: 700;
}

.price {
    font-size: 1.1em;
    font-weight: 500;
    color: #c0c0d8;
    white-space: nowrap; /* Чтобы цена не переносилась */
    margin-left: 10px; /* Отступ от названия роли */
}

.product-description {
    font-size: 0.95em;
    color: #b0b0cc;
    line-height: 1.5;
}

.product-description .checkmark { /* Если будете использовать span для галочки */
    color: #4CAF50; /* Зеленый цвет для галочки */
    margin-right: 5px;
}

/* Цвета для ролей */
.role-glava { color: #2ecc71; } /* Зеленый */
.role-deputat { color: #9b59b6; } /* Фиолетовый */
.role-mer { color: #f39c12; } /* Оранжевый */
.role-gubernator { color: #00e676; } /* Ярко-зеленый */
.role-ministr { color: #3498db; } /* Синий */
.role-prezident { color: #e91e63; } /* Розовый */


.product-footer-info {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9em;
    color: #a0a0c0;
}

.product-footer-info p {
    margin-bottom: 10px;
}

.product-footer-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.product-footer-info a:hover {
    text-decoration: underline;
}

.dsg-coin-text { /* Для выделения "DSG COIN" в тексте */
    font-weight: bold;
    color: #7289DA; /* Цвет Discord для акцента */
}


@media (max-width: 600px) {
    .product-container {
        padding: 15px;
    }
    .product-header h1 {
        font-size: 1.8em;
    }
    .dsg-coin-logo {
        width: 35px;
        height: 35px;
        font-size: 0.25em;
    }
    .role-name {
        font-size: 1.1em;
    }
    .price {
        font-size: 1em;
    }
    .product-name-price {
        flex-direction: column; /* Название роли и цена друг под другом */
        align-items: flex-start;
    }
    .price {
        margin-left: 0;
        margin-top: 5px;
    }
    .back-button {
        font-size: 0.9em;
        padding: 6px 10px;
    }
    .back-button svg {
        width: 20px;
        height: 20px;
    }
}


/* products.css */

/* ... (стили .product-container, .product-header, .product-list, .product-item, .product-description-short, .product-footer-info, цвета ролей и т.д. из предыдущей версии остаются) ... */

.product-item {
    background-color: rgba(30, 30, 55, 0.7);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}

.product-item:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 10px 25px rgba(var(--primary-color-rgb),0.15); /* Мягче тень */
    border-color: var(--primary-color);
}

.product-name-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.role-name {
    font-size: 1.2em;
    font-weight: 700;
}

.price {
    font-size: 1.1em;
    font-weight: 500;
    color: #c0c0d8;
    white-space: nowrap;
    margin-left: 10px;
}

.product-description-short {
    font-size: 0.9em;
    color: #a0a0c0;
    line-height: 1.4;
    margin-top: 8px;
}

/* Цвета для ролей (остаются из предыдущей версии) */
.role-glava { color: #2ecc71; }
.role-deputat { color: #9b59b6; }
.role-mer { color: #f39c12; }
.role-gubernator { color: #00e676; }
.role-ministr { color: #3498db; }
.role-prezident { color: #e91e63; }

.product-footer-info {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9em;
    color: #a0a0c0;
}
/* ... (остальные стили для .product-footer-info) */
.dsg-coin-text {
    font-weight: bold;
    color: #7289DA;
}


/* --- Стили для модальных окон (ОБНОВЛЕННЫЕ) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(10, 10, 20, 0.75); /* Темнее и менее прозрачный фон */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Более плавная анимация */
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(145deg, #2a2a45, #1e1e35); /* Градиентный фон для модалки */
    color: var(--text-color);
    margin: auto;
    padding: 0; /* Убираем общий padding, будем управлять им для секций */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; /* Меньше скругление */
    width: 90%;
    max-width: 500px; /* Чуть меньше */
    box-shadow: 0 15px 40px rgba(0,0,0,0.6); /* Более выраженная тень */
    position: relative;
    text-align: left;
    transform: translateY(-20px) scale(0.95); /* Начальное положение для анимации "вылета" */
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden; /* Чтобы скругление работало с внутренними блоками */
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.close-button {
    position: absolute;
    top: 12px;
    right: 15px;
    background: transparent;
    border: none;
    color: #8a8aad; /* Менее яркий цвет */
    font-size: 26px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10; /* Поверх заголовка */
}

.close-button:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.modal-header {
    padding: 25px 30px 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative; /* Для позиционирования цены, если нужно */
}

.modal-content h2, /* Общий стиль для h2 в модальных окнах */
#modalProductName {
    font-family: var(--font-header);
    /* Цвет будет устанавливаться через JS или класс data-color-class */
    margin: 0 0 8px 0; /* Уменьшен нижний отступ */
    font-size: 1.9em;
    line-height: 1.2;
    text-align: left; /* Заголовок слева */
    padding-right: 40px; /* Место для кнопки закрытия */
}
/* Класс для окрашивания заголовка товара */
.modal-product-name-colored {
    /* Цвет будет применен через JS, добавляя класс роли */
}


.modal-price {
    font-size: 1.4em; /* Крупнее цена */
    font-weight: 700;
    color: #a8a8d8; /* Другой цвет для цены */
    text-align: left; /* Цена также слева, под заголовком */
    margin: 0;
}

#boostyInfoModal .modal-header h2 { /* Специфичный стиль для заголовка второго окна */
    text-align: center;
    color: var(--text-color); /* Обычный цвет текста */
    padding-right: 0; /* Без отступа для кнопки закрытия, т.к. она уже позиционирована */
}


.modal-body {
    padding: 20px 30px;
    font-size: 1em;
    line-height: 1.65;
    color: #c5c5da; /* Чуть светлее текст описания */
}

.modal-details { /* Если используется для productModal */
    max-height: 180px;
    overflow-y: auto;
    padding-right: 10px; /* Для скроллбара */
    margin-bottom: 0; /* Убираем отступ, т.к. есть modal-footer */
}

/* Стилизация скроллбара */
.modal-details::-webkit-scrollbar { width: 6px; }
.modal-details::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
.modal-details::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 3px; }
.modal-details::-webkit-scrollbar-thumb:hover { background: var(--button-hover); }

.modal-footer {
    padding: 20px 30px 25px 30px;
    background-color: rgba(0,0,0,0.1); /* Легкий фон для футера */
    border-top: 1px solid rgba(255,255,255,0.05);
}

.modal-buy-button, .modal-action-button {
    display: flex; /* Для выравнивания иконки и текста */
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--button-hover));
    color: white;
    padding: 15px 20px; /* Увеличены паддинги */
    text-decoration: none;
    font-size: 1.15em; /* Крупнее текст кнопки */
    font-weight: 700; /* Жирнее */
    border-radius: 8px; /* Менее скругленная кнопка */
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-position 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    margin-top: 0; /* Убираем отступ, т.к. есть modal-footer */
    background-size: 150% 150%; /* Для эффекта градиента при наведении */
    background-position: 0 0;
}

.modal-buy-button:hover, .modal-action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.35);
    background-position: 100% 100%;
}
.modal-buy-button:active, .modal-action-button:active {
    transform: translateY(0px);
    box-shadow: 0 4px 10px rgba(var(--primary-color-rgb), 0.25);
}


/* Адаптивность для модальных окон */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        max-width: calc(100% - 20px); /* Чтобы не прилипало к краям */
        border-radius: 10px;
    }
    .modal-header { padding: 20px 25px 15px 25px; }
    .modal-content h2, #modalProductName { font-size: 1.6em; padding-right: 35px; }
    .modal-price { font-size: 1.25em; }
    .close-button { top: 8px; right: 10px; font-size: 24px; }

    .modal-body { padding: 15px 25px; }
    .modal-details { font-size: 0.95em; max-height: 150px; }

    .modal-footer { padding: 15px 25px 20px 25px; }
    .modal-buy-button, .modal-action-button { padding: 12px 18px; font-size: 1.05em; }
}


/* --- Стили для НОВОГО МОДАЛЬНОГО ОКНА "ДЛЯ ЛОХОВ" --- */

#newFeatureLohModal .modal-header h2 { /* Заголовок нового окна */
    color: var(--primary-color); /* Или любой другой акцентный цвет */
    text-align: center;
    font-size: 1.8em;
    padding-right: 0; /* Так как кнопка закрытия уже позиционирована */
}

.new-feature-modal-body {
    display: flex;
    align-items: center;
    gap: 25px; /* Пространство между описанием и картинкой */
    padding: 20px 30px 25px 30px !important; /* Важно, чтобы переопределить общий .modal-body padding */
}

.new-feature-description {
    flex: 2; /* Описание занимает больше места */
    text-align: left;
}

.new-feature-description h3 {
    font-family: var(--font-header);
    font-size: 1.3em;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 15px;
}
.new-feature-description h3 strike {
    opacity: 0.6;
    font-weight: normal;
}

.new-feature-description p {
    font-size: 0.95em;
    color: #c5c5da;
    line-height: 1.6;
    margin-bottom: 10px;
}

.new-feature-image-container {
    flex: 1; /* Картинка занимает меньше места */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color); /* Цвет иконки корзины */
    opacity: 0.6;
}

.new-feature-image-container .fa-shopping-cart { /* Размер иконки */
     font-size: 6em; /* fa-7x может быть слишком большим, подбери */
}

.new-feature-modal-footer {
    display: flex;
    gap: 15px; /* Пространство между кнопками */
    justify-content: space-between; /* Кнопки по краям */
     padding: 20px 30px 25px 30px !important;
}

.new-feature-modal-footer .modal-action-button {
    width: auto; /* Чтобы кнопки не растягивались на всю ширину */
    flex-grow: 1; /* Чтобы занимали равное доступное место */
    padding: 12px 20px; /* Немного другие паддинги для этих кнопок */
}

.new-feature-modal-footer .modal-action-button.secondary {
    background: linear-gradient(45deg, #555b6e, #404552); /* Темный/серый для обычной кнопки */
    color: #e0e0e0;
}

.new-feature-modal-footer .modal-action-button.secondary:hover {
    background: linear-gradient(45deg, #666c7e, #505562);
    box-shadow: 0 6px 15px rgba(80, 85, 98, 0.3);
}

.new-feature-modal-footer .modal-action-button.primary.enticing {
    /* Используем стили похожие на твою "блестящую" кнопку, но адаптированные */
    background: linear-gradient(145deg, #ffc107, #ff8a00);
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), 0 0 0 2px rgba(255,255,255,0.2) inset;
}

.new-feature-modal-footer .modal-action-button.primary.enticing:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(255,165,0,0.4), 0 0 0 2px rgba(255,255,255,0.3) inset;
    background: linear-gradient(145deg, #ffca28, #ff9800);
}

/* Адаптация нового модального окна */
@media (max-width: 600px) {
    .new-feature-modal-body {
        flex-direction: column-reverse; /* Картинка сверху, потом текст */
        padding: 15px 20px 20px 20px !important;
        gap: 15px;
    }
    #newFeatureLohModal .modal-header h2 {
        font-size: 1.5em;
    }
    .new-feature-description h3 {
        font-size: 1.15em;
        text-align: center;
    }
     .new-feature-description p {
        font-size: 0.9em;
        text-align: center;
    }
    .new-feature-image-container .fa-shopping-cart {
        font-size: 4.5em; /* Поменьше на мобильных */
    }
    .new-feature-modal-footer {
        flex-direction: column; /* Кнопки друг под другом */
        gap: 10px;
        padding: 15px 20px 20px 20px !important;
    }
    .new-feature-modal-footer .modal-action-button {
        width: 100%; /* Кнопки на всю ширину */
    }
}
