/* New style for delayed text visibility */
/* Animation for gradual text appearance */
@keyframes fade-in-2s {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Apply Inter font globally if this page is viewed standalone */
#site-header-instance body.standalone-header-preview {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

/* Logo Animation Styles */
@keyframes float-rotate {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(1.5deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-8px) rotate(-1.5deg); }
}

#site-header-instance .logo-link {
    position: relative;
    top: 8px; /* Default for desktop */
    display: inline-block;
    perspective: 1000px;
}

#site-header-instance .logo-image {
    animation: float-rotate 6s ease-in-out infinite;
    transition: transform 0.3s ease-out;
    height: 5rem; /* Default for desktop */
    display: block;
}

#site-header-instance .logo-link:hover .logo-image {
    transform: scale(1.1);
    transition: transform 0.15s ease-out;
}

@keyframes shadow-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.15; }
    25% { transform: translateX(-50%) scale(0.85); opacity: 0.1; }
    50% { transform: translateX(-50%) scale(1); opacity: 0.15; }
    75% { transform: translateX(-50%) scale(0.85); opacity: 0.1; }
}

#site-header-instance .logo-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 55%;
    height: 8px;
    background: black;
    border-radius: 50%;
    filter: blur(4px);
    z-index: -1;
    animation: shadow-pulse 6s ease-in-out infinite;
    transform: translateX(-50%);
    transform-origin: center bottom;
}

/* General Dropdown Styles */
#site-header-instance .dropdown-menu-wrapper {
    position: relative; /* Added for correct positioning of absolute children */
}
#site-header-instance .dropdown-menu {
    position: absolute;
    top: 100%;
    width: max-content;
    min-width: 11rem;
    max-width: 24rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95); /* Base transform for hidden state */
    transform-origin: top center; /* Default origin */
    transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0.25s ease-out;
}

/* Show dropdown on hover/focus/aria-expanded */
#site-header-instance .dropdown-menu-wrapper:hover > .dropdown-menu,
#site-header-instance .dropdown-menu-wrapper > button:focus + .dropdown-menu,
/* Removed a:focus + .dropdown-menu to allow click navigation */
#site-header-instance .dropdown-menu-wrapper > button[aria-expanded="true"] + .dropdown-menu,
#site-header-instance .dropdown-menu-wrapper > .dropdown-menu:hover,
#site-header-instance .dropdown-menu-wrapper > .dropdown-menu:focus-within {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1); /* Base transform for visible state */
}

/* Specific styling for "My Account" (utility nav) dropdown - CENTERED */
#site-header-instance .utility-nav-container .dropdown-menu-wrapper .dropdown-menu {
    /* Center dropdown under the My Account icon */
    left: 50%;
    right: auto;
    width: 350px;
    transform-origin: top center;
    transform: translateX(-50%) translateY(10px) scale(0.95); /* Initial hidden state */
}

/* When the "My Account" dropdown becomes visible, ensure it remains aligned to the right */
#site-header-instance .utility-nav-container .dropdown-menu-wrapper:hover > .dropdown-menu,
#site-header-instance .utility-nav-container .dropdown-menu-wrapper > a:focus + .dropdown-menu,
#site-header-instance .utility-nav-container .dropdown-menu-wrapper > .dropdown-menu:hover,
#site-header-instance .utility-nav-container .dropdown-menu-wrapper > .dropdown-menu:focus-within,
#site-header-instance .utility-nav-container .dropdown-menu-wrapper.force-hover-login > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1); /* Visible state */
    left: 50%;
    right: auto;
}

/* Styles for category item dropdowns (maintaining centered approach with animation) */
#site-header-instance .category-links-nav .dropdown-menu-wrapper .dropdown-menu.category-item-dropdown {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(10px) scale(0.95);
    transform-origin: top center;
}

#site-header-instance .category-links-nav .dropdown-menu-wrapper:hover .dropdown-menu.category-item-dropdown,
#site-header-instance .category-links-nav .dropdown-menu-wrapper button[aria-expanded="true"] + .dropdown-menu.category-item-dropdown {
    transform: translateX(-50%) translateY(0) scale(1);
}


