/* Header New Design CSS */
/* Global font family for all text elements */
* {
    font-family: 'IBM Plex Sans', sans-serif !important;
}

:root {
    --primary-green: #3BB54A;
    --dark-green: #388103;
    --light-green: #e8f6ea;
    --text-dark: #404040;
    --text-light: #686868;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Top Banner */
.top-banner {
    background-color:#16A249;
    padding: 4px 0;
    border-bottom: 1px solid #2a8a3a;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    display: block !important;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.delivery-info i {
    font-size: 16px;
}

/* Ensure banner shows on all devices */
@media (max-width: 767px) {
    .top-banner {
        padding: 2px 0;
    }
    
    .delivery-info {
        font-size: 12px;
    }
    
    .delivery-info i {
        font-size: 14px;
    }
}

/* Main Header Section */
.header-main {
    background-color: #ffffff;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
    margin-top: 40px; /* Add margin to account for fixed banner */
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Logo Section */
.header-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.header-logo img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.header-logo:hover img {
    transform: scale(1.05);
}

/* Search Bar Section */
.header-search {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
    position: relative;
}

.header-search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.header-search-input {
    width: 100%;
    padding: 12px 18px 12px 32px;
    /* border: 2px solid var(--primary-green); */
    border-radius: 7px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background-color: var(--white);
    color: var(--text-dark);
}

.header-search-input:focus {
    border-color: var(--dark-green);
    box-shadow: 0 0 0 3px rgba(59, 181, 74, 0.1);
}

.header-search-input::placeholder {
    color: var(--text-light);
}

.header-search-button {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 20px;
    height: 20px;
    z-index: 10;
}

.header-search-button:hover {
    color: var(--primary-green);
    transform: translateY(-50%) scale(1.1);
}

.header-search-button i {
    font-size: 16px;
}

/* User Actions Section */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Auth Buttons - Login/Register in same row */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 80px;
}

/* Fix for user dropdown alignment */
.action-item .drop-hover {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 80px;
}

.action-item:hover {
    color: var(--primary-green);
    background-color: var(--light-green);
    transform: translateY(-2px);
}

.action-item .drop-hover:hover {
    color: var(--primary-green);
    background-color: var(--light-green);
    transform: translateY(-2px);
}

.action-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.action-item:hover .action-icon {
    transform: scale(1.1);
}

.action-item .drop-hover:hover .action-icon {
    transform: scale(1.1);
}

.action-text {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-green);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    min-width: 20px;
}

.cart-item {
    position: relative;
}

/* Navigation Bar */
.header-nav {
    background-color: #D6F5D6;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-categories {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.nav-category {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-category:hover {
    background-color: rgba(59, 181, 74, 0.1);
    transform: translateY(-1px);
    color: var(--primary-green);
}

.nav-category.active {
    background-color: rgba(59, 181, 74, 0.2);
    color: var(--primary-green);
}

.nav-gst {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .header-main .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-search {
        margin: 0;
        max-width: 100%;
    }
    
    .header-actions {
        gap: 15px;
    }
    
    .auth-buttons {
        gap: 10px;
    }
    
    .nav-categories {
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .nav-category {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 767px) {
    .header-main {
        padding: 10px 0;
        margin-top: 50px; /* Increase margin for mobile to prevent overlap */
    }
    
    .header-logo img {
        height: 50px;
    }
    
    .search-input {
        padding: 10px 40px 10px 12px;
        font-size: 13px;
    }
    
    .search-button {
        width: 30px;
        height: 30px;
    }
    
    .action-item {
        min-width: 60px;
        padding: 6px 8px;
    }
    
    .action-item .drop-hover {
        min-width: 60px;
        padding: 6px 8px;
    }
    
    .action-text {
        font-size: 11px;
    }
    
    .nav-categories {
        gap: 10px;
    }
    
    .nav-category {
        font-size: 11px;
        padding: 5px 8px;
    }
    
    .nav-gst {
        font-size: 12px;
    }
}

@media (max-width: 575px) {
    .header-main {
        margin-top: 55px; /* Further increase margin for very small screens */
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .auth-buttons {
        gap: 8px;
    }
    
    .action-item {
        min-width: 50px;
        padding: 4px 6px;
    }
    
    .action-item .drop-hover {
        min-width: 50px;
        padding: 4px 6px;
    }
    
    .action-icon {
        width: 20px;
        height: 20px;
    }
    
    .action-text {
        font-size: 10px;
    }
    
    .nav-categories {
        gap: 8px;
    }
    
    .nav-category {
        font-size: 10px;
        padding: 4px 6px;
    }
   .header-wrap{
      margin-top:7%;
   }
}

@media (max-width: 480px) {
    .header-main {
        margin-top: 60px; /* Maximum margin for very small screens */
    }
    
    .top-banner {
        padding: 2px 0; /* Slightly increase banner padding for better visibility */
    }
    
    .delivery-info {
        font-size: 11px;
    }
    
    .header-logo img {
        height: 45px; /* Smaller logo for very small screens */
    }
    
    .header-search-input {
        padding: 10px 16px 10px 28px;
        font-size: 13px;
    }
    
    .action-item {
        min-width: 45px;
        padding: 3px 5px;
    }
    
    .action-text {
        font-size: 9px;
    }
}

@media (max-width: 375px) {
    .header-main {
        margin-top: 65px; /* Extra margin for very small screens */
    }
    
    .top-banner {
        padding: 10px 0;
    }
    
    .delivery-info {
        font-size: 10px;
    }
    
    .header-logo img {
        height: 40px;
    }
    
    .header-search-input {
        padding: 8px 14px 8px 24px;
        font-size: 12px;
    }
    
    .action-item {
        min-width: 40px;
        padding: 2px 4px;
    }
    
    .action-text {
        font-size: 8px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Hover Effects */
.action-item:hover {
    box-shadow: var(--shadow);
}

.nav-category:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--primary-green);
    border-radius: 1px;
}

/* Focus States */
.search-input:focus {
    border-color: var(--dark-green);
}

.action-item:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

.nav-category:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
} 