/* ==========================================================================
   RESET & SYSTEM STYLES
   ========================================================================== */
:root {
    --primary-orange: #ff6b00;
    --hover-orange: #e05e00;
    --dark-bg: #090d10;
    --panel-glass: rgba(18, 26, 33, 0.65);
    --border-glass: rgba(255, 255, 255, 0.06);
    --text-main: #ffffff;
    --text-muted: #a0a5b5;
    --font-stack: 'Montserrat', sans-serif;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: var(--font-stack);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Прелоадер */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 68, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-orange);
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast уведомление */
.toast-notification {
    position: fixed;
    right: 10px;
    left: 10px;
    bottom: 100px;
    max-width: 450px;
    background: rgba(255, 107, 0, 0.95);
    color: #fff;
    padding: 16px 28px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.3);
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}
.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
/*.main-header {*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    z-index: 1000;*/
/*    padding: 24px 0;*/
/*}*/

.main-header {
    position: fixed !important;  /* фиксируем */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;    /* выше всего */
    background: rgba(9, 13, 16, 0.85) !important; /* тёмный фон с прозрачностью */
    backdrop-filter: blur(10px) !important;        /* размытие */
    -webkit-backdrop-filter: blur(10px) !important;
    padding: 16px 0 !important;  /* уменьшил отступы, чтобы не занимал много места */
    border-bottom: 1px solid var(--border-glass, rgba(255,255,255,0.06)) !important;
    transition: background 0.3s ease !important;
}

html {
    scroll-padding-top: 90px; /* отступ для всех якорей на странице */
}

@media (max-width: 700px) {
    html {
        scroll-padding-top: 80px; /* на мобильных хедер чуть ниже */
    }
}

@media (max-width: 700px) {
    .main-header {
        padding: 12px 0 !important;
    }

    .hero-section {
        padding-top: 180px !important;
    }
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-img {
    max-height: 64px !important;   /* максимальная высота */
    max-width: 64px !important;   /* максимальная ширина */
    width: auto !important;
    height: auto !important;
    display: block !important;
    flex-shrink: 0 !important;     /* чтобы не сжимался */
    object-fit: contain !important; /* сохраняет пропорции */
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-text-wrapper {
    display: flex;
    flex-direction: column;
}
.logo-title {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1;
}
.accent-orange {
    color: var(--primary-orange);
}
.logo-subtitle {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-top: 4px;
}

.nav-menu {
    display: flex;
    gap: 36px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 32px;
    border-radius: 100px;
    border: 1px solid var(--border-glass);
}
.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color var(--transition-speed);
}
.nav-link:hover,
.nav-link.active {
    color: var(--primary-orange);
}

.burger-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
.burger-menu span {
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all var(--transition-speed);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-image: url('img/background.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    padding-top: 100px;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -5px;
    width: 100%;
    height: 30%; /* от высоты секции */
    max-height: 200px; /* не выше 200px */
    background: linear-gradient(to bottom, transparent, var(--dark-bg) 75%);
    filter: blur(12px);
    pointer-events: none;
    z-index: 2;
}

/* На маленьких экранах (портрет) */
@media (max-width: 768px) {
    .hero-section::after {
        height: 20%;
        max-height: 120px;
        filter: blur(8px);
    }
}

/* При перевороте телефона (ландшафт) */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section::after {
        height: 15%;
        max-height: 70px;
        filter: blur(6px);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(9, 13, 16, 0.4) 0%, rgba(9, 13, 16, 0.85) 100%);
    z-index: 1;
}
.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}
.hero-title {
    font-size: 96px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 0.95;
    margin-bottom: 8px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.hero-subtitle-main {
    font-size: 38px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.hero-subtitle-sub {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 36px;
}

.ip-container {
    display: flex;
    background: var(--panel-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 6px;
    border-radius: 16px;
    width: fit-content;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.ip-address-box {
    padding: 0 24px;
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}
.ip-copy-btn {
    background: var(--primary-orange);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.3);
}
.ip-copy-btn:hover {
    background: var(--hover-orange);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.45);
    transform: translateY(-1px);
}

.hero-buttons-group {
    display: flex;
    gap: 16px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: all var(--transition-speed);
}
.btn-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.btn-orange {
    background: linear-gradient(135deg, #ff7a00 0%, #ff4500 100%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(255, 69, 0, 0.3);
}
.btn-orange:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 69, 0, 0.5);
}
.btn-glass {
    background: var(--panel-glass);
    color: #fff;
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.2);
}

.hero-character-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
    height: 100%;
}
.character-wrapper {
    position: relative;
    width: 100%;
    height: 450px;
}

.socials-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    margin-top: 20px;
    z-index: 5;
}
.socials-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.socials-list {
    display: flex;
    gap: 12px;
}
.social-item {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel-glass);
    border: 1px solid var(--border-glass);
    transition: all var(--transition-speed);
}
.social-item svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    transition: fill var(--transition-speed);
}
.social-item:hover {
    transform: translateY(-4px);
}
.social-item.tg:hover { background: #0088cc; }
.social-item.vk:hover { background: #4c75a3; }
.social-item.yt:hover { background: #ff0000; }
.social-item.dc:hover { background: #5865F2; }

/* ==========================================================================
   ANIMATIONS & RESPONSIVE (АДАПТИВ)
   ========================================================================== */
.animate-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.animate-fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    animation: fadeInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
    to { opacity: 1; transform: translateX(0); }
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: #0d1318;
    z-index: 999;
    padding: 100px 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    transition: right 0.4s ease;
}
.mobile-nav.active {
    right: 0;
}
.mobile-link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
}
.mobile-link:hover {
    color: var(--primary-orange);
}
.burger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.burger-menu.active span:nth-child(2) { opacity: 0; }
.burger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -7px); }

@media (max-width: 1024px) {
    .hero-title { font-size: 76px; }
    .hero-subtitle-main { font-size: 32px; }
    .nav-menu { display: none; }
    .burger-menu { display: flex; }
}
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 40px;
    }
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .ip-container {
        width: 100%;
        max-width: 400px;
        justify-content: space-between;
    }
    .ip-address-box {
        font-size: 16px;
        padding: 0 12px;
    }
    .hero-buttons-group {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
    }
    .btn { justify-content: center; }
    .hero-character-block {
        align-items: center;
        margin-top: 40px;
    }
    .character-wrapper {
        height: 300px;
    }

    .socials-box {
        align-items: center;
    }
}

/* ==========================================================================
   СТАТИСТИКА, ПРЕИМУЩЕСТВА (не связаны с донатом, но оставим)
   ========================================================================== */
.main-content-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 5;
}
/* ... (остальные стили статистики и преимуществ оставлены без изменений, они не конфликтуют) ... */
/* ============================================================
   ФУТЕР (восстановление)
   ============================================================ */
