/* =========================================
   CSS ЗМІННІ (ПІДТРИМКА ТЕМ)
   ========================================= */
:root {
    --bg-main: rgba(255, 255, 255, 0.95);
    --bg-header: #fcf3bd;
    --text-main: #2c3e50;
    --text-muted: #6c7a89;
    --card-bg: #ffffff;
    --accent: #2ecc71;
    --accent-hover: #27ae60;
    --accent-blue: #3498db;
    --border: #e0e7eb;
    --shadow: 0 4px 15px rgba(0,0,0,0.05);
    --hero-overlay: rgba(0,0,0,0.55);
    --footer-bg: #1a2a3a;
    --footer-text: #ecf0f1;
    --sale-bg: #e74c3c;
    --whatsapp: #25D366;
    --viber: #7360f2;
    --telegram: #26A5E4;
    --bottom-nav-bg: rgba(255, 255, 255, 0.95);
}

body.dark-mode {
    --bg-main: #121826;
    --bg-header: #1a2332;
    --text-main: #eef2f5;
    --text-muted: #9aaebf;
    --card-bg: #1e2a3a;
    --border: #2d3e50;
    --shadow: 0 4px 15px rgba(0,0,0,0.2);
    --hero-overlay: rgba(0,0,0,0.75);
    --footer-bg: #0a1118;
    --bottom-nav-bg: #1a2332;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========= ШАПКА ========= */
header {
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

main {
    margin-top: 75px;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-img {
    max-height: 45px;
    width: auto;
    height: auto;
    display: block;
    border-radius: 10px;
}

.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo {
    max-height: 45px;
    width: auto;
    height: auto;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
}

.logo-text .blue { 
    background: linear-gradient(180deg, #ffffff 0%, #2c7be5 60%, #1a5bb5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.logo-text .orange { 
    background: linear-gradient(180deg, #ffffff 0%, #f39c12 60%, #e67e22 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.phones {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.phone-link {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    white-space: nowrap;
}

.phone-link:hover {
    color: var(--accent-blue);
}

.search-container {
    flex: 1;
    min-width: 180px;
    max-width: 280px;
}

.search-input {
    width: 100%;
    padding: 8px 14px;
    border-radius: 40px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

.desktop-nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    flex-wrap: nowrap;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
}

.desktop-nav a:hover { color: var(--accent); }

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main);
    white-space: nowrap;
}

.cart-icon-link {
    text-decoration: none;
}

.cart-icon {
    background: #b19cd9 !important;
    color: white !important;
    border: none !important;
    border-radius: 40px !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
}

.cart-icon:hover {
    background: #9b7bc8 !important;
    transform: scale(1.02) !important;
}

.cart-count-badge {
    background: #e74c3c !important;
    color: white !important;
    border-radius: 50% !important;
    padding: 2px 6px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    min-width: 22px !important;
    text-align: center !important;
    display: inline-block !important;
    line-height: 1.2 !important;
}

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bottom-nav-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 8px 20px;
    z-index: 999;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
    padding: 5px 10px;
    border-radius: 30px;
    text-decoration: none;
}

.nav-item.active { color: var(--accent); }
.nav-icon { font-size: 22px; }
.nav-label { font-size: 9px; }
.mobile-cart { position: relative; }
.mobile-cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e74c3c !important;
    color: white !important;
    border-radius: 50% !important;
    width: 16px;
    height: 16px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========= КАТЕГОРІЇ ========= */
.categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 5px 0;
}

.cat-card {
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    padding: 15px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
    min-height: 85px;
}

.cat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 0;
}

.cat-card > * { position: relative; z-index: 1; }
.cat-card:hover { transform: translateY(-3px); }
.cat-text h3 { font-size: 14px; margin-bottom: 3px; color: white !important; }
.cat-text p { font-size: 10px; color: rgba(255,255,255,0.85) !important; }
.cat-emoji { font-size: 36px; min-width: 45px; text-align: center; opacity: 0.8; }

/* ========= ФІЛЬТРИ ========= */
.filters-section { padding: 00px 0 20px; }
.filters-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}
.filter-group {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 6px 18px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}
.filter-group.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.section-title {
    font-size: 24px;
    margin: 30px 0 15px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    padding-bottom: 6px;
}