#site-header-instance .dropdown-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    white-space: nowrap;
}
#site-header-instance .dropdown-menu a:hover {
    background-color: #f3f4f6;
    color: #2563eb;
}
#site-header-instance .dropdown-menu a [data-lucide] {
    margin-right: 0.5rem; width: 1rem; height: 1rem; vertical-align: middle;
    stroke-width: 2px; color: #6b7280;
}
#site-header-instance  .dropdown-menu a:hover [data-lucide] {
    color: #2563eb;
 }

/* Main Navigation Item Styles */
#site-header-instance .nav-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease-out;
    text-decoration: none;
    color: #333;
    background-color: #fff;
    background-image: linear-gradient(to bottom, #f0f8ff, #ffffff);
    border-radius: 8px;
    padding: 6px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-left: 2px; margin-right: 2px; margin-bottom: 4px;
    height: 2.5rem;
}
#site-header-instance .nav-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #f3f4f6;
    background-image: none;
}
#site-header-instance .icon-container {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    background-color: #fff;
    position: relative; overflow: visible;
    margin-right: 6px;
    transition: transform 0.3s ease-out;
}
#site-header-instance .icon-container svg {
    width: 18px; height: 18px;
    transition: fill 0.3s ease-out;
}
#site-header-instance .icon-container svg path {
    fill: #cccccc;
    transition: fill 0.3s ease-out;
}
#site-header-instance .nav-item.active.home-gradient .icon-container svg path { fill: #2196F3; }
#site-header-instance .nav-item.active.payment-gradient .icon-container svg path { fill: #8BC34A; }
#site-header-instance .nav-item.active.uploader-gradient .icon-container svg path { fill: #9C27B0; }
#site-header-instance .nav-item.active.tools-gradient .icon-container svg path { fill: #F44336; }
#site-header-instance .nav-item.active.contact-gradient .icon-container svg path { fill: #795548; }

/* Add background color change for active state */
/* Active state styles */
#site-header-instance .nav-item.active {
    background-color: #f0f8ff !important;
    border: 1px solid #d1e7ff !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2) !important;
    position: relative;
}

/* Active state pseudo-element for extra visual indicator */
#site-header-instance .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background-color: #2196F3;
    border-radius: 3px;
}

/* Active icon styling */
#site-header-instance .nav-item.active .icon-container {
    transform: scale(1.15) translateY(-4px) !important;
}

/* Specific active colors for each nav item */
#site-header-instance .nav-item.active.home-gradient {
    background-color: #e3f2fd !important;
    border-color: #bbdefb !important;
}
#site-header-instance .nav-item.active.payment-gradient {
    background-color: #e3f2fd !important; /* Light blue background for active state */
    border-color: #bbdefb !important; /* Light blue border */
}
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient {
    background-color: #f0f8ff !important; /* Lighter background for the button */
    border-color: #bbdefb !important; /* Lighter border color */
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2) !important; /* Softer shadow */
    cursor: default !important; /* No cursor change */
}
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient {
    color: #333 !important; /* Darker text for contrast on lighter background */
}
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient .nav-title {
    color: #333 !important; /* Darker text for contrast on lighter background */
}
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient .icon-container {
    background-color: #9C27B0 !important; /* Keep icon container purple */
}
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient .icon-container svg path {
    fill: #ffffff !important; /* Keep white icon for contrast */
}
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient::after {
    background-color: #6b7280 !important; /* Gray underline for active state */
}
#site-header-instance .nav-item.active.tools-gradient {
    background-color: #ffebee !important;
    border-color: #ffcdd2 !important;
}
#site-header-instance .nav-item.active.contact-gradient {
    background-color: #efebe9 !important;
    border-color: #d7ccc8 !important;
}

#site-header-instance .nav-item:hover .icon-container {
    transform: scale(1.2) translateY(-3px);
}
#site-header-instance .nav-item.home-gradient:hover .icon-container svg path { fill: #2196F3;}
#site-header-instance .nav-item.payment-gradient:hover .icon-container svg path { fill: #8BC34A;}
#site-header-instance .nav-item.uploader-gradient:hover .icon-container svg path { fill: #9C27B0;} /* Keep original hover for non-active */