.main-footer {
    background: #0a0d12;
    border-top: 1px solid var(--border-glass);
    padding: 70px 0 0 0;
    margin-top: 120px;
    position: relative;
    z-index: 10;
}
.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px 50px 24px;
    display: flex;
    justify-content: space-between;
    gap: 50px;
}
.footer-info {
    max-width: 400px;
}
.footer-logo {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}
.footer-logo span {
    color: var(--primary-orange);
}
.footer-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}
.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #4cd964;
    background: rgba(76, 217, 100, 0.06);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(76, 217, 100, 0.15);
}
.footer-status .status-dot {
    width: 6px;
    height: 6px;
    background: #4cd964;
    border-radius: 50%;
    box-shadow: 0 0 8px #4cd964;
}
.footer-links-group {
    display: flex;
    gap: 60px;
}
.footer-links-col h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 20px;
}
.footer-links-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links-col ul li {
    margin-bottom: 12px;
}
.footer-links-col ul li a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.25s ease, transform 0.25s ease;
    display: inline-block;
}
.footer-links-col ul li a:hover {
    color: var(--primary-orange);
    transform: translateX(4px);
}
.footer-bottom {
    background: #07090d;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    padding: 24px 0;
}
.footer-bottom-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.copyright-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}
.mojang-disclaimer {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1.5;
    text-align: right;
    max-width: 700px;
}
@media (max-width: 992px) {
    .footer-container { flex-direction: column; gap: 40px; }
    .footer-links-group { justify-content: space-between; gap: 20px; }
}
@media (max-width: 600px) {
    .footer-links-group { flex-direction: column; gap: 30px; }
    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
    }
    .mojang-disclaimer { text-align: center; }
}

/* ==========================================================================
   МАГАЗИН – КОРЗИНА, КАТЕГОРИИ, ТОВАРЫ, ПЛАТЕЖИ (ПОЛНОСТЬЮ ПЕРЕРАБОТАНО)
   ========================================================================== */

/* ---- Плавающая кнопка корзины ---- */
.cart-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff7a00, #ff4500);
    border: none;
    box-shadow: 0 8px 25px rgba(255, 69, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}
.cart-button:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 69, 0, 0.6);
}
.cart-button .cart-icon {
    fill: #fff;
    width: 26px;
    height: 26px;
}
.cart-button .corner {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff3b30;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #13191f;
    padding: 0 4px;
}
.cart-button .corner:empty {
    display: none;
}

/* ---- Управляющая панель (сервера и категории) ---- */
.shop-sidebar-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    background: var(--panel-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.control-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.control-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}
.shop-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
/* Кнопки серверов и категорий */
.shop-btn-group .button,
.shop-btn-group button {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all var(--transition-speed);
}
.shop-btn-group .button:hover,
.shop-btn-group button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}
.shop-btn-group .button.active,
.shop-btn-group button.active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    color: #fff;
    box-shadow: 0 6px 15px rgba(255, 107, 0, 0.3);
}
/* Категории – дополнительно выделяем активную */
.categories .button.action.active {
    background: var(--primary-orange) !important;
    color: #fff !important;
    border-color: var(--primary-orange) !important;
}

/* ---- Карточки товаров (переопределяем стандартную сетку) ---- */
#items.cards.horizontal {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    margin-top: 30px;
}
#items.cards.horizontal .card {
    background: var(--panel-glass) !important;
    border: 1px solid var(--border-glass) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-radius: 24px !important;
    padding: 30px !important;
    display: flex;
    flex-direction: column;
    align-items: center !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    height: auto !important;
    float: none !important;
    margin: 0 !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}
#items.cards.horizontal .card:hover {
    transform: translateY(-8px) !important;
    border-color: rgba(255, 107, 0, 0.3) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4), 0 0 30px rgba(255, 107, 0, 0.1) !important;
}
#items.cards.horizontal .card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,107,0,0.05) 0%, rgba(0,0,0,0) 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
#items.cards.horizontal .card:hover::before {
    opacity: 1;
}
#items.cards.horizontal .card .image,
#items.cards.horizontal .card .picture {
    width: 90px !important;
    height: 90px !important;
    margin-bottom: 20px !important;
    flex-shrink: 0 !important;

    /* Фон для картинки: сохраняем background-image из инлайн-стиля */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;

    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: all 0.4s ease !important;
    position: relative !important;
    float: none !important;
}

/* Убираем лишний фон, который перекрывал картинку */
#items.cards.horizontal .card .image {
    background-color: rgba(255, 255, 255, 0.02) !important; /* подложка на случай отсутствия картинки */
}

#items.cards.horizontal .card:hover .image,
#items.cards.horizontal .card:hover .picture {
    border-color: rgba(255, 107, 0, 0.2) !important;
    transform: scale(1.05) rotate(3deg) !important;
}
#items.cards.horizontal .card .image img,
#items.cards.horizontal .card .picture img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}
#items.cards.horizontal .card .name,
#items.cards.horizontal .card .title {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #fff !important;
    margin-bottom: 12px !important;
    line-height: 1.3 !important;
    font-family: var(--font-stack) !important;
    float: none !important;
    display: block !important;
}
#items.cards.horizontal .card .description {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
    font-weight: 500 !important;
}
#items.cards.horizontal .card .cost,
#items.cards.horizontal .card .price {
    font-size: 24px !important;
    font-weight: 900 !important;
    color: #4cd964 !important;
    margin-top: auto !important;
    margin-bottom: 20px !important;
    font-family: var(--font-stack) !important;
    text-shadow: 0 4px 10px rgba(76, 217, 100, 0.15) !important;
    float: none !important;
    display: block !important;
}
#items.cards.horizontal .card .button.buy,
#items.cards.horizontal .card .buy-button,
#items.cards.horizontal .card button {
    width: 100% !important;
    background: linear-gradient(135deg, #ff7a00 0%, #ff4500 100%) !important;
    border: none !important;
    color: #fff !important;
    padding: 14px 20px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    box-shadow: 0 5px 15px rgba(255, 69, 0, 0.25) !important;
    transition: all 0.3s ease !important;
    float: none !important;
    display: block !important;
}
#items.cards.horizontal .card .button.buy:hover,
#items.cards.horizontal .card .buy-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(255, 69, 0, 0.4) !important;
    background: linear-gradient(135deg, #ff8c1a 0%, #ff5500 100%) !important;
}

#items.cards.horizontal .card .description .sub-text {
    margin-bottom: 5px;
    opacity: 0.5;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
}
#items.cards.horizontal .card .description .cost .old-cost {
    font-size: 70%;
    opacity: 0.5;
    position: relative;
    display: inline-block;
    margin-left: 8px;
    text-decoration: line-through;
    color: #aaa;
}
#items.cards.horizontal .card .description .cost .old-cost:after {
    /* для надёжности – линия через цену */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #aaa;
}

@media (max-width: 1200px) {
    #items.cards.horizontal {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}
@media (max-width: 680px) {
    #items.cards.horizontal {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    #items.cards.horizontal .card {
        padding: 24px !important;
    }
    #items.cards.horizontal .card .image,
    #items.cards.horizontal .card .picture {
        width: 80px !important;
        height: 80px !important;
    }
    #items.cards.horizontal .card .name {
        font-size: 18px !important;
    }
}

/* Даём приоритет инлайн-стилям, которые ставит скрипт */
#items .card[style*="display: none"],
#items .card[style*="display:none"] {
    display: none !important;
}

/* Блок скидки (абсолютно позиционирован) */
#items .card .sale {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    border-radius: 30px;
    background: #ff4a4a;
    box-shadow: 0 4px 15px rgba(255, 74, 74, 0.4);
    color: #fff;
    font-weight: 700;
    pointer-events: none;
    overflow: hidden;
}

/* Процент скидки */
#items .card .sale__size {
    padding: 4px 14px;
    font-size: 14px;
    background: #ff4a4a;
    border-top-left-radius: 30px;
    border-bottom-left-radius: 30px;
}

/* Таймер окончания (если есть) */
#items .card .sale__timer {
    padding: 4px 14px;
    font-size: 12px;
    background: #ff5b5b;
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Прелоадер внутри таймера (пока данные загружаются) */
#items .card .sale__timer .preloader-pulse.dark {
    width: 50px;
    height: 8px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    animation: pulse-dark 1s infinite;
}
@keyframes pulse-dark {
    0% { opacity: 0.4; }
    50% { opacity: 0.9; }
    100% { opacity: 0.4; }
}

