/* =========================
   HEADER
========================= */
@font-face {
    font-family: "Poppins";
    src: url("../fonts/Poppins-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/Poppins-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/Poppins-LightItalic.ttf") format("truetype");
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/Poppins-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/Poppins-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/Poppins-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}


* {
    font-family: "poppins";
}

.site-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: #ffffff;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px 70px;
    box-sizing: border-box;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 35px;
}

.header-logo {
    display: block;
}

.header-logo img {
    display: block;
    width: auto;
    height: 41px;
}

/* =========================
   NAVIGATION
========================= */

.header-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-menu>li {
    position: relative;
}

.header-menu>li>a {
    display: block;
    padding: 10px 12px;
    color: #000000;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.header-menu>li>a:hover {
    color: #b88e2f;
}

.dropdown-arrow {
    margin-left: 4px;
    font-size: 12px;
}

/* Shop dropdown */
.shop-menu-item {
    position: relative;
}

.shop-dropdown {
    position: absolute;
    top: 100%;
    left: -100px;
    width: 620px;
    max-height: 600px;
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

.shop-menu-item:hover .shop-dropdown,
.shop-menu-item:focus-within .shop-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown heading */
.shop-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eeeeee;
}

.shop-dropdown-header h3 {
    margin: 0;
    color: #333333;
    font-size: 20px;
    font-weight: 600;
}

.shop-view-all {
    color: #b88e2f;
    font-size: 13px;
    text-decoration: none;
}

.shop-view-all:hover {
    text-decoration: underline;
}

/* Parent category panels */
.shop-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.shop-category-panel {
    min-width: 0;
    padding: 14px;
    background: #fcf8f3;
    border: 1px solid #f0e6d5;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Parent category: larger and bold */
.shop-parent-category {
    display: block;
    margin-bottom: 10px;
    color: #333333;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.shop-parent-category:hover {
    color: #b88e2f;
}

/* Child category links */
.shop-child-categories {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-left: 10px;
    border-left: 2px solid #e7d5b5;
}

.shop-child-category {
    display: block;
    color: #666666;
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.shop-child-category:hover {
    color: #b88e2f;
}

/* Smaller screens */
@media (max-width: 760px) {
    .shop-dropdown {
        left: -80px;
        width: min(620px, calc(100vw - 30px));
        max-height: 70vh;
    }

    .shop-category-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   HEADER ICONS
========================= */

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

.header-right>a,
.cart-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 32px;
}

.header-right img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* =========================
   CART DROPDOWN
========================= */

.cart-menu-item {
    position: relative;
}

.cart-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: -12px;
    width: 360px;
    padding: 0;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

/* Invisible bridge prevents the dropdown closing while moving the mouse */
.cart-dropdown::before {
    content: "";
    position: absolute;
    top: -13px;
    right: 0;
    width: 100%;
    height: 14px;
}

.cart-menu-item:hover .cart-dropdown,
.cart-menu-item:focus-within .cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eeeeee;
}

.cart-dropdown-header h3 {
    margin: 0;
    color: #333333;
    font-size: 18px;
    font-weight: 600;
}

.cart-item-count {
    color: #888888;
    font-size: 12px;
}

/* Cart products */

.cart-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f2f2f2;
}

.cart-product-image {
    flex-shrink: 0;
    width: 65px;
    height: 65px;
    border-radius: 5px;
    background: #fcf8f3;
    object-fit: cover;
}

.cart-product-info {
    flex: 1;
    min-width: 0;
}

.cart-product-name {
    margin: 0 0 8px;
    color: #333333;
    font-size: 14px;
    font-weight: 500;
}

.cart-product-detail {
    margin: 0;
    color: #888888;
    font-size: 12px;
}

.cart-product-detail span {
    color: #b88e2f;
    font-weight: 500;
}

.cart-remove {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f5f5f5;
    color: #777777;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.cart-remove:hover {
    background: #eeeeee;
    color: #333333;
}

/* Cart footer */