/* Override hover for active uploader-gradient to prevent changes */
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient:hover {
    background-color: #f0f8ff !important; /* Match active background */
    border-color: #bbdefb !important; /* Match active border */
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2) !important; /* Match active shadow */
    transform: translateY(1px) !important; /* Maintain active transform */
    cursor: default !important; /* Ensure no cursor change */
}
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient:hover .icon-container {
    transform: scale(1.15) translateY(-4px) !important; /* Maintain active icon transform */
}
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient:hover {
    color: #333 !important; /* Match active text color */
}
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient:hover .icon-container svg path {
    fill: #ffffff !important; /* Maintain active icon fill */
}
#site-header-instance .main-nav-container .nav-item.active.uploader-gradient:hover .nav-title {
    color: #333 !important; /* Match active text color */
}
#site-header-instance .nav-item.tools-gradient:hover .icon-container svg path { fill: #F44336;}
#site-header-instance .nav-item.contact-gradient:hover .icon-container svg path { fill: #795548;}

#site-header-instance .nav-title {
    font-weight: 500; font-size: 13px; white-space: nowrap;
    transition: color 0.3s ease-out;
    color: #333;
}
#site-header-instance .nav-item:hover .nav-title { color: #000; }

#site-header-instance .nav-item.active {
    background-color: #e5e7eb;
    background-image: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(1px);
}
#site-header-instance .nav-item.active:hover .icon-container {
     transform: scale(1.1) translateY(-2px);
}
#site-header-instance .nav-item.active .nav-title { font-weight: 600; }

/* Utility Navigation Item Styles */
#site-header-instance .utility-item {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 6px; margin-left: 8px;
    cursor: pointer;
    transition: color 0.2s ease-in-out, opacity 0.2s ease-in-out, transform 0.2s ease-out;
    position: relative;
    color: #6b7280;
    height: 2.5rem;
}

/* Animation for login link show-up from up to down */
@keyframes slideDownFadeIn {
  0% {
    transform: translateY(-30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Apply the slideDownFadeIn animation on page load */
#site-header-instance .utility-nav-container .dropdown-menu-wrapper.ready > a.utility-item {
    animation: slideDownFadeIn 0.6s ease forwards;
}

/* Hover animation for login link */
#site-header-instance .utility-nav-container .dropdown-menu-wrapper > a.utility-item:hover {
    animation: hoverScaleUp 0.3s forwards;
    color: #1d4ed8;
}


/* Mouse off animation for login link: smooth return to original size with 1s transition */
#site-header-instance .utility-nav-container .dropdown-menu-wrapper > a.utility-item {
    transition: color 0.3s ease, transform 0.5s ease;
}

/* Define hover scale up animation */
@keyframes hoverScaleUp {
  0% {
    transform: scale(1) translateY(0);
  }
  100% {
    transform: scale(1.1) translateY(-2px);
  }
}

/* When mouse leaves, smoothly return to normal without running slideDownFadeIn */
#site-header-instance .utility-nav-container .dropdown-menu-wrapper > a.utility-item:not(:hover) {
    animation: none !important;
    transform: scale(1) translateY(0);
    color: #6b7280;
}
/* Reduce spacing specifically between WhatsApp link and My Account */
#site-header-instance .utility-item.whatsapp-link {
    /* Adjust spacing for tighter layout: less space between login and phone */
    margin-left: 2px;
    margin-right: 4px;
}
/* --- Jump-in animation for account text --- */
@keyframes jumpIn {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  60% {
    transform: translateY(10%);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Hide account text until JS determines login status */
#site-header-instance #headerAccountText,
#site-header-instance #headerAccountTextSrOnly {
  visibility: hidden;
}

/* Apply jump-in animation when 'jump-in' class is added */
#site-header-instance #headerAccountText.jump-in,
#site-header-instance #headerAccountTextSrOnly.jump-in {
  visibility: visible;
  animation: jumpIn 0.5s ease-out forwards;
}
#site-header-instance .utility-nav-container .dropdown-menu-wrapper > .utility-item {
    /* Align login icon flush with wrapper for tighter spacing */
    margin-left: 0;
}
/* Hide and fade-in login section (icon + text) once status is established */
#site-header-instance .utility-nav-container .dropdown-menu-wrapper > a.utility-item {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
#site-header-instance .utility-nav-container .dropdown-menu-wrapper.ready > a.utility-item {
    opacity: 1;
}
/* Reduce spacing between My Account and Cart icons */
#site-header-instance .utility-item.cart-icon-only {
    margin-left: 4px;
}
#site-header-instance .utility-item:hover {
    opacity: 0.8;
    transform: scale(1.1) translateY(-2px);
}
#site-header-instance .utility-item svg {
    width: 22px; height: 22px;
}
#site-header-instance  .utility-item svg path {
     fill: #6b7280;
     transition: fill 0.2s ease-in-out;
 }