/* ========= ФУТЕР ========= */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 5px 0 5px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}
.footer-grid a { color: var(--footer-text); text-decoration: none; }
.social-icons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1px; }
.social-icon {
    padding: 6px 14px;
    border-radius: 30px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 12px;
}
.social-icon.whatsapp { background: var(--whatsapp); }
.social-icon.viber { background: var(--viber); }
.social-icon.telegram { background: var(--telegram); }
.social-icon.fb { background: #1877f2; }
.social-icon.ig { background: #e4405f; }
.social-icon.tt { background: #000000; }
.copyright { text-align: center; padding-top: 3px; }

/* ========= МОДАЛЬНІ ВІКНА ========= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--card-bg);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-main);
}
.cart-total { font-size: 18px; font-weight: bold; margin-top: 15px; }
.checkout-btn, .close-modal-btn {
    margin-top: 20px;
    padding: 10px 25px;
    background: var(--accent);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    width: 100%;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.contact-icon { font-size: 24px; min-width: 40px; }
.contact-info { flex: 1; }
.contact-label { font-size: 12px; color: var(--text-muted); }

/* ========= АДАПТИВ ========= */
@media (max-width: 1100px) {
    .desktop-nav { display: none; }
    .bottom-nav { display: flex; }
    body { padding-bottom: 60px; }
}
@media (max-width: 850px) {
    .header-flex { gap: 10px; }
    .logo-text { font-size: 18px; }
    .logo-img, .custom-logo { max-height: 35px; }
    .phone-link { font-size: 12px; }
    .theme-toggle, .cart-icon { padding: 6px 12px; font-size: 13px; }
    .search-container { min-width: 140px; max-width: 200px; }
    main { margin-top: 65px; }
}
@media (max-width: 768px) {
    .categories { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .filter-group { padding: 5px 14px; font-size: 12px; }
}
@media (max-width: 550px) {
    .logo-text { font-size: 14px; }
    .logo-img, .custom-logo { max-height: 30px; }
    .phone-link { font-size: 10px; }
    .search-container { min-width: 90px; max-width: 130px; }
}

/* ========= КНОПКА АКЦІЇ ========= */
.sale-star-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-shrink: 0;
    margin: 0 10px;
}
.sale-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    height: 100%;
    max-height: 55px;
}
.sale-star-btn:hover { transform: scale(1.03); }
.sale-star-img { height: 100%; width: auto; display: block; }
@media (max-width: 992px) { .sale-star-btn { max-height: 48px; } }
@media (max-width: 850px) { .sale-star-btn { max-height: 42px; } }
@media (max-width: 768px) { .sale-star-wrapper { display: none; } }

/* ========= СЛАЙДЕР З ВЕЛИКИМИ ЛОГОТИПАМИ ========= */
/* ========= СЛАЙДЕР З ВЕЛИКИМИ ЛОГОТИПАМИ (ЯСКРАВИЙ) ========= */
.slide-bg {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Забираємо затемнення або робимо його мінімальним */
.slide-bg::before {
    display: none;
}

/* Великий логотип збоку, відцентрований по вертикалі */
.brand-logo-side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-side.left {
    left: 5%;
}

.brand-logo-side.right {
    right: 5%;
}

.brand-logo-side img {
    width: 100%;
    height: auto;
    max-width: 260px;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.6)) drop-shadow(0 0 8px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.brand-logo-side img:hover {
    transform: scale(1.03);
}

/* Напис "Купуй якісне" збоку (яскравий) */
.cursive-title {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Comforter Brush', cursive;
    font-size: 100px;
    font-weight: 400;
    color: #fff;
    text-shadow: 
        0 0 20px rgba(255,255,255,0.9),
        0 0 30px rgba(255,255,255,0.6),
        0 0 40px rgba(0,0,0,0.4),
        3px 3px 6px rgba(0,0,0,0.3);
    letter-spacing: 2px;
    white-space: nowrap;
    z-index: 2;
    background: transparent;
}

.cursive-title.left {
    left: 5%;
}

.cursive-title.right {
    right: 5%;
}

/* Контент по центру (яскравіший текст) */
.slide-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}

.slide-content h1 {
    font-size: 32px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 16px;
    margin-bottom: 25px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}

.slide-content .btn-catalog {
    background: var(--accent);
    color: white;
    padding: 12px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    display: inline-block;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 0 15px rgba(46,204,113,0.5);
}

.slide-content .btn-catalog:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(46,204,113,0.8);
}

/* Адаптація для планшетів */
@media (max-width: 992px) {
    .brand-logo-side {
        width: 200px;
    }
    .brand-logo-side.left {
        left: 3%;
    }
    .brand-logo-side.right {
        right: 3%;
    }
    .brand-logo-side img {
        max-width: 180px;
    }
    .cursive-title {
        font-size: 54px;
    }
    .cursive-title.left {
        left: 3%;
    }
    .cursive-title.right {
        right: 3%;
    }
    .slide-content h1 {
        font-size: 26px;
    }
}

/* Адаптація для мобільних (ховаємо бічні елементи) */
@media (max-width: 768px) {
    .brand-logo-side {
        display: none;
    }
    .cursive-title {
        display: none;
    }
    .slide-bg::before {
        background: rgba(0,0,0,0.3);
    }
    .slide-content {
        padding: 20px;
    }
    .slide-content h1 {
        font-size: 22px;
    }
    .slide-content p {
        font-size: 14px;
    }
    .slide-content .btn-catalog {
        padding: 8px 20px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .slide-content h1 {
        font-size: 18px;
    }
}