﻿/*=================================
HEADER
==================================*/

.main-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 24px 0;
    transition: box-shadow var(--transition-standard), padding var(--transition-standard), border-color var(--transition-standard);
}

.site-scrolled .main-header {
    padding: 18px 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .05);
}

.header-wrapper {
    max-width: var(--container-width);
    margin: auto;
    padding: 0 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 44px;
}

.logo-section {
    min-width: 240px;
    display: grid;
    gap: 5px;
}

.logo {
    display: block;
    font-size: 52px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    color: #3F2D27;
    text-decoration: none;
    line-height: 1;
}

    .logo:hover {
        color: #3F2D27;
    }

.tagline {
    font-size: 13px;
    color: #8B7B74;
    letter-spacing: .5px;
    line-height: 1.2;
}

.search-section {
    flex: 1;
    max-width: 720px;
}

.search-box {
    height: 66px;
    background: #FAF7F2;
    border: 1px solid #ECE4DB;
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 0 30px;
    transition: border-color var(--transition-standard), box-shadow var(--transition-standard), background-color var(--transition-standard);
}

    .search-box:hover {
        border-color: #D7C4B0;
    }

    .search-box:focus-within {
        border-color: #A36B42;
        box-shadow: 0 0 0 4px rgba(163,107,66,.08);
    }

    .search-box i {
        font-size: 21px;
        color: #7A6A62;
    }

    .search-box input {
        flex: 1;
        border: none;
        background: transparent;
        outline: none;
        min-width: 0;
        margin-left: 16px;
        font-size: 16px;
    }

.header-icons {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

    .header-icons > a,
    .account-menu-trigger {
        width: 50px;
        height: 50px;
        border: 0;
        border-radius: 50%;
        background: #FAF7F2;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        text-decoration: none;
        color: #4E342E;
        position: relative;
        line-height: 1;
        transition: background-color var(--transition-standard), color var(--transition-standard), transform var(--transition-standard), box-shadow var(--transition-standard);
    }

        .header-icons > a:hover,
        .account-menu-trigger:hover,
        .account-menu.is-open .account-menu-trigger {
            background: #4E342E;
            color: white;
            transform: translateY(-3px);
        }

        .header-icons > a:focus-visible,
        .account-menu-trigger:focus-visible {
            outline: 3px solid rgba(163, 107, 66, .32);
            outline-offset: 4px;
        }

    .header-icons i {
        display: block;
        font-size: 22px;
        line-height: 1;
    }

.account-menu {
    position: relative;
    flex: 0 0 auto;
}

.account-menu-trigger {
    cursor: pointer;
}

.account-menu-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 1100;
    width: min(244px, calc(100vw - 32px));
    padding: 10px;
    border: 1px solid #ECE4DB;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(78, 52, 46, .14);
}

.account-menu-dropdown::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 18px;
    width: 14px;
    height: 14px;
    border-top: 1px solid #ECE4DB;
    border-left: 1px solid #ECE4DB;
    background: #fff;
    transform: rotate(45deg);
}

.account-menu-dropdown[hidden] {
    display: none;
}

.account-menu-header {
    padding: 10px 12px 12px;
    color: #8B5E3C;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.account-menu-dropdown a,
.account-menu-form button {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #4E342E;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-standard), color var(--transition-standard);
}

.account-menu-dropdown a:hover,
.account-menu-dropdown a:focus-visible,
.account-menu-form button:hover,
.account-menu-form button:focus-visible {
    outline: none;
    background: #FAF7F2;
    color: #A36B42;
}

.account-menu-dropdown a:focus-visible,
.account-menu-form button:focus-visible {
    box-shadow: 0 0 0 3px rgba(163, 107, 66, .18);
}

.account-menu-dropdown i {
    width: 18px;
    color: inherit;
    font-size: 16px;
}

.account-menu-divider {
    height: 1px;
    margin: 8px 6px;
    background: #ECE4DB;
}

.account-menu-form {
    margin: 0;
}

.cart-count {
    position: absolute;
    top: 5px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #A36B42;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.wishlist-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    max-width: min(360px, calc(100vw - 44px));
    padding: 14px 18px;
    border-radius: 12px;
    background: #3F2D27;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
}

.wishlist-toast[data-status-tone="error"] {
    background: #853928;
}

.wishlist-toast[hidden] {
    display: none;
}

@media (max-width: 992px) {
    .main-header,
    .site-scrolled .main-header {
        padding: 18px 0;
    }

    .header-wrapper {
        flex-wrap: wrap;
        gap: 18px 24px;
        padding: 0 24px;
    }

    .logo-section { min-width: 0; flex: 1; }
    .logo { font-size: 44px; }
    .search-section { flex: 0 0 100%; order: 3; }
    .search-box { height: 60px; }
}

@media (max-width: 576px) {
    .main-header,
    .site-scrolled .main-header {
        padding: 14px 0;
    }

    .header-wrapper {
        padding: 0 16px;
        gap: 14px 12px;
    }

    .logo { font-size: 38px; }
    .tagline { display: block; font-size: 11px; }
    .header-icons { gap: 8px; }
    .header-icons > a,
    .account-menu-trigger { width: 42px; height: 42px; }
    .header-icons i { font-size: 20px; }
    .account-menu-dropdown {
        right: -44px;
    }
    .search-box { height: 54px; padding: 0 18px; }
    .search-box input { font-size: 14px; }
}

@media (max-width: 390px) {
    .logo { font-size: 34px; }
    .tagline { font-size: 10px; }
    .header-icons > a,
    .account-menu-trigger { width: 38px; height: 38px; }
    .cart-count { top: 2px; right: 1px; }
    .account-menu-dropdown {
        right: -42px;
    }
}