#site-header-instance  .utility-item:not(.whatsapp-link):hover svg path {
     fill: #1d4ed8;
 }
#site-header-instance  .utility-item:not(.whatsapp-link):hover {
    color: #1d4ed8;
 }

#site-header-instance  .whatsapp-link { color: #25D366 !important; }
#site-header-instance  .whatsapp-link svg { margin-right: 0.25rem; }
#site-header-instance  .whatsapp-link svg path { fill: #25D366 !important; }
#site-header-instance  .whatsapp-link:hover { color: #128C7E !important; opacity: 1; }
#site-header-instance  .whatsapp-link:hover svg path { fill: #128C7E !important; }

#site-header-instance .utility-text {
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 0.25rem;
    /* Removed reserved fixed width to allow dynamic sizing based on text content */
    /* Prevent wrapping but allow full text display */
    white-space: nowrap;
}
/* Allow WhatsApp number text to size dynamically (override fixed width) */
#site-header-instance .whatsapp-link .utility-text {
    min-width: 0 !important;
    max-width: none !important;
}

/* Cart Count */
@keyframes funny-spin {
    0% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(360deg) scale(1.2); }
    20% { transform: rotate(720deg) scale(1); }
    30% { transform: rotate(710deg) scale(1); }
    40% { transform: rotate(730deg) scale(1.1); }
    50% { transform: rotate(720deg) scale(1); }
    70% { transform: rotate(1080deg) scale(1.3); }
    80% { transform: rotate(1070deg) scale(1.1); }
    90% { transform: rotate(1080deg) scale(1); }
    100% { transform: rotate(1080deg) scale(1); }
}

#site-header-instance .cart-count {
    position: absolute;
    animation: funny-spin 8s ease-in-out infinite;
    top: -3px;
    left: -6px;
    background-color: #2563eb;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    border-radius: 9999px;
    height: 1rem;
    width: 1rem;
    min-width: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1px solid white;
}
#site-header-instance .utility-item.cart-icon-only svg {
    margin-right: 0;
}

/* Search Bar Styles */
#site-header-instance .search-container {
    position: relative;
    bottom: 2px;
    flex-grow: 1;
    margin-left: 1.5rem;
    max-width: 380px; /* Default max-width for desktop */
    display: flex;
    align-items: flex-end;
}

/* Adjust search container for mobile */
@media (max-width: 768px) {
    #site-header-instance .search-container {
        margin-left: 0;
        margin-right: 0.5rem;
        max-width: none; /* Remove max-width on mobile */
        bottom: 0;
        align-items: center;
    }
}
#site-header-instance .search-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    background-color: #f9fafb;
    background-image: linear-gradient(to bottom, #fdfdfd, #f9fafb);
    transition: all 0.2s ease-in-out;
    font-size: 0.875rem;
    color: #374151;
    height: 2.5rem;
    box-sizing: border-box;
    line-height: normal;
}
#site-header-instance .search-input::placeholder {
    color: #9ca3af;
}
#site-header-instance .search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-color: white;
    background-image: none;
}
#site-header-instance .search-icon {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 20px; height: 20px;
    transition: transform 0.3s ease;
    pointer-events: none;
}
#site-header-instance .search-container:hover .search-icon {
    transform: translateY(-50%) scale(1.4);
}

/* Live Search Results Styles */
#site-header-instance .live-search-results-container {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 400px;
    overflow-y: auto;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    z-index: 500;
    opacity: 0;
    transform: translateY(-10px) scaleY(0.98);
    transform-origin: top center;
    transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0.25s ease-out;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    visibility: hidden;
}

