/* --- ПІДКЛЮЧЕННЯ ШРИФТУ VOGA --- */
@font-face {
    font-family: 'Voga';
    /* Шлях виходить з папки css (../) в папку font */
    src: url('../font/voga.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    /* ПРАВКА: Відступи 20px з усіх боків */
    padding: 20px 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;

    color: white;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, color 0.3s ease, border-bottom 0.3s ease, padding 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    color: #111;
    border-bottom: 1px solid #eee;
}

/* --- ЛОГОТИП (Ідеальний центр + Новий шрифт) --- */
.logo {
    font-family: 'Voga', serif;
    /* Новий шрифт */
    font-size: 1.8rem;
    /* Трохи збільшив, бо Voga зазвичай тонкий і високий */
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;

    /* МАГІЯ ЦЕНТРУВАННЯ */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* Це гарантує центр відносно екрану, а не сусідів */
    white-space: nowrap;
    /* Щоб не переносився */
}

.logo:hover {
    opacity: 1;
    color: inherit;
}

/* --- ІКОНКИ (Зліва і Справа) --- */
/* Важливо: оскільки логотип absolute, іконки просто розходяться по краях завдяки justify-content: space-between у .header */

.header-icons {
    display: flex;
    gap: 15px;
}

.header button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    /* Центрування іконки в кнопці */
}

.icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}


/* --- BURGER MENU --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 2001;
    padding: 25px 30px;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    color: #111;
}

@media (min-width: 769px) {
    .mobile-menu {
        width: 450px;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }
}

.mobile-menu.active {
    transform: translateX(0);
    opacity: 1;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

/* Логотип в меню теж робимо Voga */
.menu-logo {
    font-family: 'Voga', serif;
    font-size: 1.8rem;
    text-transform: uppercase;
    color: #000;
}

.close-menu {
    background: transparent !important;
    border: none !important;
    outline: none;
    box-shadow: none !important;
    cursor: pointer;
    padding: 5px;
    color: #111;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu svg {
    width: 30px;
    height: 30px;
    stroke-width: 1;
}

.close-menu:hover {
    transform: rotate(90deg);
}

.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-link {
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #111;
    font-family: 'Cinzel', serif;
    font-weight: 400;
    text-decoration: none;
}

.menu-link:hover {
    padding-left: 5px;
    color: #000;
}

.menu-link.small {
    font-size: 0.95rem;
    color: #666;
    font-family: 'Manrope', sans-serif;
    text-transform: none;
    font-weight: 300;
}

.menu-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 10px 0;
}

.sale-link {
    color: #D32F2F !important;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
}

.accordion-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.4rem;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
    color: #111;
    font-weight: 400;
    transition: color 0.3s;
}

.menu-item-accordion.open .accordion-head {
    color: #555;
}

.accordion-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    border-left: 1px solid #e0e0e0;
    margin-left: 8px;
    padding-left: 20px;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin 0.4s ease;
}

.accordion-body a {
    display: block;
    font-size: 1rem;
    color: #666;
    font-family: 'Manrope', sans-serif;
    text-decoration: none;
    font-weight: 300;
    padding: 8px 0;
    transition: 0.3s;
    transform: translateX(0);
}

.accordion-body a:hover {
    color: #000;
    transform: translateX(5px);
}

.menu-item-accordion.open .accordion-body {
    max-height: 300px;
    opacity: 1;
    margin-top: 15px;
    margin-bottom: 15px;
}

.menu-item-accordion.open .arrow {
    transform: rotate(180deg);
}

.arrow {
    transition: transform 0.4s ease;
}

.menu-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid #f9f9f9;
}

.menu-footer a {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.1em;
}

.fade-in {
    opacity: 0;
    transform: translateY(10px);
    transition: 0.4s ease;
}

.mobile-menu.active .fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* --- STATIC WHITE HEADER (Для сторінок окрім головної) --- */
.header.header-static {
    background: #ffffff;
    border-bottom: 1px solid #eee;
    color: #111;
    /* Чорний текст */
    position: sticky;
    /* Щоб він не перекривав контент, а йшов потоком, або fixed, але з відступом body */
    top: 0;
}

/* Якщо ми використовуємо fixed position на інших сторінках, треба додати padding-top до body, 
   але в catalog.css ми вже додали відступ зверху, тому тут залишаємо fixed */

/* Додай в css/header.css */
.cart-btn-link {
    position: relative;
    display: flex;
    align-items: center;
    color: inherit;
}

.icon-wrap {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #111;
    /* Чорний кружечок */
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-count.visible {
    opacity: 1;
}

/* Коли хедер білий - кружечок теж має бути контрастним (залишаємо чорним) */