:root {
    --primary: #79C900;
    --primary-hover: #72bd02;
    --primary-soft: #f1ffe0;

    --bg-main: #f8fafc;
    --bg-header: antiquewhite;
    --bg-white: #ffffff;

    --bg-soft: #f3f4f6;
    --bg-muted: #eeeeee;
    --bg-hover-soft: #f4f6f8;
    --bg-hover-light: #f1f5f9;

    --text-main: #1e293b;
    --text-dark: #222222;
    --text-soft: #64748b;
    --text-muted: #94a3b8;
    --text-light: #999999;
    --text-desc: #444444;

    --text-danger: #e53935;
    --text-success: #16a34a;
    --border-light: #e2e8f0;
    --border-soft: #eeeeee;
    --shadow-soft: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.2);
    --overlay-dark: rgba(0, 0, 0, 0.45);
    --cart-green: #1f7a4d;

}

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

html,
body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-main);
}

.header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    width: 100%;
    padding: 12px 24px;
    background-color: var(--bg-header);
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo img {
    height: 60px;
}

.header-actions a {
    color: #2563eb;
    font-weight: 500;
    transition: color 0.2s ease;
}

.header-actions a:visited {
    color: #2563eb;
}

.header-actions a:hover {
    color: #1d4ed8;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 18px;
}

.btn-cart {
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 600;
    background-color: var(--primary);
}

.icon-cart {
    width: 22px;
    height: 22px;
}

.btn-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-cart:active {
    transform: scale(0.95);
}

.btn-cart .cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-self: center;
    flex: 1;
    max-width: 600px;
    height: 50px;
    margin: 0 auto;

    background: var(--bg-white);
    border-radius: 999px;
    border: 2px solid var(--border-light);
    transition: border-color 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 6px rgba(121, 201, 0, 0.2);
}

.search-box input {
    flex: 1;
    height: 100%;
    padding: 0 60px 0 22px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    right: 18px;
    color: var(--primary);
    font-size: 20px;
    pointer-events: none;
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-header);
    margin-left: auto;
}

.language-select {
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    cursor: pointer;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.language-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(121, 201, 0, 0.2);
}

.client-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.client-user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 13px;
}

.client-user-name {
    font-weight: 600;
    color: var(--text-main);
}

.client-user-role {
    font-size: 12px;
    color: var(--text-soft);
}

.client-user-avatar-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.client-user-avatar-btn:hover {
    transform: scale(1.05);
}

.client-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.client-user-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 14px;
    min-width: 210px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
}

.client-user-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.client-user-menu-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.client-user-menu-list li:hover {
    background: var(--bg-hover-soft);
    color: var(--primary);
}

.client-user-menu-list hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 6px 0;
}

.client-user-menu-list .logout {
    color: var(--text-danger);
    font-weight: 600;
}

.dropdown-section {
    border-top: 1px solid #ddd;
    padding-top: 14px;
}

.dropdown-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 6px;
    color: #555;
}

.hidden {
    display: none !important;
}

.cart {
    background-color: var(--cart-green);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

@media (max-width: 1024px) {

    .header {
        padding: 10px 20px;
        gap: 16px;
    }

    .logo img {
        height: 52px;
    }

    .search-box {
        max-width: 420px;
        height: 46px;
    }

    .client-header-right {
        gap: 14px;
    }
}

@media (max-width: 810px) {

    .desktop-auth {
        display: none;
    }

    .language-select {
        width: 100%;
        padding: 8px 12px;
        border-radius: 999px;
        border: 1px solid var(--border-light);
        background: var(--bg-white);
        transition: border 0.2s ease, box-shadow 0.2s ease;
        font-weight: 500;
    }

    #languageGuest {
        display: none;
    }

    .guest-menu {
        position: relative;
    }

    .guest-btn {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: black;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease, transform 0.1s ease;
    }

    .guest-btn:hover {
        background: var(--primary-hover);
        transform: scale(1.05);
    }

    .guest-dropdown {
        position: absolute;
        top: 60px;
        right: 0;
        background: #f5f5f5;
        border-radius: 20px;
        padding: 20px;
        width: 240px;
        display: none;
        flex-direction: column;
        gap: 14px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
        z-index: 2000;
    }

    .guest-dropdown.active {
        display: flex;
    }

    .guest-dropdown a {
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        color: #222;
        padding: 8px 0;
    }

    .guest-dropdown a:hover {
        background: var(--bg-hover-soft);
        color: var(--primary);
    }

    .guest-dropdown .dropdown-section {
        border-top: 1px solid var(--border-light);
        padding-top: 10px;
        margin-top: 5px;
    }
}

@media (min-width: 811px) {
    .guest-menu {
        display: none;
    }
}

@media (max-width: 768px) {

    .header {
        padding: 8px 14px;
        gap: 10px;
    }

    .logo img {
        height: 42px;
    }

    .search-box {
        flex: 1;
        max-width: 220px;
        height: 38px;
        margin: 0;
    }

    .search-box input {
        font-size: 14px;
        padding: 0 40px 0 14px;
    }

    .search-icon {
        right: 12px;
        font-size: 16px;
    }

    .header-actions>.language-select {
        display: none;
    }

    .client-user-avatar {
        width: 36px;
        height: 36px;
    }

    .header-actions {
        gap: 10px;
    }

    .btn-cart {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {

    .logo img {
        height: 36px;
    }

    .search-box {
        max-width: 150px;
        height: 34px;
    }

    .search-box input {
        font-size: 13px;
    }

    .client-user-info {
        display: none;
    }

    .btn-cart {
        padding: 6px 10px;
    }
}