/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    --header-height: 70px; /* set this to your header's actual height */
    margin-bottom: calc(100vh - var(--header-height));
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(51, 17, 17, 0.1);
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #8B4513;
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: url('../images/homeImg/logo.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nav links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #4e3b3b;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: #8B4513;
}

/* Right side (search, wishlist, cart) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search-input {
    padding: 10px 40px 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    width: 300px;
    transition: border-color 0.3s ease;
}

.nav-search-input:focus {
    outline: none;
    border-color: #8B4513;
}

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    z-index: 2000;
    display: none;
    max-height: 320px;
    overflow-y: auto;
    min-width: 400px;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.autocomplete-item:hover {
    background: #f7f2ec;
    color: #8B4513;
}

.autocomplete-item .product-name {
    font-weight: 600;
    font-size: 13px;
}

.autocomplete-item .product-tags {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #718096;
}

.autocomplete-item .product-subcategory,
.autocomplete-item .product-category {
    padding: 4px 8px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.autocomplete-no-results {
    padding: 12px 14px;
    color: #666;
    font-size: 13px;
}

.nav-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #B26B23;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-search-btn:hover {
    background: #A0522D;
}

/* Icons */
.bell-icon,
.cart-icon {
    font-size: 18px;
    color: #B26B23;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.bell-icon:hover,
.cart-icon:hover {
    color: #8B4513;
    background: rgba(139, 69, 19, 0.1);
}

.login-btn {
    background: linear-gradient(135deg, #D2691E, #8B4513);
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(210, 105, 30, 0.4);
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
}

.login-btn span {
    font-weight: 500;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-icon {
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.cart-user {
    font-size: 18px;
    color: #B26B23;
} 

/* // This was the merege conflic caused ( delete if ncry) */
 .notification-icon {
    position: relative;
    cursor: pointer;
    font-size:25px;
}

.user-icon:hover {
    background: rgba(139, 69, 19, 0.1);
}

.user-icon:hover .cart-user {
    color: #8B4513;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
    border: 1px solid #f0f0f0;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px 12px 0 0;
}

.dropdown-greeting {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.dropdown-subtitle {
    font-size: 13px;
    color: #666;
}

.dropdown-items {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(139, 69, 19, 0.05);
    color: #8B4513;
}

.dropdown-item i {
    width: 16px;
    font-size: 14px;
    color: #888;
    transition: color 0.2s ease;
}

.dropdown-item:hover i {
    color: #8B4513;
}

.dropdown-separator {
    background: #f0f0f0;
    margin: 8px 0;
}

.sign-out {
    color: #dc3545 !important;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
    padding-top: 16px !important;
}

.sign-out:hover {
    background: rgba(220, 53, 69, 0.05) !important;
    color: #dc3545 !important;
}

.sign-out i {
    color: #dc3545 !important;
}

.sign-out:hover i {
    color: #dc3545 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .dropdown-menu {
        min-width: 260px;
        right: -10px;
    }
    
    .nav-search-input {
        width: 180px;
    }
}

/* Notification Styling */
.notification-container {
    position: relative;
}

.notification-btn {
    position: relative;
    background: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
}
.notification_title_num {
    color: #8B4513;
}


.notification-btn i {
    font-size: 1.1rem;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Notification Dropdown */
.notification-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    min-width: 400px;
    max-width: 450px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.notification-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Notification Items */
.notification-items {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #c4b5a4 transparent;
}

.notification-items::-webkit-scrollbar {
    width: 8px;
}

.notification-items::-webkit-scrollbar-track {
    background: #f9f5f0;
    border-radius: 4px;
}

.notification-items::-webkit-scrollbar-thumb {
    background: #c4b5a4;
    border-radius: 4px;
    border: 2px solid #f9f5f0;
}

.notification-items::-webkit-scrollbar-thumb:hover {
    background: #a89279;
}

.notification-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border: none;
}

.notification-item-link:hover {
    text-decoration: none;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f9fafb;
    padding-left: 18px;
}

.notification-item.unread {
    background: linear-gradient(90deg, #fff8f0 0%, #ffffff 100%);
}

.notification-item.unread:hover {
    background: linear-gradient(90deg, #feeae0 0%, #f8fafb 100%);
}

/* Delivered - green */
.notification-item.unread[data-type="delivered"] {
    background: linear-gradient(90deg, #ecfdf5 0%, #ffffff 100%);
}
.notification-item.unread[data-type="delivered"]:hover {
    background: linear-gradient(90deg, #d1fae5 0%, #f8fafb 100%);
}

/* Out for delivery - amber */
.notification-item.unread[data-type="out for delivery"] {
    background: linear-gradient(90deg, #fffbeb 0%, #ffffff 100%);
}
.notification-item.unread[data-type="out for delivery"]:hover {
    background: linear-gradient(90deg, #fef3c7 0%, #f8fafb 100%);
}

/* Rate product - purple */
.notification-item.unread[data-type="rate_product"] {
    background: linear-gradient(90deg, #f5f3ff 0%, #ffffff 100%);
}
.notification-item.unread[data-type="rate_product"]:hover {
    background: linear-gradient(90deg, #ede9fe 0%, #f8fafb 100%);
}

/* Rate courier - sky blue */
.notification-item.unread[data-type="rate_courier"] {
    background: linear-gradient(90deg, #f0f9ff 0%, #ffffff 100%);
}
.notification-item.unread[data-type="rate_courier"]:hover {
    background: linear-gradient(90deg, #e0f2fe 0%, #f8fafb 100%);
}

/* Admin notification - red */
.notification-item.unread[data-type="admin"] {
    background: linear-gradient(90deg, #fef2f2 0%, #ffffff 100%);
}
.notification-item.unread[data-type="admin"]:hover {
    background: linear-gradient(90deg, #fee2e2 0%, #f8fafb 100%);
}

/* Rate supplier - orange */
.notification-item.unread[data-type="rate_and_review"] {
    background: linear-gradient(90deg, #f5f3ff 0%, #ffffff 100%);
}
.notification-item.unread[data-type="rate_and_review"]:hover {
    background: linear-gradient(90deg, #ede9fe 0%, #f8fafb 100%);
}

.notification-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.notification-content {
    flex: 1;
    min-width: 0;
    max-width: 300px;
}

.notification-content .notification-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-content .notification-title i {
    font-size: 0.8rem;
}

.notification-content .notification-text {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 8px;
    word-break: break-word;
    text-align: left;
}

.notification-content .notification-text strong {
    color: #8B4513;
    font-weight: 600;
}

.notification-meta {
    display: flex;
    gap: 12px;
}

.notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-time i {
    font-size: 0.65rem;
}

.notification-unread-dot {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #8B4513;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
    animation: notification-pulse 2s ease-in-out infinite;
}

@keyframes notification-pulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50%) scale(1.25);
        opacity: 0.7;
    }
}

/* Empty State */
.notification-empty {
    padding: 50px 20px;
    text-align: center;
    color: #9ca3af;
}

.notification-empty .empty-icon {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 12px;
}

.notification-empty .empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
}

.notification-empty .empty-text {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Notification Footer */
.notification-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #fafbfc;
    text-align: center;
    border-radius: 0 0 14px 14px;
    z-index: 10000;
}

.view-all-link {
    color: #8B4513;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
}

.view-all-link:hover {
    background: rgba(139, 69, 19, 0.08);
    color: #A0522D;
    gap: 10px;
}

.view-all-link i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.view-all-link:hover i {
    transform: translateX(2px);
}

.notification-item:nth-child(4) .notification-icon {
    background: #e8f5e8;
    color: #388e3c;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.3;
}

.notification-text {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.notification-footer {
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.view-all-btn {
    color: #8B4513;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.view-all-btn:hover {
    color: #A0522D;
    text-decoration: underline;
}
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: red;
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 9px;
    font-weight: bold;
}
