/* ========================================
   BOOTSTRAP HEADER STYLES
   ======================================== */

/* Site Header */
.site-header {
    position: relative;
    z-index: 1000;
}

/* Navbar Customization */
.navbar {
    padding: 1.5rem 0;
    border-bottom: none;
    background: #ffffff !important;
}

/* Header Content */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Logo Image */
.logo-img {
    height: 60px !important;
    width: auto !important;
    max-width: 200px !important;
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.navbar-brand {
    text-decoration: none;
    padding: 0;
}

.navbar-brand:hover {
    text-decoration: none;
}

/* Navigation Links */
.navbar-nav {
    margin: 0 auto;
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: #333333 !important;
    padding: 0.5rem 1.2rem !important;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link:hover {
    color: #00a76b !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: #00a76b !important;
    border-bottom: 2px solid #00a76b;
    padding-bottom: 0.3rem !important;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f0f8f4;
    border: none;
    border-radius: 50%;
    color: #00a76b;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    position: relative;
}

.action-icon:hover {
    background: #007a52;
    color: #ffffff;
    transform: scale(1.05);
    text-decoration: none;
}

.action-icon i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.action-icon:hover i {
    color: #ffffff;
}

/* Tooltip */
.tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #333333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #ffffff;
}

.action-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

/* Cart Icon */
.cart-icon {
    position: relative;
    display: flex;
}

/* Header Search Dropdown */
.header-search {
    position: absolute;
    right: 0;
    top: 100%;
    background: #ffffff;
    border: 1px solid #e9ecef;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    border-radius: 14px;
    padding: 12px;
    display: none;
    z-index: 1100;
    width: 360px;
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
}
.header-search.active { display: block; opacity: 1; transform: translateY(0) scale(1); }
.header-search-form { display: block; }
.header-search-input-wrap { position: relative; display: flex; align-items: center; }
.header-search-leading { position: absolute; left: 12px; color: #9aa0a6; }
.header-search-input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 10px 44px 10px 36px;
    width: 100%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.header-search-input:focus { outline: none; border-color: #00a76b; }
.header-search-submit {
    background: #00a76b;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    margin-left: 8px;
}

/* Count Badges */
.cart-count,
.wishlist-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4757;
    color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 20px;
    line-height: 1;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.cart-count:empty,
.wishlist-count:empty {
    display: none;
}

/* Dropdown Menus */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    animation: fadeInDown 0.3s ease;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    color: #333;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #00a76b;
    transform: translateX(5px);
}

/* Mobile Toggle Button */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    background: #00a76b;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 167, 107, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

/* ========================================
   MOBILE MENU OVERLAY & PANEL
   ======================================== */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Panel */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-menu-panel.active {
    left: 0;
    z-index: 9999999;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, #00a76b, #007a52);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-logo-img {
    height: 35px;
    filter: brightness(0) invert(1);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Mobile Menu Content */
.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid #e9ecef;
}

.mobile-nav-list li:last-child {
    border-bottom: none;
}

.mobile-nav-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-list a:hover {
    background: #f8f9fa;
    color: #00a76b;
    padding-left: 2rem;
}

/* Mobile Submenu */
.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu.active {
    max-height: 500px;
}

.mobile-submenu li {
    border-bottom: 1px solid #e9ecef;
}

.mobile-submenu a {
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    font-size: 0.9rem;
    color: #666;
}

.mobile-submenu a:hover {
    background: #e9ecef;
    color: #00a76b;
}

/* Mobile Arrow */
.mobile-arrow {
    transition: transform 0.3s ease;
}

.mobile-nav-list .menu-item-has-children.active .mobile-arrow {
    transform: rotate(180deg);
}

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

/* Desktop - Hide mobile elements */
@media (min-width: 992px) {
    .mobile-menu-overlay,
    .mobile-menu-panel {
        display: none !important;
    }
    
    .navbar-toggler {
        display: none !important;
    }
}

/* Mobile - Show mobile elements */
@media (max-width: 991px) {
    .navbar-collapse {
        display: none !important;
    }
    
    .navbar-toggler {
        display: block !important;
    }
    
    .header-actions {
        display: none !important;
    }
    
    .navbar-nav {
        margin: 0;
    }
    
    .header-content {
        padding: 0 0.5rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ========================================
   BODY SCROLL LOCK
   ======================================== */

body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-primary-green {
    color: #00a76b !important;
}

.bg-primary-green {
    background-color: #00a76b !important;
}

.border-primary-green {
    border-color: #00a76b !important;
}

/* ========================================
   CUSTOM DROPDOWN STYLES
   ======================================== */

.dropdown-toggle::after {
    margin-left: 0.5rem;
    vertical-align: 0.15em;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.navbar-nav .nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid #00a76b;
    outline-offset: 2px;
}

.mobile-nav-list a:focus {
    outline: 2px solid #00a76b;
    outline-offset: -2px;
}

/* ========================================
   NAVBAR SCROLL EFFECT
   ======================================== */

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .mobile-menu-overlay,
    .mobile-menu-panel,
    .navbar-toggler {
        display: none !important;
    }
}