/* Старая цена (зачёркнутая) */
#items .card .cost .old-cost {
    font-size: 70%;
    opacity: 0.5;
    position: relative;
    display: inline-block;
    margin-left: 8px;
    text-decoration: line-through;
    color: #aaa;
}
/* Дополнительная линия через цену (для надёжности) */
#items .card .cost .old-cost:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #aaa;
}

/* Адаптив для мобильных */
@media (max-width: 680px) {
    #items .card .sale {
        top: 12px;
        right: 12px;
    }
    #items .card .sale__size {
        font-size: 12px;
        padding: 3px 10px;
    }
    #items .card .sale__timer {
        font-size: 10px;
        padding: 3px 10px;
    }
}

@font-face {
    font-family: 'Icons';
    src: url('/statics/assets/icons/icons.eot');
    src: url('/statics/assets/icons/icons.eot?#iefix') format('embedded-opentype'),
    url('/statics/assets/icons/icons.woff2') format('woff2'),
    url('/statics/assets/icons/icons.woff') format('woff'),
    url('/statics/assets/icons/icons.ttf') format('truetype'),
    url('/statics/assets/icons/icons.svg#icons') format('svg');
    font-weight: normal;
    font-style: normal;
    font-variant: normal;
    text-transform: none;
    text-decoration: inherit;
}

/* ============================================================
   КНОПКИ КАТЕГОРИЙ: ИКОНКА И ТЕКСТ ВСЕГДА В ОДНОЙ СТРОКЕ
   ============================================================ */

/* Применяем ко всем кнопкам внутри .categories */
.categories .button,
.categories .button.action {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important; /* кнопки не сжимаются по ширине */
    gap: 6px !important;
}

/* Сама иконка – не сжимается и не переносится */
.categories .button .icon,
.categories .button.action .icon {
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Если внутри кнопки есть текст, он тоже не переносится */
.categories .button .label,
.categories .button.action .label,
.categories .button span,
.categories .button.action span {
    white-space: nowrap !important;
    display: inline !important;
}

/* ============================================================
   БАЗОВЫЕ СТИЛИ ДЛЯ ВСЕХ ИКОНОК
   ============================================================ */
i.icon {
    display: inline-block;
    font-family: 'Icons';
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 1.18em;
    height: 1em;
    text-align: center;
    margin-right: 0.25rem;
}
i.icon:before {
    content: '';
}

/* ============================================================
   ОПРЕДЕЛЕНИЯ ВСЕХ ИКОНОК, ИСПОЛЬЗУЕМЫХ НА САЙТЕ
   ============================================================ */

/* Корзина (shopping basket) */
i.shopping.basket.icon:before {
    content: "\f291";
}

/* Плюс (добавить) */
i.plus.icon:before {
    content: "\f067";
}

/* Минус (убрать) */
i.minus.icon:before {
    content: "\f068";
}

/* Корзина (shopping cart) – если используется */
i.shopping.cart.icon:before {
    content: "\f07a";
}

/* Удаление (trash) */
i.trash.alternate.icon:before {
    content: "\f2ed";
}
i.trash.icon:before {
    content: "\f2ed";
}

/* Тэг (категория) */
i.tag.icon:before {
    content: "\f02b";
}

/* Множество тегов (Все товары) – ДОБАВЛЕНО */
i.tags.icon:before {
    content: "\f02c";
}

/* Стрелки (для слайдеров, если есть) */
i.angle.right.icon:before {
    content: "\f105";
}
i.angle.left.icon:before {
    content: "\f104";
}
i.angle.down.icon:before {
    content: "\f107";
}
i.angle.up.icon:before {
    content: "\f106";
}

/* Закрыть (крестик) – для модалок */
i.close.icon:before,
i.times.icon:before {
    content: "\f00d";
}

/* Значок информации и т.д. (если нужно) */
i.info.circle.icon:before {
    content: "\f05a";
}
i.exclamation.circle.icon:before {
    content: "\f06a";
}

/* Иконка "обмен" (для валюты) – если есть */
i.exchange.icon:before {
    content: "\f362";
}

/* Иконка "плюс в круге" – если используется */
i.plus.circle.icon:before {
    content: "\f055";
}

/* ---- Инструкция ---- */
.shop-instruction-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 30px;
}
.module-manual {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    white-space: pre-line;
}

.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(6, 9, 13, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    display: none; /* управляется скриптом */

    overscroll-behavior: contain !important;
    touch-action: none !important; /* Запрещает жесты прокрутки пальцем на фоне модалки */
}
.modal[style*="display: block"],
.modal[style*="display:block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html.disable-scroll {
    overflow: hidden !important;
    overscroll-behavior: contain !important;
}

body.disable-scroll {
    overflow: hidden !important;
    overscroll-behavior: contain !important;
}

/* Для мобильных: переопределяем стили, которые добавляет shop.js */
@media (max-width: 768px) {
    body.disable-scroll,
    html.disable-scroll,
    body.modal-lock-mobile,
    html.modal-lock-mobile {
        overflow: visible !important;
        overscroll-behavior: contain !important;
        position: static !important;
        top: auto !important;
        width: auto !important;
        margin-top: 0 !important;
        height: auto !important;
    }
}

.modal .layer > .content {
    max-height: 70vh;
    overflow-y: auto !important;

    padding: 0; /* если нужно, но лучше оставить как есть */

    overscroll-behavior: contain !important;
    touch-action: pan-y !important; /* Разрешает вертикальный скролл внутри */
}

.modal .layer {
    background: #141a20 !important;
    border: 1px solid rgba(255, 107, 0, 0.25) !important;
    border-radius: 24px !important;
    max-width: 1100px !important;
    width: 100% !important;
    max-height: 95vh;
    overflow-y: auto;
    position: relative !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 107, 0, 0.05) !important;
    padding: 40px !important;
    margin: auto !important;
    float: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    animation: modalFadeIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal .close.modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 30px !important;
    width: 30px !important;
    height: 30px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
    float: none !important;
    margin: 0 !important;
}
.modal .close.modal-close::before,
.modal .close.modal-close::after {
    content: '' !important;
    position: absolute !important;
    width: 2px !important;
    height: 18px !important;
    background-color: #808484 !important;
    transition: background-color 0.2s ease !important;
}
.modal .close.modal-close::before { transform: rotate(45deg) !important; }
.modal .close.modal-close::after { transform: rotate(-45deg) !important; }
.modal .close.modal-close:hover::before,
.modal .close.modal-close:hover::after {
    background-color: #ff3b30 !important;
}
.modal .close-button { display: none !important; }

.modal .content {
    display: block !important;
    width: 100% !important;
    color: #fff !important;
}
.modal .content h2,
.modal .content h3,
.modal .content .title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #fff !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    font-family: var(--font-stack) !important;
}
.modal .content input[type="text"],
.modal .content select {
    width: 100% !important;
    background: #1b2229 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 14px 18px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    display: block !important;
    transition: border-color 0.3s ease;
}
.modal .content input[type="text"]:focus {
    border-color: #ff7a00 !important;
    outline: none !important;
}
/* Валидация – красная рамка */
.input_invalid {
    border-color: #ff3b30 !important;
    box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.3) !important;
}
.input_invalid label input {
    color: #ff3b30 !important;
}

.modal .content .button,
.modal .content button,
.modal .content input[type="submit"] {
    display: block !important;
    width: 100% !important;
    background: linear-gradient(135deg, #ff7a00 0%, #ff4500 100%) !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    margin-top: 24px !important;
    transition: all 0.3s ease !important;
    float: none !important;
    box-sizing: border-box !important;
}
.modal .content .button:hover,
.modal .content button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(255, 69, 0, 0.45) !important;
}

