/**
 * Custom Header Component – Styles
 */

/* ── Header bar ──────────────────────────────────────────────────────── */

.ch-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--pink);
    z-index: 1100;
    display: flex;
    align-items: center;
}

.ch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* ── Logo ────────────────────────────────────────────────────────────── */

.ch-logo a,
.ch-logo img {
    display: block;
    max-height: 50px;
    width: auto;
}

/* ── Right actions ───────────────────────────────────────────────────── */

.ch-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ── Registration button ─────────────────────────────────────────────── */

.ch-btn-register {
    display: inline-flex;
    align-items: center;
    background: var(--green);
    color: #000;
    border: none;
    border-radius: 100px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.18s ease;
}

.ch-btn-register:hover {
    opacity: 0.85;
    color: #000;
}

/* ── Cart pill ───────────────────────────────────────────────────────── */

.ch-cart-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--pink);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    border-radius: 100px;
    padding: 7px 15px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.ch-cart-pill:hover {
    border-color: var(--green);
    color: var(--green);
}

.ch-cart-pill .fa {
    font-size: 18px;
}

/* ── Hamburger ───────────────────────────────────────────────────────── */

.ch-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.ch-burger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: background 0.18s ease;
}

.ch-burger:hover .ch-burger-line {
    background: var(--green);
}

/* ── Overlay ─────────────────────────────────────────────────────────── */

.ch-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1199;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ── Drawer ──────────────────────────────────────────────────────────── */

.ch-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 70%;
    max-width: 380px;
    background: #fff;
    z-index: 99999;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 0 40px;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ch-drawer.ch-is-open {
    transform: translateX(0);
}

/* ── Drawer close ────────────────────────────────────────────────────── */

.ch-drawer-close {
    align-self: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 18px 18px 0 0;
    background: transparent;
    border: none;
    color: #9a9a9a;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
    transition: color 0.18s ease, background 0.18s ease;
}

.ch-drawer-close:hover {
    color: #555;
    background: #f0f0f0;
}

/* ── Drawer user ─────────────────────────────────────────────────────── */

.ch-drawer-user {
    padding: 20px 28px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.ch-drawer-user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #000;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.18s ease;
}

.ch-drawer-user-link:hover {
    color: var(--pink);
}

.ch-drawer-user-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5f5f5;
    flex-shrink: 0;
    color: var(--pink);
}

/* ── Drawer search ───────────────────────────────────────────────────── */

.ch-drawer-search {
    padding: 20px 28px;
    border-bottom: 1px solid #f0f0f0;
}

.ch-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 100px;
    overflow: hidden;
    background: #fafafa;
    transition: border-color 0.18s ease;
}

.ch-search-form:focus-within {
    border-color: var(--pink);
}

.ch-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 11px 18px;
    font-size: 15px;
    outline: none;
    color: #000;
    min-width: 0;
}

.ch-search-input::placeholder {
    color: #aaa;
}

.ch-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    flex-shrink: 0;
    transition: color 0.18s ease;
}

.ch-search-btn:hover {
    color: var(--pink);
}

/* ── Catalog / Гайди button ──────────────────────────────────────────── */

.ch-drawer-catalog {
    padding: 20px 28px;
    border-bottom: 1px solid #f0f0f0;
}

.ch-btn-catalog {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    background: var(--green);
    color: #000;
    border-radius: 100px;
    padding: 13px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.18s ease;
}

.ch-btn-catalog:hover {
    opacity: 0.85;
    color: #000;
}

/* ── Navigation list ─────────────────────────────────────────────────── */

.ch-drawer-nav {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    flex: 1;
}

.ch-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ch-nav-list li {
    margin: 0;
}

.ch-nav-list > li > a {
    display: block;
    padding: 13px 28px;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease;
}

.ch-nav-list > li > a:hover {
    color: var(--pink);
    background: #fdf4f9;
}

/* Sub-menu */
.ch-nav-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 4px;
    background: #fafafa;
}

.ch-nav-list .sub-menu li a {
    display: block;
    padding: 9px 28px 9px 44px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    transition: color 0.18s ease;
}

.ch-nav-list .sub-menu li a:hover {
    color: var(--pink);
}

/* ── Shared drawer link style (wishlist, support, logout) ────────────── */

.ch-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 28px;
    font-size: 15px;
    color: #000;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease;
}

.ch-drawer-link:hover {
    color: var(--pink);
    background: #fdf4f9;
}

.ch-wishlist-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 100px;
    background: var(--pink);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 5px 0;
    margin-left: auto;
}

/* ── Wishlist + support ──────────────────────────────────────────────── */

.ch-drawer-wishlist,
.ch-drawer-support {
    border-top: 1px solid #f0f0f0;
}

/* ── Logout ──────────────────────────────────────────────────────────── */

.ch-drawer-logout {
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
}

.ch-drawer-logout-link {
    color: #c0392b !important;
}

.ch-drawer-logout-link:hover {
    background: #fff5f5 !important;
    color: #c0392b !important;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

/* Tablet (768px – 1199px) — slightly shorter header */
@media ( max-width: 1199px ) {
    .ch-header {
        height: 72px;
    }
}

/* Mobile (< 768px) — smallest header, tighter spacing */
@media ( max-width: 575px ) {

}
@media ( max-width: 767px ) {
    .ch-overlay.ch-is-open {
        display: block;
        opacity: 1;
    }
    .ch-header {
        height: 60px;
    }

    .ch-container {
        gap: 10px;
    }

    .ch-drawer-user-link,
    .ch-search-input,
    .ch-nav-list > li > a,
    .ch-drawer-link,
    .ch-btn-register {
        font-size: 14px;

    }
    .ch-btn-register {
        padding: 9px 15px;
    }
    .ch-cart-pill {
        padding: 7px 12px;
        gap: 7px;
        border-width: 1px;
    }
    .ch-cart-pill .fa {
        font-size: 16px;
    }
    .ch-logo .custom-logo {
        max-height: 40px;
    }

    .ch-drawer {
        width: 320px;
    }
    .ch-drawer-user {
        padding: 10px 28px 15px;
    }
    .ch-btn-catalog {
        padding: 10px 24px;
        font-size: 15px;
        line-height: 1;
        max-width: 100%;
    }
    .ch-nav-list > li > a {
        padding: 10px 28px;
    }
    .ch-drawer-catalog,
    .ch-drawer-search {
        padding: 15px 28px;
    }
    .ch-search-btn {
        width: 39px;
        height: 39px;
    }
    .ch-search-input {
        padding: 9px 15px;
    }
}