#site-header-instance .live-search-results-container.visible {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    visibility: visible;
}

#site-header-instance .search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: #374151;
    cursor: pointer;
    font-size: 0.9rem;
}
#site-header-instance .search-result-item:last-child { border-bottom: none; }
#site-header-instance .search-result-item:hover { background-color: #f3f4f6; }
#site-header-instance .search-result-item img {
    width: 45px; height: 45px; object-fit: contain; margin-right: 12px;
    border-radius: 4px; background-color: #f9fafb;  flex-shrink: 0;
}
#site-header-instance .search-result-item span { line-height: 1.4; }
#site-header-instance .live-search-results-container .search-message,
#site-header-instance .live-search-results-container .search-error {
    padding: 15px; text-align: center;
}
#site-header-instance .live-search-results-container .search-message { color: #6b7280; font-style: italic; }
#site-header-instance .live-search-results-container .search-error { color: #dc2626; font-weight: bold; }


/* Header Structure and Alignment */
#site-header-instance .top-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}
#site-header-instance .header-left {
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
    /* Removed justify-content and width from here */
}
#site-header-instance .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-grow: 1; /* Allow header-right to take available space */
}
#site-header-instance .utility-nav-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
/* Reorder utility nav items: login first, then phone, then cart */
#site-header-instance .utility-nav-container > .dropdown-menu-wrapper {
    order: 0;
}
#site-header-instance .utility-nav-container > .utility-item.whatsapp-link {
    order: 1;
}
#site-header-instance .utility-nav-container > .utility-item.cart-icon-only {
    order: 2;
}
#site-header-instance .main-nav-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Category Links Bar Styles */
#site-header-instance .category-links-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    position: relative;
}
#site-header-instance .category-links-nav::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb 50%, #e5e7eb 50%, transparent);
}
#site-header-instance .category-link-button {
    display: inline-flex; align-items: center; color: #374151; font-size: 0.80rem; font-weight: 500;
    text-decoration: none; transition: transform 0.3s ease, color 0.15s ease-in-out;
    padding: 0.25rem 0.5rem; border-radius: 0.375rem; background-color: transparent;
    border: none; cursor: pointer; margin-right: 0.5rem;
}
#site-header-instance .category-link-button:last-child { margin-right: 0; }
#site-header-instance .category-link-button .category-arrow {
    font-size: 60%; color: #1E90FF; vertical-align: middle; margin-left: 0.2rem; display: inline-block;
}
#site-header-instance .category-link-button:hover { transform: scale(1.1); text-decoration: none; color: #1d4ed8; }


/* Notification Styles */
#site-header-instance .notification {
    position: relative; /* For positioning the wrapper */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0; /* Remove padding from the main notification div */
    margin-top: 1rem;
    margin-bottom: 1rem; /* Add margin for spacing */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000; /* Ensure it's above other elements */
}

#site-header-instance .notification.visible {
    opacity: 1;
    visibility: visible;
}

#site-header-instance .notification.hidden-animation {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

#site-header-instance .notification .notification-content-wrapper {
    background-color: rgba(255, 255, 255, 0.2); /* Light transparent background */
    backdrop-filter: blur(5px); /* Frosted glass effect */
    border-radius: 0.75rem; /* Rounded corners */
    padding: 0.75rem 1.25rem; /* Padding inside the wrapper */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Light border */
    color: #333; /* Default text color */
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    max-width: 90%; /* Limit width */
    display: inline-block; /* Allow it to shrink to content */
    text-align: center; /* Center text within the wrapper */
}

#site-header-instance .notification.success .notification-content-wrapper {
    color: #155724; /* Dark green for success text */
    background-color: rgba(223, 240, 216, 0.7); /* Light green transparent background */
    border-color: rgba(195, 226, 159, 0.7); /* Green border */
}

#site-header-instance .notification.error .notification-content-wrapper {
    color: #721c24; /* Dark red for error text */
    background-color: rgba(248, 215, 218, 0.7); /* Light red transparent background */
    border-color: rgba(245, 198, 203, 0.7); /* Red border */
}