/* ---- Структура корзины (две колонки) ---- */
.modal .cart {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding-right: 10px !important;
}
@media screen and (min-width: 800px) {
    .modal .cart {
        flex-direction: row !important;
    }
    .modal .cart .items {
        width: 55% !important;
        border-right: 1px solid var(--border-glass) !important;
    }
    .modal .cart .form {
        width: 45% !important;
    }
}
.modal .cart .items,
.modal .cart .form {
    padding: 30px !important;
    box-sizing: border-box !important;
}

.modal .cart .form p {
    margin-top: -10px !important;
    margin-bottom: 15px !important;
}

/* Купон: увеличить подсказку */
.modal .cart .form .field small {
    font-size: 14px !important;
    line-height: 1.4 !important;
}

.modal .field .input__ui .js-apply-coupon {
    display: none !important;
}

/* ============================================================
   НОВАЯ КНОПКА "ПРИМЕНИТЬ" ДЛЯ КУПОНА (под полем ввода)
   ============================================================ */

/* Новая кнопка "Применить/Удалить" под полем купона – с прозрачным фоном и обводкой */
/* Общие стили для кнопки "Применить/Удалить" */
.modal .field .js-apply-coupon-new {
    display: inline-block !important;
    background: transparent !important;
    padding: 14px 32px !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
    border: 2px solid !important;
    box-shadow: none !important;
    transition: all 0.25s ease !important;
    margin-top: 12px !important;
    width: 100% !important;
    max-width: 240px !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
}

/* Кнопка "Применить" – зелёная */
.modal .field .js-apply-coupon-new.apply {
    color: #28a745 !important;
    border-color: #28a745 !important;
}

.modal .field .js-apply-coupon-new.apply:hover {
    background: #28a745 !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3) !important;
}

/* Кнопка "Удалить" – красная */
.modal .field .js-apply-coupon-new.remove {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.modal .field .js-apply-coupon-new.remove:hover {
    background: #dc3545 !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3) !important;
}

.modal .field .js-apply-coupon-new:active {
    transform: scale(0.97) !important;
}

@media (max-width: 600px) {
    .modal .field .js-apply-coupon-new {
        max-width: 100% !important;
        padding: 16px !important;
        font-size: 17px !important;
    }
}

.modal .cart .item {
    display: flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 16px !important;
    padding: 18px !important;
    margin-bottom: 18px !important;
    transition: transform 0.2s ease, border-color 0.2s ease !important;
}

@media (max-width: 600px) {
    .modal .close.modal-close {
        right: 16px !important;
        top: 16px !important;
    }
    .modal .cart {
        padding-right: 0 !important;
    }
    .modal .cart .item .actions .button.action {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
    .modal .cart .item .actions .counter {
        font-size: 16px !important;
        padding: 0 8px !important;
    }
}

.modal .cart .item:hover {
    border-color: rgba(255, 107, 0, 0.3) !important;
    transform: translateY(-2px) !important;
}
.modal .cart .item .image {
    width: 60px !important;
    height: 60px !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-radius: 12px !important;
    margin-right: 15px !important;
    flex-shrink: 0 !important;
}
.modal .cart .item .content {
    flex-grow: 1 !important;
}
.modal .cart .item .content .sub-text {
    font-size: 11px !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
    margin-bottom: 4px !important;
    font-weight: 600 !important;
}
.modal .cart .item .content .name {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 6px !important;
}
.modal .cart .item .content .cost {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--primary-orange) !important;
}
.modal .cart .item .content .cost .old-cost {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    text-decoration: line-through !important;
    margin-left: 8px !important;
    font-weight: 400 !important;
}
.modal .cart .item .actions {
    display: flex !important;
    align-items: center !important;
    margin-top: 10px !important;
    gap: 8px !important;
}
.modal .cart .item .actions .button.action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-glass) !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}
.modal .cart .item .actions .button.action:hover {
    background: var(--primary-orange) !important;
    border-color: var(--primary-orange) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3) !important;
}

.modal .cart .item .actions .button.action .icon {
    font-size: 14px !important;
    margin: 0 !important;
}

.modal .cart .item .actions .counter {
    font-size: 18px !important;
    font-weight: 700 !important;
    padding: 0 12px !important;
    min-width: 30px !important;
    text-align: center !important;
    color: #fff !important;
}

.modal .popular-items-area {
    margin-top: 25px !important;
    border-top: 1px solid var(--border-glass) !important;
    padding-top: 20px !important;
}
.modal .popular-items {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 12px !important;
}

/* ---- Итоговая стоимость ---- */
.modal .cart .form .total-cost {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: rgba(255, 107, 0, 0.05) !important;
    border: 1px dashed rgba(255, 107, 0, 0.2) !important;
    padding: 15px 20px !important;
    border-radius: 16px !important;
    margin-bottom: 25px !important;
}
.modal .cart .form .total-cost .sub-text {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
}
.modal .cart .form .total-cost .value {
    font-size: 26px !important;
    font-weight: 900 !important;
    color: var(--primary-orange) !important;
    text-shadow: 0 0 15px rgba(255, 107, 0, 0.3) !important;
}

/* ---- Поля ввода (с плавающим placeholder) ---- */
.modal .field {
    margin-bottom: 18px !important;
    position: relative !important;
}
.modal .field .input {
    position: relative !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 12px !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}
.modal .field .input:focus-within {
    border-color: var(--primary-orange) !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.15) !important;
}
.modal .field .input label {
    display: block !important;
    position: relative !important;
    width: 100% !important;
}
.modal .field .input label input {
    width: 100% !important;
    padding: 26px 16px 10px 16px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    font-family: var(--font-stack) !important;
    box-sizing: border-box !important;
}
.modal .field .input label > span {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--text-muted) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    pointer-events: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.modal .field .input label input:focus + span,
.modal .field .input label input:valid + span,
.modal .field .input label input:not([value=""]) + span {
    font-size: 11px !important;
    top: 12px !important;
    transform: translateY(0) !important;
    color: var(--primary-orange) !important;
    font-weight: 600 !important;
    opacity: 0.7 !important;
}
.modal .field .input__ui {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
}
.modal .field .input__ui .js-apply-coupon {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--primary-orange) !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    background: rgba(255, 107, 0, 0.1) !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}
.modal .field .input__ui .js-apply-coupon:hover {
    background: var(--primary-orange) !important;
    color: #fff !important;
}
.modal .field small {
    display: block !important;
    font-size: 11px !important;
    color: var(--text-muted) !important;
    margin-top: 6px !important;
    padding-left: 4px !important;
}




/* ---- Платёжные системы (компактная сетка) ---- */
.pay-systems {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 12px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 20px 0 !important;
}
.pay-systems .item,
.pay-systems li {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 16px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    min-height: 80px !important;
}
.pay-systems .item:hover,
.pay-systems li:hover {
    border-color: var(--primary-orange) !important;
    background: rgba(255, 107, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}
.pay-systems .item.active,
.pay-systems li.active {
    border-color: var(--primary-orange) !important;
    background: rgba(255, 107, 0, 0.15) !important;
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.2) !important;
}
.pay-systems .item img,
.pay-systems li img {
    max-width: 80px !important;
    max-height: 30px !important;
    object-fit: contain !important;
    margin-bottom: 6px !important;
}
.pay-systems .item span,
.pay-systems li span {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
}
.pay-systems .item input[type="radio"],
.pay-systems li input[type="radio"] {
    display: none !important;
}

