/* components/header_shopping/css/desktop_header.css */

/* Global Settings */
:root {
    --sh-header-bg: #ffffff;
    --sh-text-color: #305724;
    --sh-hover-color: #ec6602;
    /* Primary Brand Color */
    --sh-dropdown-bg: #ffffff;
    --sh-border-color: #f1f1f1;
    --sh-ticker-bg: #000000;
    --sh-ticker-text: #ffffff;
}

/* Ticker overrides */
.marquee {
    background-color: var(--sh-ticker-bg) !important;
    color: var(--sh-ticker-text) !important;
    font-size: 13px;
}

/* Header Outer Container */
.sh-header-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--sh-header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1050;
}

/* Header Inner Layout */
.sh-header-container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px 5px 30px;
}

/* Desktop Logo Container (Center) */
.sh-logo-wrapper {
    display: flex;
    justify-content: center;
}

.sh-logo-wrapper img {
    height: 60px;
    width: auto;
    display: block;
}

/* Main Navigation (Left) */
.sh-nav-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.sh-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 30px;
}

/* Individual Nav Item */
.sh-nav-item {
    position: relative;
}

.sh-nav-link {
    color: var(--sh-text-color);
    font-weight: 500;

    text-decoration: none;
    padding: 10px 0;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.sh-nav-link:hover {
    color: var(--sh-hover-color);
    text-decoration: none;
}

.sh-icons-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.sh-cart-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: var(--sh-text-color);
    position: relative;
    cursor: pointer;
    transition:
        background-color 0.2s,
        transform 0.2s,
        color 0.2s;
}

.sh-cart-icon-btn:hover {
    background-color: #e0e0e0;
    color: var(--sh-hover-color);
    transform: scale(1.05);
}

.sh-cart-count-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--sh-hover-color);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ========================================= */
/* LOUK LAYOUT: logo left, menu, right search/profile/cart */
/* ========================================= */

/* Add spacing between left logo and menu */
.sh-louk-icons {
    flex: 0 0 auto;
}

/* Gap between left logo and menu (LOUK) */
.sh-header-container .sh-logo-wrapper.d-md-block + .sh-nav-wrapper {
    margin-left: 40px;
}

.sh-search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 30px;
    padding: 2px 4px 2px 14px;
    min-width: 380px;
}

.sh-search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    flex: 1;
    padding: 6px 4px;
}

.sh-search-btn {
    border: none;
    background: var(--sh-hover-color);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sh-search-btn:hover {
    background: #d35400;
}

/* Live search dropdown */
.sh-search-wrap {
    position: relative;
}

.sh-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 420px;
    overflow-y: auto;
    z-index: 1100;
    display: none;
    padding: 6px;
}

.sh-search-dropdown.is-open {
    display: block;
}

.sh-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #222;
    transition: background 0.15s;
}

.sh-search-item:hover {
    background: #f5f5f5;
    text-decoration: none;
    color: #222;
}

.sh-search-item-img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 6px;
    background: #f1f1f1;
    flex: 0 0 auto;
}

.sh-search-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sh-search-item-name {
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sh-search-item-price {
    font-size: 13px;
    color: var(--sh-hover-color);
    font-weight: 600;
}

.sh-search-item-price.sold {
    color: #999;
    font-weight: 500;
}

.sh-search-empty {
    padding: 18px 12px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.sh-search-all {
    display: block;
    padding: 10px 12px;
    margin-top: 4px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--sh-text-color);
    text-decoration: none;
}

.sh-search-all:hover {
    color: var(--sh-hover-color);
    text-decoration: none;
}

@media (max-width: 991px) {
    .sh-search-form {
        display: none;
    }
}

/* ========================================= */
/* SIMPLE DROPDOWN STYLES                    */
/* ========================================= */

.sh-has-dropdown {
    position: relative;
}

.sh-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--sh-dropdown-bg);
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Softer native-like shadow */
    list-style: none;
    margin: 0;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.15s ease,
        visibility 0.15s ease;
    border-radius: 0;
    border: 1px solid var(--sh-border-color);
    z-index: 1010;
}

.sh-has-dropdown:hover > .sh-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.sh-dropdown-item {
    position: relative;
}

.sh-dropdown-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: var(--sh-text-color);
    font-size: 14px;
    text-decoration: none;
    transition:
        background-color 0.2s,
        color 0.2s;
}

.sh-dropdown-link:hover {
    background-color: #f9f9f9;
    color: var(--sh-hover-color);
    text-decoration: none;
}

.sh-sub-icon {
    font-size: 10px;
    color: #999;
}

/* Nested (Level 3) Sub-Dropdown */
.sh-has-sub-dropdown {
    position: relative;
    /* required for positioning the child */
}

.sh-sub-dropdown-menu {
    position: absolute;
    top: -1px;
    /* aligns smoothly with top edge */
    left: 100%;
    background-color: var(--sh-dropdown-bg);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    list-style: none;
    margin: 0;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.15s ease,
        visibility 0.15s ease;
    border-radius: 0;
    border: 1px solid var(--sh-border-color);
    z-index: 1020;
}

.sh-has-sub-dropdown:hover > .sh-sub-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

/* Responsive Layout Handles */
@media (max-width: 991px) {
    .sh-header-container {
        padding: 10px 15px;
    }

    .mob-header {
        width: 100%;
    }

    .mob-cart-icon {
        flex: 1;
        text-align: right;
    }

    /* We hide desktop navs completely via Bootstrap classes "d-none d-md-block" etc. handled in HTML */
}