/* Login Form Styles within Dropdown */
#site-header-instance .dropdown-menu #loginform input[type="text"],
#site-header-instance .dropdown-menu #loginform input[type="password"],
#site-header-instance .dropdown-menu #registerform input[type="text"],
#site-header-instance .dropdown-menu #registerform input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
#site-header-instance .dropdown-menu #loginform input[type="text"]:focus,
#site-header-instance .dropdown-menu #loginform input[type="password"]:focus,
#site-header-instance .dropdown-menu #registerform input[type="text"]:focus,
#site-header-instance .dropdown-menu #registerform input[type="password"]:focus {
    border-color: #a0d2eb;
    box-shadow: 0 0 0 3px rgba(160,210,235,0.2);
    outline: none;
    background: white;
}
#site-header-instance .dropdown-menu #loginform input[type="submit"],
#site-header-instance .dropdown-menu #registerform input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #000080; /* Solid dark navy blue */
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease, filter 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0 16px 0;
}
#site-header-instance .dropdown-menu #loginform input[type="submit"]:hover,
#site-header-instance .dropdown-menu #registerform input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    filter: brightness(1.2); /* Increased brightness for hover on dark color */
}
#site-header-instance .dropdown-menu #loginform .forgetmenot {
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
}
#site-header-instance .dropdown-menu #loginform .forgetmenot input {
    margin-right: 8px;
}
 #site-header-instance .dropdown-menu .social-login .social-btn {
    background-color: white;
    color: #374151;
    padding: 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}
#site-header-instance .dropdown-menu .social-login svg {
    width: 22px;
    height: 22px;
}

/* Gradient Button Styles for My Account/Logout */
#site-header-instance .dropdown-menu .btn-gradient {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    color: white; /* Text color for gradient buttons */
    text-align: center;
    transition: all 0.3s ease, filter 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none; /* Ensure no underline */
}
#site-header-instance .dropdown-menu .btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    filter: brightness(1.1);
    color: white; /* Ensure white text on hover */
}
#site-header-instance .dropdown-menu .btn-gradient-blue {
    background: linear-gradient(135deg, #005cbf 0%, #004080 100%); /* Stronger deeper blue */
}
#site-header-instance .dropdown-menu .btn-gradient-blue:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); /* Lighter blue on hover */
    transform: scale(1.05); /* Zoom in slightly on hover */
}
#site-header-instance .dropdown-menu .btn-gradient-red {
    background: linear-gradient(135deg, #fca5a5 0%, #ef4444 100%); /* Light red to lighter red gradient */
    color: white !important; /* Ensure white text for red button */
}
#site-header-instance .dropdown-menu .btn-gradient-red:hover {
    color: white !important; /* Ensure white text on hover for red button */
}