/* ---- Прогресс-бар и системные сообщения ---- */
.shop-ajax-progress.progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--primary-orange);
    z-index: 9999;
    width: 0;
    transition: width 0.4s ease;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 50px;
}

.donate-section {
    margin-bottom: 100px;
    position: relative;
}

.shop-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section-subtitle {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary-orange);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 8px;
}

.section-main-title {
    font-size: 38px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
}
.title-underline {
    width: 60px;
    height: 4px;
    background: var(--primary-orange);
    border-radius: 2px;
    margin: 16px auto 0;
    box-shadow: 0 2px 8px rgba(255,107,0,0.4);
}

/* ==========================================================================
   СКРОЛЛБАР, ВЫДЕЛЕНИЕ
   ========================================================================== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0b0f13; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 0, 0.25);
    border-radius: 10px;
    border: 2px solid #0b0f13;
    transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-orange); }
::selection {
    background: var(--primary-orange);
    color: #fff;
}

/* ==========================================================================
   МЕДИА-ЗАПРОСЫ ДЛЯ МОДАЛОК И ПЛАТЕЖЕЙ (доп. адаптив)
   ========================================================================== */
@media (max-width: 480px) {
    .modal .layer {
        padding: 20px !important;
    }
    .modal .cart .items,
    .modal .cart .form {
        padding: 20px !important;
    }
    .pay-systems {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================================
   ФИКС: ПЛАТЁЖНЫЕ СИСТЕМЫ (сетка вместо столбца)
   ============================================================ */
.modal .payways h2 {
    font-size: 28px !important;
    font-weight: 900 !important;
    color: #fff !important;
    margin-bottom: 8px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.modal .payways h2 .sub-text {
    display: block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-muted, #a0a5b5) !important;
    text-transform: none !important;
    opacity: 1 !important;
    margin-top: 6px !important;
    line-height: 1.4 !important;
}

.payways {
    width: 100%;
}
.payways .ways {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 12px !important;
    margin: 15px 0 !important;
}
.payways .ways .way {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 16px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    min-height: 80px !important;
    text-align: center !important;
}
.payways .ways .way:hover {
    border-color: var(--primary-orange) !important;
    background: rgba(255, 107, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}
.payways .ways .way .image {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 6px !important;
}
.payways .ways .way .image img {
    max-width: 80px !important;
    max-height: 30px !important;
    object-fit: contain !important;
    display: block !important;
}
.payways .ways .way .description .name {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
}
.payways .ways .way .description .sub-text {
    display: none; /* скрываем лишний текст, если есть */
}
/* ============================================================
   АНИМАЦИИ (упрощённые, без конфликтов)
   ============================================================ */

/* Базовый класс для анимаций */
.animate {
    animation-fill-mode: both;
    animation-duration: .75s;
}
.animate.fast {
    animation-duration: .35s;
}

/* Анимация появления (zoomIn) – используется в категориях */
@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
.zoomIn {
    animation: zoomIn 0.3s ease-out forwards;
}

/* Анимация исчезновения (zoomOut) – используется в категориях */
@keyframes zoomOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.85);
    }
}
.zoomOut {
    animation: zoomOut 0.25s ease-in forwards;
}

/* Тряска корзины при клике на пустую */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}
.shake {
    animation: shake 0.5s ease-in-out;
}

/* Пульсация корзины при добавлении товара */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.pulse {
    animation: pulse 0.4s ease-in-out;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translate3d(0, 100%, 0); }
    100% { opacity: 1; transform: translateZ(0); }
}
.fadeInUp {
    animation-name: fadeInUp;
}

@keyframes fadeOutDown {
    0% { opacity: 1; }
    100% { opacity: 0; transform: translate3d(0, 100%, 0); }
}
.fadeOutDown {
    animation-name: fadeOutDown;
}

.preloader {
    padding: 86px 0;
    text-align: center;
    width: 100%;
    color: #999;
    text-transform: uppercase;
    font-size: 80%;
}
.preloader .load {
    display: grid;
    grid-template-columns: 33% 33% 33%;
    grid-gap: 2px;
    width: 50px;
    height: 50px;
    margin: 0 auto;
}
.preloader .load > div {
    background: #d8d8d8;
    transform: scale(0);
    animation: h 1s infinite linear;
    /* ... остальные стили из оригинального CSS */
}
@keyframes h { /* ... */ }

.preloader-pulse {
    display: inline-block;
    vertical-align: middle;
    width: 200px;
    height: 12px;
    border-radius: 3px;
    animation: pulse-light 1s linear infinite;
}
.preloader-pulse.dark {
    width: 100px;
    background: rgba(0,0,0,0.07);
    animation: pulse-dark 1s linear infinite;
}
@keyframes pulse-light {
    0% { background: rgba(255,255,255,0.2); }
    70% { background: rgba(255,255,255,0.3); }
    100% { background: rgba(255,255,255,0.2); }
}
@keyframes pulse-dark {
    0% { background: rgba(0,0,0,0.07); }
    70% { background: rgba(0,0,0,0.12); }
    100% { background: rgba(0,0,0,0.07); }
}



/* ============================================================
   МОДАЛКА ТОВАРА – ФИНАЛЬНАЯ (ДЕСКТОП + МОБИЛЬНЫЕ)
   ============================================================ */

.modal .layer > .content > .item {
    display: flex !important;
    flex-direction: column !important;
    border-radius: 28px !important;
    padding: 42px !important;
    position: relative !important;
    min-height: 400px !important;
    max-height: 80vh !important;
    overflow: hidden !important;
}

.modal .layer > .content > .item .image {
    display: none !important;
}

.modal .layer > .content > .item .content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
}

/* ---- ДЕСКТОПНАЯ СЕТКА (3 колонки) ---- */
.modal .layer > .content > .item .content__area {
    display: grid !important;
    grid-template-rows: auto auto 1fr auto !important;
    grid-template-columns: 1fr auto auto !important;
    height: 100% !important;
    gap: 0 !important;
    flex: 1 !important;
}

/* Категория, название, описание – на всю ширину */
.modal .layer > .content > .item .sub-text,
.modal .layer > .content > .item .name,
.modal .layer > .content > .item .description {
    grid-column: 1 / 4 !important;
}

