/* ================= TOP ANNOUNCEMENT BAR ================= */
.sticky-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* Shadow આખા બ્લોકને આપ્યો */
}

/* --- Top Bar Styling --- */
.top-bar {
    background-color: #4a0404;
    /* Maroon */
    color: white;
    font-size: 13px;
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: hidden;
    /* Key to hiding text outside the box */
    width: 100%;
}

/* --- MARQUEE ANIMATION --- */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    /* Forces text to one line */
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    /* Starts the text off-screen to the right */

    /* Animation: Name | Duration | Timing | Infinite Loop */
    animation: scroll-left 30s linear infinite;
}

/* Optional: Pause text when mouse hovers over it */
.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Moves the text completely off-screen to the left */
        transform: translateX(-100%);
    }
}

/* ================= DESKTOP HEADER ================= */
.desktop-header {
    background: white;
    height: 100px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid var(--gold);
}

.header-wrapper {
    max-width: 1800px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Logo */
.brand-logo img {
    height: 100px;
    width: auto;
    padding: 10px;
}

/* Navigation */
.desktop-nav .nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--navy);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 17px;

    transition: 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--maroon);
}

.nav-links a:hover::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: var(--maroon);
    margin-top: 2px;
}

/* Search & Icons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
    width: 220px;
}

.search-box input {
    width: 100%;
    padding: 8px 15px;
    padding-right: 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
}

.icon-group a {
    color: var(--navy);
    font-size: 20px;
    margin-left: 10px;
    text-decoration: none;
    position: relative;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--maroon);
    color: white;
    font-size: 10px;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Style for the header logout button */
.header-actions button[name="logout_btn"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-actions button[name="logout_btn"]:hover {
    color: #d9534f !important;
    /* Change to a soft red on hover */
    transform: scale(1.1);
}

/* Ensure spacing is consistent in icon-group */
.icon-group>* {
    margin-left: 15px;
}

/* ================= MOBILE TOP BAR ================= */
.mobile-top-bar {
    display: none;
}

@media (max-width: 900px) {


    .marquee-content {

        animation: scroll-left 20s linear infinite;
    }


    .desktop-header {
        display: none;
    }

    /* ખાલી હેડર છુપાવો */

    /* Top Bar ને બતાવવા માટે */
    .top-bar {
        display: block;
        font-size: 10px;
        /* મોબાઈલ માટે થોડા નાના ફોન્ટ */
        padding: 5px 0;
        top: 0;
        z-index: 1000;
    }

    .top-bar .container {
        justify-content: center;
        /* સેન્ટરમાં રાખો */
        flex-direction: column;
        /* એક નીચે એક */
        gap: 2px;

    }

    /* મોબાઈલમાં ખાલી મેઈન લાઈન બતાવો, ફોન નંબર છુપાવી શકાય */
    .top-bar span:first-child,
    .top-bar span:last-child {
        display: none;
    }

    .mobile-top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        background: white;
        position: sticky;
        top: 0;
        z-index: 999;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        border-bottom: 3px solid var(--gold);

    }

    .mobile-logo img {
        height: 60px;
    }

    .mobile-menu-icon,
    .mobile-search-icon {
        font-size: 20px;
        color: var(--navy);
    }
}


/* ================= MOBILE SIDEBAR STYLES ================= */

/* 1. Dark Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    z-index: 2000;
    display: none;
    /* Default Hidden */
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* 2. Sidebar Drawer */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    /* Width of sidebar */
    height: 100%;
    background: white;
    z-index: 2001;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transform: translateX(-100%);
    /* Hide to the left */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    transform: translateX(0);
    /* Slide in */
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #fdfbf7;
    /* Light Cream */
}

.sidebar-header img {
    height: 50px;
}

.sidebar-header button {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--navy);
    cursor: pointer;
}

/* Sidebar Menu Links */
.sidebar-menu {
    padding: 20px;
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 25px;
}

.menu-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.menu-section a {
    display: block;
    text-decoration: none;
    color: var(--navy);
    padding: 10px 0;
    font-size: 15px;
    border-bottom: 1px solid #f9f9f9;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-section a i {
    color: var(--maroon);
    width: 20px;
}

.menu-section a:hover {
    color: var(--maroon);
    padding-left: 5px;
}

/* Contact Box */
.contact-box p {
    font-size: 14px;
    margin-bottom: 5px;
    color: #666;
}

.btn-call {
    background: var(--maroon);
    color: white !important;
    padding: 10px;
    border-radius: 5px;
    justify-content: center;
    font-weight: bold;
}

.btn-call i {
    color: white;
}


/* ================= MOBILE MAP SECTION ================= */
.mobile-map-section {
    display: none;
    /* Desktop માં નહીં દેખાય */
}