/* Responsive adjustments */
@media (max-width: 1024px) { /* lg breakpoint */
    /*
      Mobile layout reflow:
      - Row 1: .header-left (logo + search)
      - Row 2: sandwich (mobile-menu-button) + utility items (whatsapp, login/myaccount, animated account link, cart)
      - Row 3: main navigation buttons (home, tools, ...)
      We achieve this using flex-wrap and ordering so DOM remains unchanged.
    */
    #site-header-instance .top-nav-container { flex-direction: column; align-items: stretch; }
    #site-header-instance .header-left { width: 100%; justify-content: space-between; margin-bottom: 0.5rem; align-items: flex-end; }

    /* Make header-right wrap its children so we can force the main-nav onto its own row.
       Center the second row (sandwich + utilities) and keep the main nav centered as well. */
    #site-header-instance .header-right { width: 100%; align-items: center; flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 0.25rem; }

    /* Row 2 contents: sandwich + utilities
       Ensure mobile-menu-button sits immediately adjacent to each utility icon so they appear
       "one next to the other" on a single row. We set explicit ordering for header-right children
       and for utility-nav-container children so the visual order is:
       [mobile-menu-button] [login(dropdown)] [my-account animated link] [whatsapp] [cart]
    */
    /* Ensure mobile menu button displays and sits first within header-right */
    #site-header-instance .mobile-menu-button {
        display: inline-flex !important;
        /* position at start of the second row group */
        order: 0;
        margin-left: 0 !important;
        margin-right: 0.25rem !important;
        width: 30px;
        height: 30px;
        padding: 6px;
        box-sizing: content-box;
        align-items: center;
        justify-content: center;
    }
    #site-header-instance .mobile-menu-button svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Ensure header-right children ordering (mobile-menu-button then utility-nav) */
    #site-header-instance .header-right > .mobile-menu-button { order: 0; }
    #site-header-instance .header-right > .utility-nav-container { order: 1; }

    /* Utilities sit to the right of the sandwich button on the same row */
    #site-header-instance .utility-nav-container {
        order: 1;
        width: auto;
        display: flex;
        align-items: center;
        justify-content: flex-start; /* line up after sandwich */
        gap: 0.25rem;
        margin-bottom: 0; /* spacing handled via header-right gap / main-nav margin */
        flex-shrink: 0;
        flex-wrap: nowrap;
    }

    /* Explicit ordering for utility items so they appear in the requested sequence */
    #site-header-instance .utility-nav-container > .dropdown-menu-wrapper { order: 1; } /* login dropdown */
    #site-header-instance .utility-nav-container > .my-account-animated-link { order: 2; } /* animated my-account link */
    #site-header-instance .utility-nav-container > .utility-item.whatsapp-link { order: 3; } /* whatsapp */
    #site-header-instance .utility-nav-container > .utility-item.cart-icon-only { order: 4; } /* cart */

    /* Compact utility items so they appear next to each other */
    #site-header-instance .utility-nav-container .utility-item,
    #site-header-instance .utility-nav-container .my-account-animated-link {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 4px 6px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 2.25rem !important;
    }

    /* Tweak specific utility spacing */
    #site-header-instance .utility-item.whatsapp-link { margin-left: 0 !important; margin-right: 0 !important; }
    #site-header-instance .utility-item.cart-icon-only { margin-left: 0 !important; margin-right: 0 !important; padding: 4px 6px !important; }
    #site-header-instance .my-account-animated-link { margin-left: 0 !important; margin-right: 0 !important; padding: 6px 8px !important; }

    /* Put the main nav on its own full-width row below utilities */
    #site-header-instance .main-nav-container {
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 0.5rem;
        gap: 0.35rem;
        flex-grow: 0;
    }

    /* Keep existing search/logo adjustments */
    #site-header-instance .search-container { max-width: none; margin-left:0.5rem; margin-right: 0.5rem; bottom: 0; }
    #site-header-instance .logo-link { top: 0; }
    #site-header-instance .nav-title { display: none; }
    #site-header-instance .nav-item { padding: 6px; }
    #site-header-instance .icon-container { margin-right: 0; }

    /* Utility text minimized on mobile */
    #site-header-instance .utility-item .utility-text, #site-header-instance .whatsapp-link span.utility-text { display: none; }

    /* Hide full category nav on mobile; show burger instead (mobile categories appear via the burger) */
    #site-header-instance .category-links-nav {
        display: none !important;
    }
    #site-header-instance .category-link-button { font-size: 0.75rem; padding: 0.25rem 0.3rem; margin-right: 0.2rem;}

    /* Align login dropdown under My Account icon on mobile (left edge at icon) */
    #site-header-instance .utility-nav-container .dropdown-menu-wrapper .dropdown-menu {
        left: 0 !important;
        right: auto !important;
        transform-origin: top left !important;
        transform: translateY(10px) scale(0.95) !important;
    }
    #site-header-instance .utility-nav-container .dropdown-menu-wrapper:hover > .dropdown-menu,
    #site-header-instance .utility-nav-container .dropdown-menu-wrapper > a:focus + .dropdown-menu,
    #site-header-instance .utility-nav-container .dropdown-menu-wrapper > .dropdown-menu:hover,
    #site-header-instance .utility-nav-container .dropdown-menu-wrapper > .dropdown-menu:focus-within,
    #site-header-instance .utility-nav-container .dropdown-menu-wrapper.force-hover-login > .dropdown-menu {
        left: 0 !important;
        right: auto !important;
        transform: translateY(0) scale(1) !important;
    }
}