.modal .layer > .content > .item .sub-text {
    grid-row: 1 / 2 !important;
    color: var(--primary-orange, #ff6b00) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    opacity: 0.7 !important;
    margin-bottom: 8px !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
.modal .layer > .content > .item .sub-text:empty {
    display: none !important;
}
.modal .layer > .content > .item .sub-text .icon {
    display: none !important;
}

.modal .layer > .content > .item .name {
    grid-row: 2 / 3 !important;
    font-size: 42px !important;
    font-weight: 900 !important;
    color: #fff !important;
    line-height: 1.1 !important;
    margin-bottom: 20px !important;
}

.modal .layer > .content > .item .description {
    grid-row: 3 / 4 !important;
    background: rgba(0, 0, 0, 0.25) !important;
    padding: 20px !important;
    border-radius: 16px !important;
    color: #b0b7c8 !important;
    font-size: 18px !important;
    line-height: 1.9 !important;
    overflow-y: auto !important;
    min-height: 100px !important;
    max-height: 300px !important;
    margin: 10px 0 20px 0 !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255,107,0,0.3) transparent !important;
}
.modal .layer > .content > .item .description::-webkit-scrollbar {
    width: 6px !important;
}
.modal .layer > .content > .item .description::-webkit-scrollbar-track {
    background: transparent !important;
}
.modal .layer > .content > .item .description::-webkit-scrollbar-thumb {
    background: rgba(255,107,0,0.4) !important;
    border-radius: 10px !important;
}

/* Цена – в первой колонке */
.modal .layer > .content > .item .cost {
    grid-row: 4 / 5 !important;
    grid-column: 1 / 2 !important;
    justify-self: start !important;
    align-self: center !important;
    font-size: 44px !important;
    font-weight: 700 !important;
    color: #fff !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 12px !important;
    margin: 0 !important;
}
.modal .layer > .content > .item .cost .old-cost {
    font-size: 26px !important;
    opacity: 0.5 !important;
    text-decoration: line-through !important;
    color: #7f879a !important;
}
.modal .layer > .content > .item .cost .change-cost {
    font-size: inherit !important;
}

/* Основная кнопка – во второй колонке */
.modal .layer > .content > .item .js-add-to-cart,
.modal .layer > .content > .item .open-cart,
.modal .layer > .content > .item .button.themed-button {
    grid-row: 4 / 5 !important;
    grid-column: 2 / 3 !important;
    justify-self: end !important;
    align-self: center !important;
    padding: 16px 28px !important;
    border-radius: 18px !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.25s ease !important;
    background: linear-gradient(135deg, #ff7a00 0%, #ff4500 100%) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
}
.modal .layer > .content > .item .js-add-to-cart:hover,
.modal .layer > .content > .item .open-cart:hover,
.modal .layer > .content > .item .button.themed-button:hover {
    transform: translateY(-2px) !important;
}

/* Кнопка "Выбрать еще" – в третьей колонке */
.modal .layer > .content > .item .button.flat.modal-close {
    grid-row: 4 / 5 !important;
    grid-column: 3 / 4 !important;
    justify-self: start !important;
    align-self: center !important;
    padding: 16px 28px !important;
    border-radius: 18px !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.25s ease !important;
    background: transparent !important;
    color: #9ea4b5 !important;
    display: inline-flex !important;
    align-items: center !important;
    margin-left: 12px !important; /* отступ от основной кнопки */
}
.modal .layer > .content > .item .button.flat.modal-close:hover {
    background: rgba(255,255,255,0.05) !important;
}

/* ---- МОБИЛЬНАЯ АДАПТАЦИЯ ---- */
@media (max-width: 700px) {
    .modal .layer > .content > .item {
        padding: 26px !important;
        border-radius: 24px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    /* Переопределяем сетку на flex-колонку */
    .modal .layer > .content > .item .content__area {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        height: 100% !important;
        min-height: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Явный порядок элементов */
    .modal .layer > .content > .item .sub-text {
        order: 1 !important;
        margin-bottom: 8px !important;
        text-align: left !important;
    }
    .modal .layer > .content > .item .name {
        order: 2 !important;
        font-size: 34px !important;
        margin-bottom: 20px !important;
        text-align: left !important;
    }
    .modal .layer > .content > .item .description {
        order: 3 !important;
        font-size: 16px !important;
        max-height: 200px !important;
        padding: 15px !important;
        flex: 1 0 auto !important;
        margin: 10px 0 20px 0 !important;
        text-align: left !important;
    }
    .modal .layer > .content > .item .cost {
        order: 4 !important;
        font-size: 34px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 10px 0 !important;
        width: 100% !important;
    }
    .modal .layer > .content > .item .cost .old-cost {
        font-size: 20px !important;
    }

    /* Контейнер кнопок – теперь внизу, центрирован */
    .modal .layer > .content > .item .js-add-to-cart,
    .modal .layer > .content > .item .open-cart,
    .modal .layer > .content > .item .button.themed-button,
    .modal .layer > .content > .item .button.flat.modal-close {
        order: 5 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 10px !important;
        padding: 0 !important;
        /* Сбрасываем grid-свойства, которые могут мешать */
        grid-row: auto !important;
        grid-column: auto !important;
        justify-self: auto !important;
        align-self: auto !important;
        margin-left: 0 !important;
    }

    /* Сами кнопки – центрируем, ограничиваем ширину */
    .modal .layer > .content > .item .js-add-to-cart,
    .modal .layer > .content > .item .open-cart,
    .modal .layer > .content > .item .button.themed-button,
    .modal .layer > .content > .item .button.flat.modal-close {
        width: 100% !important;
        max-width: 300px !important;
        text-align: center !important;
        padding: 16px 28px !important;
        margin: 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Отступ между кнопками, если их две */
    .modal .layer > .content > .item .button.flat.modal-close {
        margin-top: 8px !important;
    }
}


/* ============================================================
   РЕКОМЕНДУЕМЫЕ ТОВАРЫ В КОРЗИНЕ («С ЭТИМ ВЫБИРАЮТ»)
   ============================================================ */

.modal .popular-items {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 16px !important;
    margin-top: 12px !important;
}

.modal .popular-items .item {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 16px !important;
    padding: 12px !important;
    gap: 14px !important;
    min-height: 100px !important;
}

.modal .popular-items .item .image {
    width: 70px !important;
    height: 70px !important;
    flex-shrink: 0 !important;
    background-size: cover !important;
    background-position: center !important;
    border-radius: 12px !important;
    margin: 0 !important;
}

.modal .popular-items .item .content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-width: 0 !important;
}

.modal .popular-items .item .content .name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 4px !important;
    word-wrap: break-word !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

.modal .popular-items .item .sub-text {
    display: none !important;
}

.modal .popular-items .item .content .cost {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--primary-orange) !important;
    margin: 6px 0 10px 0 !important;
    line-height: 1.2 !important;
}

.modal .popular-items .item .content .cost .change-cost {
    font-size: inherit !important;
    color: var(--primary-orange) !important;
}

.modal .popular-items .item .content .cost .old-cost {
    font-size: 14px !important;
    color: var(--text-muted) !important;
    text-decoration: line-through !important;
    margin-left: 0 !important;
    display: block !important;
    margin-top: 2px !important;
    font-weight: 400 !important;
}

.modal .popular-items .item .actions {
    width: 100% !important;
    margin-top: auto !important;
}

/* ===== УСИЛЕННЫЙ СЕЛЕКТОР ДЛЯ КНОПКИ "ДОБАВИТЬ" ===== */
.modal .popular-items .item .actions .button.action {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 48px !important;          /* явная высота */
    min-height: 48px !important;      /* перестраховка */
    padding: 12px 16px !important;    /* больше отступов */
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 12px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    text-align: center !important;
    background: linear-gradient(135deg, #ff7a00 0%, #ff4500 100%) !important;
}

.modal .popular-items .item .actions .button.action:hover {
    background: var(--primary-orange) !important;
    border-color: var(--primary-orange) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3) !important;
}

.modal .popular-items .item .actions .button.action .label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.modal .popular-items .item .actions .button.action .icon {
    margin: 0 !important;
    font-size: 1.2em !important;
}

@media (max-width: 600px) {
    .modal .popular-items {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .modal .popular-items .item .image {
        width: 60px !important;
        height: 60px !important;
    }
    .modal .popular-items .item .content .name {
        font-size: 14px !important;
    }
    .modal .popular-items .item .content .cost {
        font-size: 16px !important;
    }
    .modal .popular-items .item .content .cost .old-cost {
        font-size: 13px !important;
    }
    .modal .popular-items .item .actions .button.action {
        height: 44px !important;
        min-height: 44px !important;
        font-size: 14px !important;
        padding: 10px !important;
    }
}







/* ============================================================
   ПОСЛЕДНИЕ ПОКУПКИ – УВЕЛИЧЕННЫЙ РАЗМЕР КАРТОЧЕК
   ============================================================ */

.module-last-purchases {
    margin-top: 60px;
}

.module-last-purchases .white-area {
    background: var(--panel-glass, rgba(18, 26, 33, 0.65));
    border: 1px solid var(--border-glass, rgba(255,255,255,0.06));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 24px;
    padding: 30px;
}

.module-last-purchases .wrapper {
    max-width: 100% !important;
    padding: 0 !important;
}

.module-last-purchases h2 {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 20px;
    padding: 0;
}

.module-last-purchases h2 .sub-text {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #a0a5b5);
    text-transform: none;
    opacity: 1;
    margin-top: 8px;
}

.module-last-purchases .cards.small {
    overflow: hidden !important;
    margin: 0 !important;
}

/* Контейнер строго держит один горизонтальный ряд */
.module-last-purchases .cards.small .overwrap-area {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    transition: none !important;
    gap: 12px !important;
}

/* ИЗМЕНЕНИЕ: Ширина увеличена до calc(20% - 10px).
   Теперь на ПК отображается ровно 5 карточек в ряд, они стали больше и солиднее. */
.module-last-purchases .cards.small .card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass, rgba(255,255,255,0.06));
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: margin-left 1s ease, border-color 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
    margin-top: 10px;
    margin-left: 0;

    width: calc(20% - 10px) !important;
    flex-shrink: 0 !important;
}

.module-last-purchases .cards.small .card:hover {
    border-color: rgba(255, 107, 0, 0.3);
    transform: translateY(-4px);
}

.module-last-purchases .cards.small .card .image {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    background-color: rgba(255,255,255,0.05);
}

.module-last-purchases .cards.small .card .description {
    padding: 0;
}

.module-last-purchases .cards.small .card .sub-text {
    display: inline-block;
    background: rgba(255, 107, 0, 0.1);
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-orange, #ff6b00);
    text-transform: none;
    opacity: 1;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.module-last-purchases .cards.small .card .name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Адаптив */
@media (max-width: 700px) {
    .module-last-purchases .white-area {
        padding: 20px;
    }
    .module-last-purchases h2 {
        font-size: 24px;
    }
    .module-last-purchases .cards.small .card {
        width: calc(50% - 8px) !important;
        margin-left: 0;
        padding: 12px;
    }
    .module-last-purchases .cards.small .card .image {
        width: 50px;
        height: 50px;
    }
    .module-last-purchases .cards.small .card .name {
        font-size: 14px;
    }
}


/* ============================================================
   ПЛАВАЮЩАЯ КНОПКА TELEGRAM
   ============================================================ */

.telegram-button {
    position: fixed;
    right: 20px;
    bottom: 90px; /* выше корзины (у корзины bottom: 20px) */
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #0088cc; /* фирменный цвет Telegram */
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
    border: none;
}

.telegram-button:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 136, 204, 0.6);
}

.telegram-button .telegram-icon {
    fill: #fff;
    width: 26px;
    height: 26px;
}
.telegram-button .corner {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff3b30;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #13191f;
    padding: 0 4px;
}
.telegram-button .corner:empty {
    display: none;
}


/* ============================================================
   УВЕДОМЛЕНИЕ О СКИДКАХ
   ============================================================ */

.discount-notice {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 560px;
    width: 90%;
    background: linear-gradient(135deg, #1a1f26 0%, #0d1117 100%);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 107, 0, 0.1);
    animation: discountNoticeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    overflow: hidden;
}

.discount-notice--hidden {
    animation: discountNoticeOut 0.5s ease forwards;
}

.discount-notice__content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.discount-notice__icon {
    font-size: 40px;
    flex-shrink: 0;
    animation: discountNoticeBounce 2s ease infinite;
}

.discount-notice__info {
    flex: 1;
}

.discount-notice__title {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.discount-notice__title .highlight {
    color: var(--primary-orange, #ff6b00);
}

.discount-notice__text {
    font-size: 14px;
    color: var(--text-muted, #a0a5b5);
    margin-top: 4px;
    line-height: 1.4;
}

.discount-notice__close {
    background: none;
    border: none;
    color: #666;
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
}

.discount-notice__close:hover {
    color: #fff;
    transform: scale(1.2);
}

.discount-notice__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-orange, #ff6b00), #ff4500);
    transition: width 0.1s linear;
    border-radius: 0 0 20px 20px;
}

/* Анимации */
@keyframes discountNoticeIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes discountNoticeOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px) scale(0.95);
    }
}

@keyframes discountNoticeBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(-5deg); }
}

