/* header.css - Top bar + main header (without mini cart) */

/* ========================
   Top Bar Styles
   ======================== */
.top-bar {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.8rem;
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.top-info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.top-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.top-info i,
.top-bar i {
    font-style: normal;
    font-weight: 500;
}
.icon-phone::before {
    content: "📞 ";
}
.icon-location::before {
    content: "📍 ";
}

/* ========================
   Glass Header Container
   ======================== */
.glass-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Main Header Row - Single Row Layout */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 24px;
    flex-wrap: nowrap;
}

/* Logo */
.logo {
    flex-shrink: 0;
}
.logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

/* Desktop Navigation Wrapper */
.desktop-nav-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-left: 20px;
}

/* Navigation Menu Styles */
.nav-menu {
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    width: auto;
}
.nav-menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.nav-menu li {
    position: relative;
}
.nav-menu a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2a0e;
    transition: 0.2s;
    border-radius: 40px;
}
.nav-menu a:hover {
    background: #8dc04430;
    color: #2b4712;
}

/* Dropdown Menus */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    min-width: 220px;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
    z-index: 1001;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.nav-menu li:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
}
.dropdown-menu li {
    width: 100%;
}
.dropdown-menu a {
    padding: 5px 10px;
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}
.dropdown-menu .dropdown-menu {
    top: 0;
    left: 104%;
}

/* Header Actions (Search Icon wrapper - cart is separate) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Search Toggle Button */
.search-toggle {
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.2s ease;
    /*backdrop-filter: blur(4px);*/
    color: var(--accent-collor);
}
.search-toggle:hover {
    background: rgba(141, 192, 68, 0.2);
}
.search-toggle:focus-visible {
    outline: 2px solid #8dc044;
    outline-offset: 2px;
}

/* Collapsible Search Container */
.header-search-container {
    padding: 0 24px 16px 24px;
    animation: slideDown 0.25s ease-out;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.search-wrapper {
    max-width: 600px;
    margin: 0 auto;
}
.search-container {
    position: relative;
    width: 100%;
}
.search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}
.search-form:focus-within {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(141, 192, 68, 0.5);
    box-shadow: 0 0 0 2px rgba(141, 192, 68, 0.1);
}
.search-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
    color: #1e2a0e;
}
.search-form button {
    background: #8dc044;
    border: none;
    padding: 0 24px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    transition: 0.2s;
}

/* Search results dropdown (already in header) */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 500px;
    overflow: hidden;
    animation: fadeInDown 0.2s ease;
}
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
    color: #1e2a0e;
    font-size: 0.85rem;
}
.close-results {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #999;
    transition: color 0.2s;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.close-results:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #e74c3c;
}
.search-results-content {
    max-height: 450px;
    overflow-y: auto;
    padding: 8px 0;
}
.search-results-content::-webkit-scrollbar {
    width: 4px;
}
.search-results-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}
.search-results-content::-webkit-scrollbar-thumb {
    background: #8dc044;
    border-radius: 10px;
}
.search-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 0.9rem;
}
.search-no-results {
    text-align: center;
    padding: 40px 20px;
}
.no-results-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}
.search-no-results p {
    color: #666;
    margin-bottom: 15px;
}
.search-section {
    margin-bottom: 15px;
}
.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(141, 192, 68, 0.1);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8dc044;
}
.category-item-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.category-item-result:hover {
    background: rgba(141, 192, 68, 0.08);
}
.category-info {
    flex: 1;
}
.category-name {
    font-weight: 600;
    color: #1e2a0e;
    margin-bottom: 2px;
}
.category-count {
    font-size: 0.7rem;
    color: #8dc044;
}
.product-item-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.product-item-result:hover {
    background: rgba(141, 192, 68, 0.08);
}
.product-image {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-info {
    flex: 1;
}
.product-title {
    font-weight: 600;
    color: #1e2a0e;
    margin-bottom: 4px;
    font-size: 0.9rem;
}
.product-price {
    font-size: 0.8rem;
    color: #8dc044;
    font-weight: 600;
}
.view-all-link {
    display: block;
    text-align: center;
    padding: 12px;
    background: rgba(141, 192, 68, 0.1);
    color: #8dc044;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.view-all-link:hover {
    background: rgba(141, 192, 68, 0.2);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    /*backdrop-filter: blur(4px);*/
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;

    svg {
        height: 26px;
        width: 26px;
    }
}
.mobile-menu-toggle:hover {
    background: rgba(141, 192, 68, 0.2);
}

/* Mobile Slide Menu */
.mobile-slide-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 360px;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: left 0.3s ease;
    padding: 24px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.mobile-slide-menu.open {
    left: 0;
}
.mobile-menu-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.close-mobile-menu {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;

    svg {
        height: 32px;
        width: 32px;
        color: #2b4712;
    }
}
.close-mobile-menu:hover {
    background: rgba(0, 0, 0, 0.05);
}
.mobile-logo {
    text-align: center;
}
.mobile-logo img {
    max-height: 40px;
    width: auto;
}
.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-menu-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.mobile-menu-list a {
    display: block;
    padding: 14px 0;
    text-decoration: none;
    font-weight: 600;
    color: #1f2a0e;
}
.mobile-dropdown-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 14px 0;
    font-weight: 600;
    color: #1f2a0e;

    .icon-chevron-right {
        transition: transform 0.3s ease;
    }
}
.mobile-submenu {
    list-style: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.mobile-submenu.open {
    max-height: 1500px;
}
.mobile-submenu li a {
    padding: 10px 0;
    font-size: 0.9rem;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1999;
    visibility: hidden;
    opacity: 0;
    transition: 0.2s;
}
.overlay.active {
    visibility: visible;
    opacity: 1;
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 992px) {
    .desktop-nav-wrapper {
        margin-left: 10px;
    }
    .nav-menu a {
        padding: 8px 12px;
        font-size: 1rem;
    }
}
@media (max-width: 768px) {
    .desktop-nav-wrapper {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .logo {
        margin: 0 auto;
    }
    .main-header {
        gap: 12px;
        padding: 10px 16px;
    }
    .header-actions {
        gap: 8px;
    }
    .search-toggle {
        width: 40px;
        height: 40px;
    }
    .header-search-container {
        padding: 0 16px 12px 16px;
    }
    .search-wrapper {
        max-width: 100%;
    }
    .search-form input {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    .top-bar {
        padding: 8px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
@media (max-width: 576px) {
    .main-header {
        gap: 8px;
    }
    .logo img {
        max-height: 40px;
    }
    .mobile-slide-menu {
        width: 85%;
    }
}

/* Accessibility Focus */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid #8dc044;
    outline-offset: 2px;
}
