/* =========================================
   1. ЗМІННІ ТЕМИ (СПОКІЙНА ПАЛІТРА)
========================================= */
:root {
    /* Кольори тексту */
    --text-main: #333333;
    --text-muted: #6c757d;
    --text-dark: #212529;
    
    /* Фони та акценти (сіра гама) */
    --bg-surface: #ffffff;
    --bg-menu-hover: #f1f5f9;
    --bg-menu-active: #e2e8f0; /* Світло-сірий для активного меню */
    --text-menu-active: #475569; /* Темніший сірий для тексту */
    --accent-gray: #94a3b8; /* Спокійний акцентний колір замість червоного */
    
    /* Рамки та тіні */
    --border-color: #e2e8f0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    
    /* Налаштування карток перевізника */
    --carrier-h: 64px;
    --carrier-r: 12px;
    --carrier-b: 1.5px;
    --carrier-logo: 48px;
    --carrier-img: 40px;
    --carrier-gap: 12px;
}

/* =========================================
   2. БАЗОВІ НАЛАШТУВАННЯ ТА ФОН
========================================= */
html,
.container {
    min-height: 100%;
}

body {
    /* Спокійний, дуже легкий градієнт замість чисто білого */
    background: linear-gradient(135deg, #fcfcfc 0%, #f0f2f5 100%);
    background-attachment: fixed; /* Градієнт стоїть на місці при прокручуванні */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Скидання стилів для списків */
.header__nav ul,
.footer-links,
.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =========================================
   3. ШАПКА САЙТУ (HEADER)
========================================= */
.page__header__area {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1em;
    box-shadow: var(--shadow-soft);
    text-align: justify !important;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-dark);
}

.page-header { margin: 0; }
.header__top { margin: 10px 0 20px 10px; }
.header__bottom { margin: 10px 0 20px 10px; }

.header__logo, .header__search {
    align-self: center;
    justify-self: center;
}

.header__logo img { width: 100%; }

.header__slogan {
    padding: 0;
    margin: 9px 0 0 0;
    font-size: 14px;
    line-height: 1.0;
    color: #999999;
    display: block;
    text-align: center;
}

.header__list {
    display: flex;
    justify-content: space-between;
}

.header__list a, .header__bottom a {
    color: var(--text-muted);
    font-size: 18px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.header__list a:hover, .header__bottom a:hover {
    color: var(--text-dark);
}

.image_email {
    padding: 0 3px 0 0;
    width: 25px;
}

.telphone__kyivstar,
.telphone__vodafone,
.image_kyivstar {
    text-align: center;
}

/* =========================================
   4. НАВІГАЦІЯ ТА МЕНЮ (СПОКІЙНІ КОЛЬОРИ)
========================================= */
.content, .razdel {
    width: 100%;
    border-top: 1px solid #cccccc;
    margin: auto;
    padding: 5px 0;
}
.razdel { border-bottom: 1px solid #cccccc; border-top: none; }

.menu__razdel { margin: auto; }
.menu__list { display: flex; flex-direction: column; }
.menu__item { margin: 2px 0 2px 4px; }

.menu__razdel a, .menu__catalog a {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: bolder;
    text-decoration: none;
}

.menu__item a {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: normal;
    text-decoration: none;
    display: block;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.menu__item a:hover {
    background-color: var(--bg-menu-hover);
    color: var(--text-dark);
}

/* Новий, спокійний вигляд активного меню */
.menu__item_active {
    background-color: var(--bg-menu-active);
    border-radius: var(--radius-sm);
}

.menu__item_active a {
    color: var(--text-menu-active);
    font-weight: 600;
}

/* =========================================
   5. UI ЕЛЕМЕНТИ ТА СПОВІЩЕННЯ
========================================= */
.custom-flash-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.custom-flash-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    color: var(--text-dark);
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    font-size: 14px;
    animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
}

.flash-close {
    background: transparent;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.flash-close:hover { color: var(--text-dark); }

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.select__btn.btn-custom-active {
    background-color: var(--bg-menu-active); /* Світло-сірий фон, як у меню */
    border-color: var(--border-color);       /* Стандартна спокійна рамка */
    color: var(--text-menu-active);          /* Темніший сірий текст */
    font-weight: 600;
}

.border_site {
    background-color: var(--bg-surface);
    border: 1px solid #cccccc;
    border-radius: var(--radius-sm);
}

.counter {
    position: absolute;
    left: 56%;
    top: -10%;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: 11px;
    background: var(--accent-gray); /* Змінено на спокійний сірий */
    color: #fff;
}

/* Перемикач мов */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-surface);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.lang-switcher:hover {
    box-shadow: var(--shadow-soft);
    border-color: #cbd5e1;
}

.lang-item {
    font-size: 14px;
    font-weight: 500;
    color: #868e96;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

/* Спокійний активний стан мови */
.lang-active {
    color: var(--text-dark);
    font-weight: 700;
}

.lang-switcher:hover .lang-item:not(.lang-active) {
    color: var(--text-muted);
}

/* =========================================
   6. КАТАЛОГ, ПРОДУКТИ, ЗАМОВЛЕННЯ
========================================= */
.list_product h1 {
    font-size: 21px;
    font-weight: bold;
    color: var(--text-dark);
    padding: 0 10px;
}

.list_price h3 {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-muted);
    padding: 0 10px;
}

.list_price a {
    font-size: 15px;
    font-weight: bold;
    color: var(--text-dark);
    text-align: center;
    border-spacing: 1px;
    text-decoration: none;
}

.vendor_code {
    font-size: 10px;
    position: absolute;
    right: 25px;
    bottom: 10px;
    color: var(--text-muted);
}

/* Спокійний блок оформлення замість яскраво-жовтого */
.order_information {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-gray);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    padding: 15px;
    color: var(--text-main);
}

.mobile_login_price {
    margin-top: 30px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
}

.mobile_login_price a {
    font-size: 14px;
    color: var(--text-main);
    font-weight: normal;
    text-decoration: none;
}

.nav_price { margin: 10px 0 10px 5px; }
.nav_price img { margin-right: 5px; }
.nav_login { margin: 10px 0 10px 15px; }
.nav_login img { margin-right: 5px; }

/* =========================================
   7. КАРТКИ ПЕРЕВІЗНИКА (CARRIER)
========================================= */
.carrier-input { position: absolute; opacity: 0; pointer-events: none; }

.carrier-card {
    display: flex;
    align-items: center;
    gap: var(--carrier-gap);
    width: 100%;
    min-height: var(--carrier-h);
    padding: .7rem .9rem;
    border: var(--carrier-b) solid var(--border-color);
    border-radius: var(--carrier-r);
    background: var(--bg-surface);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

.carrier-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.carrier-input:checked + .carrier-card {
    border-color: var(--accent-gray);
    background: var(--bg-menu-hover);
}

.carrier-input:focus + .carrier-card {
    outline: 2px solid var(--accent-gray);
    outline-offset: 2px;
}

.carrier-logo {
    width: var(--carrier-logo);
    height: var(--carrier-logo);
    flex: 0 0 var(--carrier-logo);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
}

.carrier-img {
    width: var(--carrier-img);
    height: var(--carrier-img);
    object-fit: contain;
    display: block;
}

.carrier-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.carrier-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-dark);
}

/* =========================================
   8. ПІДВАЛ (FOOTER)
========================================= */
#footer {
    background: var(--bg-surface);
    border-top: 3px solid var(--accent-gray); /* Змінено з червоного на спокійний сірий */
    margin-top: 30px;
}

