:root {
    --primary-color: #4b8cca;
    --accent-color: #c3ca14;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f4f4f4;
    --bg-dark: #4051a6;
    --container-width: 1600px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--text-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}
.menu-toggle {
    display: none; 
}

.mobile-header-wrap {
    display: none;
}
.desktop-header-wrap {
    display: block;
}

.top-bar {
    background-color: var(--primary-color);
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.socials a, .user-login a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.3s;
}

.socials a:hover, .user-login a:hover {
    color: var(--accent-color);
}

.branding-section {
    position: relative;
    background-image: url('../images/headerbg.jpg'); 
    background-size: cover;
    background-position: center;
    height: 200px; 
    color: var(--text-light);
}

.branding-content {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr; 
    grid-template-rows: 1fr auto;
    align-items: end; 
    padding-bottom: 20px;
}

.company-logo {
    grid-column: 2; 
    grid-row: 1 / span 2;
    align-self: center;
    text-align: center;
}

.company-logo img {
    max-height: 120px;
}

.contacts-left {
    grid-column: 1;
    text-align: left;
}

.info-right {
    grid-column: 3;
    text-align: right;
}

.branding-text strong {
    display: block;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.main-nav {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.menu-toggle {
    display: none; /* Ховаємо на десктопі */
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li a {
    display: block;
    padding: 20px 15px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    text-transform: uppercase;
}

.nav-links li a:hover {
    color: var(--accent-color);
}

.search-box {
    display: flex;
}

.search-box input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-box button {
    padding: 8px 15px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}



    .cart-btn {
        position: relative;
        text-decoration: none;
        color: #333;
        font-weight: bold;
        margin-left: 15px;
    }
    .cart-badge {
        position: absolute;
        top: -8px;
        right: -12px;
        background-color: #d9534f;
        color: white;
        border-radius: 50%;
        padding: 2px 6px;
        font-size: 11px;
    }

    @media (max-width: 991px) {
    .desktop-header-wrap {
        display: none !important; 
    }
    .mobile-header-wrap {
        display: block !important; 
    }
}

.mobile-top-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-image: url('../images/headerbg.jpg');
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 120px;
    position: relative;
}

/* Кнопки в смужці */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--bg-light);
    cursor: pointer;
    z-index: 1020;
    padding: 20px;
}

.mobile-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); 
    z-index: 1010;
    display: flex; 
}

.mobile-logo img {
    height: 100px;
    width: auto;
}

.mobile-cart-btn {
    position: relative;
    font-size: 22px;
    color: white;
}
.cart-badge-mobile {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #d9534f;
    color: var(--bg-dark);
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* МЕНЮ (ШУХЛЯДА) */
.nav-drawer {
    position: fixed;
    top: 0;
    left: -100%; 
    width: 85%;
    max-width: 520px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    transition: left 0.3s ease;
    transform: translateX(0);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.nav-drawer.active {
    left: 0; /* Виїжджає */
}

/* Шапка меню */
.drawer-header {
    background: var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}
.drawer-title { 
    font-weight: 700; 
    font-size: 18px; 
    line-height: 1.2;
    padding-right: 15px; 
}
.drawer-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px; 
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px; 
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.drawer-close:active {
    transform: scale(0.9); 
}

/* Вміст меню */
.drawer-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.mobile-nav-links {
    list-style: none;
    margin-bottom: 20px;
}
.mobile-nav-links li {
    border-bottom: 1px solid #eee;
}
.mobile-nav-links a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f5f5f5;
}

/* Мобільний пошук */
.mobile-search-wrap { margin-bottom: 30px; }
.mobile-search-box { display: flex; }
.mobile-search-box input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}
.mobile-search-box button {
    padding: 8px 12px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
}

/* Контакти в меню */
.mobile-contacts-block h4 {
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    margin-bottom: 15px;
    padding-bottom: 5px;
}
.mobile-contacts-block p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
    display: flex;
    gap: 10px;
}
.mobile-socials {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}
.mobile-socials a {
    font-size: 24px;
    color: #777;
}