.cart-dropdown-footer {
    padding: 18px 20px 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.cart-total span {
    color: #777777;
    font-size: 14px;
}

.cart-total strong {
    color: #b88e2f;
    font-size: 16px;
    font-weight: 600;
}

.cart-footer-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.cart-view-button,
.cart-checkout-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid #b88e2f;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.cart-view-button {
    background: #ffffff;
    color: #b88e2f;
}

.cart-view-button:hover {
    background: #fcf8f3;
}

.cart-checkout-button {
    background: #b88e2f;
    color: #ffffff;
}

.cart-checkout-button:hover {
    background: #a47b25;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
    .header-container {
        padding: 24px 30px;
    }

    .header-top {
        gap: 20px;
    }

    .header-menu {
        gap: 10px;
    }

    .header-right {
        gap: 18px;
    }
}

@media (max-width: 760px) {
    .header-container {
        padding: 18px 20px;
    }

    .header-top {
        flex-wrap: wrap;
    }

    .header-center {
        order: 3;
        width: 100%;
    }

    .header-menu {
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-right {
        gap: 16px;
    }

    .cart-dropdown {
        right: -5px;
        width: min(360px, calc(100vw - 30px));
    }

    .shop-dropdown {
        width: 220px;
    }
}

.site-header a,
.dropdown-menu a,
.dropdown-item {
    cursor: pointer;
}

.dropdown-menu,
.dropdown-menu li,
.dropdown-menu a {
    pointer-events: auto;
}

.dropdown-menu {
    z-index: 9999;
}

/* Account dropdown */
.account-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.account-dropdown .account-icon {
    display: flex;
    align-items: center;
}

.account-dropdown .account-icon img {
    display: block;
    width: 28px;
    height: 28px;
}

.account-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: -15px;

    min-width: 200px;
    padding: 8px 0;

    background-color: #FFFFFF;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);

    display: flex;
    flex-direction: column;

    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;

    z-index: 1000;
}

/* Show dropdown on hover or keyboard focus */
.account-dropdown:hover .account-dropdown-menu,
.account-dropdown:focus-within .account-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown-menu a {
    display: block;
    padding: 10px 16px;

    color: #333333;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.account-dropdown-menu a:hover {
    background-color: #F9F1E7;
    color: #B88E2F;
}

/* User avatar */
.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    border-radius: 50%;

    background-color: #B88E2F;
    color: #FFFFFF;

    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;

    cursor: pointer;
}

/* Account icon alignment */
.account-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Dropdown greeting */
.dropdown-user-name {
    display: block;
    padding: 10px 16px;
    font-weight: 600;
    color: #333;
}

/* Logout form */
.account-dropdown-menu form {
    margin: 0;
}

.account-dropdown-menu form button {
    width: 100%;
    font-size: 16;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
}

.account-dropdown-menu form button :hover {
    background-color: #b88e2f;
}

.cart-notification {
    position: fixed;
    top: 90px;
    right: 30px;
    z-index: 9999;

    padding: 16px 24px;

    background: #ffffff;
    color: #333333;

    border-left: 4px solid #B88E2F;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);

    font-size: 14px;

    animation: notificationSlide 0.3s ease;
}

.cart-notification span {
    color: #B88E2F;
    font-weight: bold;
    margin-right: 8px;
}

@keyframes notificationSlide {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   EMPTY CART DROPDOWN
========================================== */

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 35px 15px 30px;

    text-align: center;
}

.cart-empty-icon {
    width: 65px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 16px;

    border-radius: 50%;

    background: #F9F5ED;
    color: #B88E2F;

    font-size: 25px;
}

.cart-empty h4 {
    margin: 0 0 8px;

    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.cart-empty p {
    max-width: 230px;

    margin: 0 0 20px;

    color: #999;
    font-size: 12px;
    line-height: 1.6;
}

.cart-empty-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 11px 22px;

    background: #B88E2F;
    color: white;

    text-decoration: none;
    font-size: 12px;
    font-weight: 600;

    transition: background 0.2s ease;
}

.cart-empty-button:hover {
    background: #A47D26;
    color: white;
}

.cart-empty-button i {
    font-size: 11px;
}
/* Show cart dropdown after adding a product */
.cart-dropdown-show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}