.footer-modern { padding: 0; }

.footer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.footer-title i { margin-right: 8px; }

.footer-links li {
    margin-bottom: 10px;
    transition: transform 0.2s ease;
}

.footer-links li:hover { transform: translateX(5px); }
.footer-links i { margin-right: 8px; font-size: 12px; color: var(--text-muted); }

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
}

.footer-link:hover {
    color: var(--text-dark);
}

.footer-modern p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-modern strong { color: var(--text-dark); }
.footer-modern .fa { width: 20px; text-align: center; }

.footer__row {
    display: flex;
    align-content: center;
    justify-content: center;
}

.footer__text {
    background-color: transparent;
    font-size: 12px;
    letter-spacing: 0.3px;
    color: var(--text-muted);
}

/* =========================================
   9. АДАПТИВНІСТЬ (MEDIA QUERIES)
========================================= */
@media (max-width: 1199.98px) {
    .header__bottom a { font-size: 16px; }
}

@media (max-width: 991.98px) {
    .closebtn, 
    .closebtn a {
        position: absolute;
        top: 0;
        right: 25px;
        font-size: 36px;
        margin-left: 50px;
    }

    .header__bottom { margin: 0 0 10px 0; }
    .header__top { margin: 10px 0 10px 10px; }

    .site_nav {
        min-height: 100%;
        width: 0;
        visibility: hidden;
        position: fixed;
        z-index: 1031;
        top: 0;
        left: 0;
        background-color: var(--bg-surface);
        overflow-x: hidden;
        transition: 0.2s;
        padding-top: 20px;
    }
}

@media (max-width: 767.98px) {
    .header__bottom { margin: 10px 0 10px 10px; }
    .header__top { margin: 10px 0 0 10px; }

    .footer-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .footer-modern p,
    .footer-link { font-size: 13px; }
}

@media (max-width: 576px) {
    :root {
        --carrier-h: 60px;
        --carrier-logo: 44px;
        --carrier-img: 36px;
        --carrier-gap: 10px;
    }
    .carrier-title { font-size: 1rem; }
}