@media (max-width: 900px) {
    .mobile-map-section {
        display: block;

        padding: 20px;
        text-align: center;
        margin-bottom: 20px;
        /* થોડી જગ્યા નીચે */

        /* ઉપર લાલ બોર્ડર */
    }

    .mobile-map-section h3 {
        font-family: var(--font-heading);
        color: var(--maroon);
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .mobile-map-section iframe {
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .mobile-address {
        margin-top: 10px;
        font-size: 12px;
        color: #555;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    .mobile-address i {
        color: var(--maroon);
    }
}

/* =========================================
   PROFILE PROGRESS RING & TOOLTIP
   ========================================= */

/* The Ring Container */
.profile-progress-box {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    /* Outer Diameter */
    height: 38px;
    border-radius: 50%;

    /* Dynamic Gradient using CSS Variable */
    /* If --profile-pct is not set, it defaults to 0% */
    background: conic-gradient(#28a745 var(--profile-pct, 0%),
            #e0e0e0 var(--profile-pct, 0%));

    transition: background 0.3s ease;
    margin-left: 15px;
    /* Space from cart icon */
    cursor: pointer;
}

/* Inner White Circle (Creates the 'Donut' effect) */
.profile-progress-box::after {
    content: '';
    position: absolute;
    width: 32px;
    /* Inner Diameter */
    height: 32px;
    background: white;
    border-radius: 50%;
    z-index: 1;
}

/* The User Icon (Centered on top) */
.profile-progress-box i {
    position: relative;
    z-index: 2;
    font-size: 14px;
    color: #333;
}

/* --- TOOLTIP STYLES --- */
.profile-tooltip {
    position: absolute;
    top: 48px;
    /* Position below the icon */
    right: 0;
    background-color: #4a0404;
    /* Brand Maroon */
    color: white;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    /* Bounce Animation */
    animation: bounce 2s infinite ease-in-out;
    pointer-events: none;
    /* Ensures it doesn't block clicks */
}

/* Tooltip Little Arrow (Pointing up) */
.profile-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    right: 14px;
    /* Align with icon center */
    width: 8px;
    height: 8px;
    background-color: #4a0404;
    transform: rotate(45deg);
}

/* Bounce Animation Keyframes */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

/* Container for fading elements */
.fade-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* Base style for both icon and text */
.fade-item {
    position: absolute;
    transition: opacity 1s ease-in-out;
    animation: fade-sequence 6s infinite;
    /* 6 second total loop */
}

/* The User Icon */
.icon-element {
    font-size: 14px;
    color: #333;
}

/* The Percentage Text */
.pct-element {
    font-size: 11px;
    font-weight: 800;
    color: #4a0404;
    /* Brand Maroon */
    opacity: 0;
    /* Starts halfway through the loop */
}

/* --- FADE ANIMATION KEYFRAMES --- */
@keyframes fade-sequence {

    0%,
    45% {
        opacity: 1;
        visibility: visible;
    }

    50%,
    95% {
        opacity: 0;
        visibility: hidden;
    }

    100% {
        opacity: 1;
        visibility: visible;
    }
}

/* Apply reverse timing to the percentage so they swap */
.pct-element {
    animation: fade-sequence-reverse 6s infinite;
}

@keyframes fade-sequence-reverse {

    0%,
    45% {
        opacity: 0;
        visibility: hidden;
    }

    50%,
    95% {
        opacity: 1;
        visibility: visible;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Optional: Pause animation on hover so user can read */
.profile-progress-box:hover .fade-item {
    animation-play-state: paused;
}

/* --- DESKTOP DROPDOWN RESULTS CSS --- */
.desktop-search-results {
    position: absolute;
    top: 110%;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.desktop-search-results.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Scrollbar Hide for Desktop Dropdown */
.desktop-search-results::-webkit-scrollbar {
    width: 5px;
}

.desktop-search-results::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

/* Adapting AJAX output for desktop dropdown */
.desktop-search-results .search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    transition: 0.2s;
    background: #fff;
    border-radius: 0;
}

.desktop-search-results .search-result-item:hover {
    background: #fdfdfd;
    border-color: #f0f0f0;
    transform: none;
    box-shadow: none;
}

.desktop-search-results .search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.desktop-search-results .no-result {
    padding: 20px;
}

.desktop-search-results .no-result i {
    font-size: 30px;
}


/* --- FULL SCREEN SEARCH OVERLAY CSS (MOBILE) --- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(5px);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.close-search {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    font-size: 35px;
    color: #333;
    cursor: pointer;
    transition: 0.3s;
}

.close-search:hover {
    color: #4a0404;
    transform: rotate(90deg);
}

.search-overlay-content {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    transform: translateY(-30px);
    transition: transform 0.4s ease;
}

.search-overlay.active .search-overlay-content {
    transform: translateY(0);
}

.search-label {
    font-size: 13px;
    color: #888;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 10px;
}

.search-input-box {
    position: relative;
    border-bottom: 3px solid #4a0404;
    padding-bottom: 10px;
    margin-bottom: 40px;
}

.search-icon-large {
    position: absolute;
    left: 0;
    bottom: 20px;
    font-size: 28px;
    color: #4a0404;
}

#liveSearchInput {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 40px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: #111;
    padding: 10px 10px 10px 45px;
    outline: none;
}

#liveSearchInput::placeholder {
    color: #ccc;
    font-weight: 400;
}

/* Overlay Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding-bottom: 50px;
}

.search-results-grid::-webkit-scrollbar {
    width: 5px;
}

.search-results-grid::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: 0.3s;
}

.search-result-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-color: #dce1e6;
    transform: translateY(-2px);
}

.search-result-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
}

.search-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #4a0404;
}

.search-cat {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.search-price {
    font-weight: 700;
    color: #2e7d32;
    font-size: 15px;
}

.no-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #888;
}

.no-result i {
    font-size: 40px;
    color: #ddd;
    margin-bottom: 15px;
}

.no-result p {
    font-size: 18px;
    color: #555;
    margin-bottom: 5px;
}

@media (max-width: 600px) {
    #liveSearchInput {
        font-size: 26px;
    }

    .search-results-grid {
        grid-template-columns: 1fr;
    }
}