/* Адаптив */
@media (max-width: 700px) {
    .discount-notice {
        top: 80px;
        padding: 16px 18px;
        border-radius: 16px;
        max-width: 95%;
    }
    .discount-notice__icon {
        font-size: 30px;
    }
    .discount-notice__title {
        font-size: 17px;
    }
    .discount-notice__text {
        font-size: 13px;
    }
    .discount-notice__close {
        font-size: 24px;
    }
}


/* ============================================================
   ОШИБКА ПОЛЯ КУПОНА (красная рамка, сообщение)
   ============================================================ */

/* Ошибка поля купона – красная рамка со скруглениями */
.modal .field input[name="coupon"].input_invalid {
    border-color: #ff3b30 !important;
    box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.25) !important;
    border-radius: 12px !important; /* значение должно совпадать с оригинальным border-radius поля */
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Стиль сообщения об ошибке */
.modal .field .coupon-error {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #ff3b30 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-top: 10px !important;
    padding: 10px 14px !important;
    background: rgba(255, 59, 48, 0.08) !important;
    border-radius: 10px !important;
    border-left: 4px solid #ff3b30 !important;
    animation: fadeInError 0.3s ease !important;
}

/* Анимация появления сообщения */
@keyframes fadeInError {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ОКНО ОПЛАТЫ – ИДЕАЛЬНАЯ ВЕРСИЯ (как в корзине)
   ============================================================ */

/* ---- Общий контейнер ---- */
.modal .payway {
    padding: 0 !important;
}
.modal .payway form {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

/* ---- Цветной блок (заголовок + сумма) ---- */
.modal .payway .colored-block {
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 16px !important;
    padding: 20px 24px !important;
    margin: 0 0 20px 0 !important;
    border: 1px solid var(--border-glass, rgba(255,255,255,0.06)) !important;
}

.modal .payway .colored-block h2 {
    font-size: 26px !important;
    font-weight: 900 !important;
    color: #fff !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.modal .payway .colored-block h2 .sub-text {
    display: block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-muted, #a0a5b5) !important;
    text-transform: none !important;
    opacity: 1 !important;
    margin-top: 4px !important;
}

.modal .payway .total-cost {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: rgba(255, 107, 0, 0.04) !important;
    border: 1px solid rgba(255, 107, 0, 0.1) !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    margin-top: 12px !important;
}

.modal .payway .total-cost .sub-text {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--text-muted, #a0a5b5) !important;
    text-transform: none !important;
    opacity: 1 !important;
}

.modal .payway .total-cost .value {
    font-size: 24px !important;
    font-weight: 900 !important;
    color: var(--primary-orange, #ff6b00) !important;
}

/* ---- Кнопки выбора типа платежа (если есть) ---- */
.modal .payway .types {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 4px 0 10px 0 !important;
}

.modal .payway .types .button.action {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-glass, rgba(255,255,255,0.06)) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
}
.modal .payway .types .button.action:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}
.modal .payway .types .button.action.active {
    background: var(--primary-orange, #ff6b00) !important;
    border-color: var(--primary-orange, #ff6b00) !important;
    color: #fff !important;
}

/* ---- Поля ввода (ИСПРАВЛЕННЫЕ) ---- */
.modal .payway form .input {
    position: relative !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--border-glass, rgba(255,255,255,0.06)) !important;
    border-radius: 12px !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    margin-bottom: 0 !important;
}

.modal .payway form .input:focus-within {
    border-color: var(--primary-orange, #ff6b00) !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.12) !important;
}

.modal .payway form .input label {
    display: block !important;
    position: relative !important;
    width: 100% !important;
}

.modal .payway form .input label input {
    width: 100% !important;
    padding: 22px 14px 8px 14px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    font-family: var(--font-stack, 'Montserrat', sans-serif) !important;
    box-sizing: border-box !important;
    min-height: 50px !important;
}

.modal .payway form .input label > span {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--text-muted, #a0a5b5) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    pointer-events: none !important;
    transition: all 0.2s ease !important;
}

.modal .payway form .input label input:focus + span,
.modal .payway form .input label input:valid + span,
.modal .payway form .input label input:not([value=""]) + span {
    font-size: 11px !important;
    top: 8px !important;
    transform: translateY(0) !important;
    color: var(--primary-orange, #ff6b00) !important;
    opacity: 0.7 !important;
}

/* Дополнительная иконка справа (если есть) */
.modal .payway form .input .input__ui {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
    color: var(--text-muted) !important;
}

/* ---- Чекбокс (исправленный) ---- */
.modal .payway form .checkbox {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin: 8px 0 4px 0 !important;
    padding: 8px 12px !important;
    background: transparent !important;
    border-radius: 8px !important;
    border: 1px solid transparent !important;
    transition: border-color 0.3s ease !important;
    cursor: pointer !important;
}
.modal .payway form .checkbox:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}
.modal .payway form .checkbox.error {
    border-color: #ff3b30 !important;
    background: rgba(255, 59, 48, 0.04) !important;
    animation: shakeCheckbox 0.5s ease !important;
}
@keyframes shakeCheckbox {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.modal .payway form .checkbox input[type="checkbox"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}
.modal .payway form .checkbox .checkbox__box {
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 5px !important;
    position: relative !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    margin-top: 2px !important;
}
.modal .payway form .checkbox input:checked + .checkbox__box {
    background: var(--primary-orange, #ff6b00) !important;
    border-color: var(--primary-orange, #ff6b00) !important;
}
.modal .payway form .checkbox input:checked + .checkbox__box::before {
    content: "✓" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}
.modal .payway form .checkbox .checkbox__text {
    font-size: 14px !important;
    color: var(--text-muted, #a0a5b5) !important;
    line-height: 1.5 !important;
    flex: 1 !important;
}
.modal .payway form .checkbox .checkbox__text a {
    color: var(--primary-orange, #ff6b00) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border-bottom: 1px solid transparent !important;
    transition: border-color 0.2s ease !important;
}
.modal .payway form .checkbox .checkbox__text a:hover {
    border-bottom-color: var(--primary-orange, #ff6b00) !important;
}

/* ---- Кнопки действий (ОПТИМАЛЬНЫЙ РАЗМЕР) ---- */
.modal .payway .actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-top: 16px !important;
    align-items: center !important;
}

.modal .payway .actions .button.themed-button {
    flex: 0 1 auto !important;
    background: linear-gradient(135deg, #ff7a00 0%, #ff4500 100%) !important;
    color: #fff !important;
    padding: 14px 32px !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 6px 18px rgba(255, 69, 0, 0.3) !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    min-width: 160px !important;
}

.modal .payway .actions .button.themed-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 69, 0, 0.4) !important;
}

.modal .payway .actions .button.themed-button.load {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

.modal .payway .actions .button.flat.modal-close,
.modal .payway .actions .button.flat.show-ways {
    flex: 0 1 auto !important;
    background: transparent !important;
    color: var(--text-muted, #a0a5b5) !important;
    border: 1px solid var(--border-glass, rgba(255,255,255,0.06)) !important;
    padding: 12px 24px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
}

.modal .payway .actions .button.flat.modal-close:hover,
.modal .payway .actions .button.flat.show-ways:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
}

/* Убираем горизонтальный скролл в модалке */
.modal .layer > .content {
    overflow-x: hidden !important;
}
.modal .payway {
    overflow-x: hidden !important;
}
.modal .payway form {
    overflow-x: hidden !important;
}
.modal .payway .colored-block {
    overflow-x: hidden !important;
}

/* ============================================================
   ОШИБКИ ПОЛЕЙ В ОКНЕ ОПЛАТЫ
   ============================================================ */

/* Красная рамка для невалидных полей */
.modal .payway form .input .input_invalid,
.modal .payway form .input input.input_invalid {
    border-color: #ff3b30 !important;
    box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.2) !important;
}

/* Анимация встряски для полей */
.modal .payway form .input input.input_invalid {
    animation: shakeField 0.5s ease !important;
}

@keyframes shakeField {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* ============================================================
   ОШИБКИ В ОКНЕ ОПЛАТЫ (красная рамка + встряска)
   ============================================================ */

/* Красная рамка для невалидных полей */
.modal .payway form .input_invalid,
.modal .payway form .input input.input_invalid {
    border-color: #ff3b30 !important;
    box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.2) !important;
}

/* Встряска для полей */
.modal .payway form .input input.input_invalid {
    animation: shakeField 0.5s ease !important;
}

@keyframes shakeField {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Ошибка чекбокса – уже есть, но дублируем для надёжности */
.modal .payway form .checkbox.error {
    border-color: #ff3b30 !important;
    background: rgba(255, 59, 48, 0.04) !important;
    animation: shakeCheckbox 0.5s ease !important;
}

@keyframes shakeCheckbox {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Убираем горизонтальный скролл */
.modal .payway {
    overflow-x: hidden !important;
}
.modal .payway * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ---- Адаптив для мобильных ---- */
@media (max-width: 700px) {
    .modal .payway .colored-block {
        padding: 16px !important;
        margin: 0 0 16px 0 !important;
    }
    .modal .payway .colored-block h2 {
        font-size: 22px !important;
    }
    .modal .payway .total-cost .value {
        font-size: 20px !important;
    }
    .modal .payway .actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .modal .payway .actions .button.themed-button {
        min-width: unset !important;
        width: 100% !important;
    }
    .modal .payway .actions .button.flat.modal-close,
    .modal .payway .actions .button.flat.show-ways {
        width: 100% !important;
        text-align: center !important;
    }
}
/* ============================================================
   ПЕРЕОПРЕДЕЛЕНИЕ ССЫЛОК В ОКНЕ ОПЛАТЫ
   ============================================================ */

/* Ссылки в чекбоксе – оранжевые для всех состояний */
.modal .payway form .checkbox .checkbox__text a,
.modal .payway form .checkbox .checkbox__text a:link,
.modal .payway form .checkbox .checkbox__text a:visited,
.modal .payway form .checkbox .checkbox__text a:hover,
.modal .payway form .checkbox .checkbox__text a:active,
.modal .payway form .checkbox .checkbox__text a:focus {
    color: var(--primary-orange, #ff6b00) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border-bottom: 1px solid transparent !important;
    transition: border-color 0.2s ease !important;
}

.modal .payway form .checkbox .checkbox__text a:hover {
    border-bottom-color: var(--primary-orange, #ff6b00) !important;
}

/* Глобально для любых ссылок внутри модалки оплаты – только оранжевые */
.modal .payway a,
.modal .payway a:link,
.modal .payway a:visited {
    color: var(--primary-orange, #ff6b00) !important;
}