/* Sandwich button and mobile category menu */
/* Sandwich button: hidden by default, shown on mobile */
/* Mobile menu toggle button: hidden by default, shown on mobile */
#site-header-instance .mobile-menu-button {
    display: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #374151;
    line-height: 1;
    /* Ensure button is clickable and above other elements */
    position: relative;
    z-index: 500;
}
#site-header-instance .mobile-menu-button svg { width: 2rem; height: 2rem; }

/* Mobile category menu when open */
#site-header-instance #mobile-category-menu.open {
    display: flex !important;
    flex-direction: column; flex-wrap: wrap; width: 100%;
    background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 0.375rem;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1); padding: 0.75rem; margin-top: 0.5rem; z-index: 100;
}
#site-header-instance #mobile-category-menu.open::before { display: none; }
#site-header-instance #mobile-category-menu.open .dropdown-menu-wrapper { width: 100%; margin-bottom: 0.5rem; }
#site-header-instance #mobile-category-menu.open .dropdown-menu-wrapper:last-child { margin-bottom: 0; }
#site-header-instance #mobile-category-menu.open .category-link-button {
    display: flex; justify-content: space-between; align-items: center; width: 100%;
    padding: 0.625rem 0.75rem; font-size: 0.875rem; background-color: #f8f9fa;
    border-radius: 0.375rem; text-align: left; margin-right: 0; white-space: normal;
}
#site-header-instance #mobile-category-menu.open .category-link-button:hover { background-color: #e9ecef; }

.user-name-display {
    text-transform: capitalize;
}

/* --- Modern Animated My Account Link --- */
#site-header-instance .my-account-animated-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 12px 2px 8px;
    margin-left: 8px;
    margin-right: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f3f6fb 60%, #e9f0fa 100%);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.07);
    border: 1px solid #e3eaf5;
    color: #4b5563;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: 
        background 0.35s cubic-bezier(.4,0,.2,1),
        box-shadow 0.35s cubic-bezier(.4,0,.2,1),
        color 0.25s,
        border 0.25s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
#site-header-instance .my-account-animated-link .my-account-icon {
    display: flex;
    align-items: center;
    margin-right: 6px;
    transition: transform 0.35s cubic-bezier(.4,0,.2,1), filter 0.35s;
    filter: drop-shadow(0 1px 2px rgba(33,150,243,0.08));
}
#site-header-instance .my-account-animated-link .my-account-text {
    transition: color 0.25s cubic-bezier(.4,0,.2,1), letter-spacing 0.25s;
    letter-spacing: 0.01em;
    font-size: 0.92rem;
    font-weight: 600;
    color: #4b5563;
}
#site-header-instance .my-account-animated-link:hover,
#site-header-instance .my-account-animated-link:focus-visible {
    background: linear-gradient(90deg, #e3f0ff 60%, #d0e6ff 100%);
    box-shadow: 0 6px 18px rgba(33, 150, 243, 0.13), 0 1.5px 6px rgba(33,150,243,0.07);
    border: 1.5px solid #b6d4fa;
    color: #1d4ed8;
    outline: none;
}
#site-header-instance .my-account-animated-link:hover .my-account-icon,
#site-header-instance .my-account-animated-link:focus-visible .my-account-icon {
    transform: scale(1.18) translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(33,150,243,0.18));
}
#site-header-instance .my-account-animated-link:hover .my-account-text,
#site-header-instance .my-account-animated-link:focus-visible .my-account-text {
    color: #1d4ed8;
    letter-spacing: 0.04em;
}
#site-header-instance .my-account-animated-link:active {
    background: linear-gradient(90deg, #d0e6ff 60%, #e3f0ff 100%);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.10);
    border: 1.5px solid #90caf9;
}
#site-header-instance .my-account-animated-link svg {
    width: 20px;
    height: 20px;
    transition: filter 0.3s, opacity 0.3s;
    opacity: 0.96;
}
@media (max-width: 1024px) {
    #site-header-instance .my-account-animated-link {
        padding: 6px 10px;
        font-size: 0.95rem;
    }
    #site-header-instance .my-account-animated-link .my-account-icon {
        margin-right: 6px;
    }
    #site-header-instance .my-account-animated-link .my-account-text {
        font-size: 0.95rem;
    }
}
