 /*
 @font-face {
    font-family: 'refoke';
    src: url('fonts/refoke.woff2') format('woff2'),
         url('fonts/refoke.woff') format('woff');
    font-weight: normal;
 }
 */

/* --- Authentication-Based UI Visibility --- */
/* By default, hide elements that require a user to be logged in. */
.requires-login {
    display: none !important;
}

/* When the user is logged in, show the protected elements. */
.logged-in .requires-login {
    display: list-item !important; /* Use list-item for nav links */
}

/* Hide elements meant for logged-out users when logged in. */
.logged-in .requires-logout {
    display: none !important;
}

/* By default, show elements for logged-out users. */
.requires-logout {
    display: list-item !important;
}

/* Hide the admin dashboard link by default */
.admin-dashboard-link {
    display: none !important;
}

/* Prevent horizontal scrolling caused by off-screen elements like the mobile menu */
html {
    overflow-x: hidden;
}

/* Remove the default blue outline on focus for mouse users.
   The :focus-visible pseudo-class is used elsewhere to restore
   it for keyboard navigators, which is best for accessibility. */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: none;
}

/* Generic body styles for all pages */
        body {
            margin: 0;
            padding: 0;
            background-color: #f5f5f5;
            font-family: Arial, sans-serif;
            box-sizing: border-box;
            position: relative; /* Helps contain off-screen elements */
            overflow-x: hidden; /* Apply to body as well for maximum compatibility */
        }

        /* Prevents the main page from scrolling when the mobile menu is open */
        body.mobile-menu-open {
            overflow: hidden;
        }

        /* Specific styles for the homepage body */
        body.page-homepage {
            background-image: linear-gradient(to top, rgba(255, 254, 254, 0.5), rgba(175, 174, 174, 0.9)),
                      url('images/pattern.png');
            background-repeat: no-repeat, repeat;
            background-size: cover, 170px;
            background-attachment: fixed;
            /* Add padding for fixed navbar */
            padding-top: 15vh; /* Adjusted for both navbars */
        }

        /* --- General Navbar Styles (used on multiple pages) --- */

        .secondary-header {
            position: fixed;
            top: 8.33vh; /* Positioned directly below the main navbar */
            left: 0;
            width: 100vw;
            background: rgba(255, 182, 193, 0.7); /* Match navbar color */
            backdrop-filter: blur(10px); /* Match navbar effect */
            z-index: 999;
            box-sizing: border-box;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 2vw;
        }

        .search-container {
            display: flex;
            align-items: center;
            background-color: white;
            width: 60vw;
            padding: 10px 20px;
            border-radius: 30px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }

        #search-bar {
            flex-grow: 1;
            border: none;
            outline: none;
            font-size: 1rem;
            background-color: transparent;
        }

        .search-container .filter-icon {
            font-size: 1.2rem;
            color: #888;
            cursor: pointer;
            margin-left: 10px;
        }

        /* New Sub-Navbar */
        .sub-navbar {
            background: transparent; /* The parent now has the background */
            display: flex;
            align-items: center;
            padding: 0 2vw;
        }

        .sub-navbar ul {
            display: flex;
            align-items: center;
            margin: 0;
            padding: 0;
            list-style: none;
            height: 100%;
            gap: 1.5vw;
        }

        .sub-navbar ul a {
            color: #d6336c;
            font-size: .8rem;
            font-weight: 500;
            text-decoration: none;
            transition: color 0.2s;
        }

        .sub-navbar a:hover {
            color: #ad1457;
        }
        /* Add this to your <style> section or style.css */
/* Glassy, full-width navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 8.33vh;
    background: rgba(255, 182, 193, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    padding: 0 2vw;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Add shadow for depth and glassy effect */
}

.navbar ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
    gap: 2vw;

}
.navbar-brand {
    color: #d6336c;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    align-items: center;
}

.navbar li {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar ul a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 1.5vw;
    color: #d6336c;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 1px;
    transition: background 0.2s, color 0.2s;
    border-radius: 12px;
    gap: 0.5em;
}

.navbar a:hover {
    background: rgba(255,255,255,0.25);
    color: #ad1457;
}
 .hero-section {
            display: flex;
            justify-content: center; /* Center hero and cards */
            align-items: center;
            padding: 5vh 2vw;
            box-sizing: border-box;
            gap: 5rem; /* Add space between hero and cards */
        }

        .hero-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 65vw;
            min-height: 20vh;
            background: rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 2rem;
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.18);
            gap: 2rem;
            transition: transform 0.1s ease-out; /* For parallax effect */
        }

        .hero-text {
            flex-basis: 60%;
            padding-right: 2rem;
        }

        .hero-text h1 {
             font-family: 'Poppins', sans-serif;
            font-size: 2.2rem;
            color: #c2185b; /* Darker pink for contrast */
            line-height: 1.4;
            margin: 0;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
            font-weight: 600;  
        }
         .hero-text p {
            font-family: 'Poppins', sans-serif;
            font-size: 1.5rem; /* Smaller than the h1 */
            color: #e91e63;
            margin-top: 1rem;
            line-height: 1.5;
            font-weight: 300;
            font-style: italic;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
        }

        .hero-video {
            flex-basis: 40%;
            height: 25vh; /* Maintain a nice aspect ratio */
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }

        .hero-video video {
            width: 100%;
            height: 100%;
            object-fit: cover; /* Ensures video covers the container */
        }

        /* 3D Card Stack */
        .card-stack-container {
            width: 280px; /* Landscape width */
            height: 200px; /* Landscape height */
            position: relative;
        }

        .card-stack-container .card {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 15px;
            background-color: #f0f0f0;
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
            transition: transform 0.5s ease;
            background-size: cover;
            background-position: center;
            border: 1px solid rgba(255,255,255,0.4);
        }

        .card-stack-container .card-1 {
            /* Left card, highest position */
            transform: translateX(-90px) translateY(0px);
            z-index: 1;
        }

        .card-stack-container .card-2 {
            /* Center card, middle position */
            transform: translateY(160px);
            z-index: 2;
        }

        .card-stack-container .card-3 {
            /* Right card, lowest position */
            transform: translateX(-90px) translateY(320px);
            z-index: 3;
        }

        /* Add a hover effect that lifts and scales the card without losing its position */
        .card-stack-container .card:hover {
            z-index: 4; /* Bring hovered card to the front */
            box-shadow: 0 15px 35px rgba(0,0,0,0.3);
        }

        .card-stack-container .card-1:hover {
            transform: translateX(-90px) translateY(-10px) scale(1.05);
        }
        .card-stack-container .card-2:hover {
            transform: translateY(150px) scale(1.05);
        }
        .card-stack-container .card-3:hover {
            transform: translateX(-90px) translateY(310px) scale(1.05);
        }
        
        .hub-section {
            display: flex;
            justify-content: center; /* Center the cards horizontally */
            align-items: center;
            gap: 3rem;
            padding: 3vh 10vw;
            margin-top: 2vh; /* Space from the hero section */
        }

        .hub-card {
            width: 22vw;
            height: 50vh;
            background: rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 2rem;
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.18);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .hub-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.15);
        }

        .hub-logo {
            font-size: 12vh; /* Roughly half of 50vh height */
            color: #c2185b;
            margin-bottom: 1.5rem;
        }

        .hub-card h2 {
            font-family: 'Poppins', sans-serif;
            font-size: 1.8rem;
            color: #c2185b;
            margin-bottom: 0.5rem;
        }

        .hub-card p {
            font-size: 1rem;
            color: #e91e63;
            line-height: 1.5;
        }

        /* --- Hub Card Link --- */
        .hub-card-link {
            text-decoration: none; /* Remove underline from links */
            color: inherit; /* Make link text color same as parent */
            -webkit-tap-highlight-color: transparent; /* Remove blue flash on mobile tap */
        }

        .product-showcase-section {
            padding: 4vh 2vw;
            text-align: center;
        }

        .product-showcase-section h2 {
            font-family: 'Poppins', sans-serif;
            font-size: 2.5rem;
            color: #c2185b;
            margin-bottom: 3rem;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
        }

        .product-grid {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 2rem; /* For spacing */
        }

        .product-card {
            width: 22vw;
            min-height: 10vh; /* As requested, but will grow with content */
            background: rgba(255, 255, 255, 0.35);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.18);
            padding: 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .product-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
        }

        .product-card img {
            width: 100%;
            height: 15vh;
            object-fit: cover;
            border-radius: 10px;
            margin-bottom: 1rem;
        }

        .product-card h3 {
            font-size: 1.1rem;
            color: #333;
            margin: 0 0 0.5rem 0;
        }

        .product-card .price {
            font-size: 1rem;
            font-weight: bold;
            color: #c2185b;
            margin-bottom: 1rem;
        }
        @layer components {
  .product-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 22vw);
    gap: 2rem;
    padding: 2rem;
    margin-top: 2rem;
  }

  .product-card {
    height: 10vh;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .product-images {
    display: flex;
    height: 60%;
  }

  .product-image {
    width: 50%;
    object-fit: cover;
  }

  .product-content {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .product-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .product-name {
    font-size: 1rem;
    color: #333;
  }

  .product-price {
    font-weight: bold;
    color: #c2185b;
  }

  .product-rating {
    color: #ffd700;
  }

  .product-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
  }

  .add-to-cart, .buy-now {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s;
  }

  .add-to-cart {
    background-color: #ff7f50;
    color: white;
  }

  .buy-now {
    background-color: #28a745;
    color: white;
  }

  .see-more-btn {
    margin: 2rem auto;
    padding: 0.75rem 2rem;
    background-color: #c2185b;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s;
  }

  .see-more-btn:hover {
    transform: translateY(-2px);
  }
}

.card-stack-container .card {
            background: linear-gradient(145deg, rgba(233, 30, 99, 0.9), rgba(194, 24, 91, 0.9));
            color: white;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        }

        .card-content-promo i {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            opacity: 0.8;
        }

        .card-content-promo h3 {
            font-size: 1.4rem;
            margin-bottom: 0.5rem;
        }

        .card-content-promo p {
            font-size: 0.9rem;
            line-height: 1.4;
            opacity: 0.9;
        }

       /* --- Info Card Section --- */
        .info-card-section {
            padding: 10vh 2vw;
            background-color: transparent;
            position: relative; /* For positioning the background element */
            margin-top: 5vh;
            margin-bottom: 15vh; /* Extra margin for the offset card */
        }

        .info-card-background {
            position: absolute;
            top: -2rem;
            left: 50%;
            transform: translateX(-50%);
            width: calc(3 * 28vw + 4rem + 4rem); /* 3 cards + 2 gaps + padding */
            max-width: calc(3 * 420px + 4rem + 4rem);
            height: calc(100% + 5rem);
            background: rgba(255, 255, 255, 0.4);
            backdrop-filter: blur(15px);
            border-radius: 25px;
            z-index: 0; /* Sit behind the cards */
            clip-path: polygon(0% 0%, 100% 0%, 100% 55%, 68% 55%, 68% 100%, 32% 100%, 32% 55%, 0% 55%);
        }

        .info-card-container {
            position: relative; /* To sit on top of the background */
            z-index: 1;
            display: flex;
            justify-content: center;
            align-items: flex-start; /* Align items to the top */
            gap: 2rem;
        }

        .info-card {
            background: white;
            border-radius: 15px;
            padding: 2.5rem;   /* Increased padding for more space */
            width: 28vw;       /* Increased width */
            max-width: 420px;  /* Increased max-width */
            min-height: 220px; /* Increased height */
            text-align: center;
            box-shadow: 0 8px 20px rgba(0,0,0,0.1);
            border: 1px solid #eee;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        
        .info-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 12px 25px rgba(0,0,0,0.15);
        }

        .info-card.middle-card {
            transform: translateY(50%);
            background: linear-gradient(145deg, #e91e63, #c2185b);
            color: white;
        }
        
        .info-card.middle-card:hover {
            transform: translateY(calc(50% - 10px));
        }

        .info-card h3 {
            color: #c2185b;
            margin-top: 0;
            font-size: 1.6rem; /* Made heading larger */
            margin-bottom: 1rem;
        }

        .info-card.middle-card h3 {
            color: white;
        }

        .info-card p {
            color: #555;
            line-height: 1.5;
            font-size: 1.05rem; /* Made text slightly larger */
        }

        .info-card.middle-card p {
            color: rgba(255, 255, 255, 0.9);
        }

       /* --- Newsletter Section --- */
        .newsletter-section {
            padding: 4rem 2vw;
            background: #fdeaf1; /* A very light pink, almost white */
            text-align: center;
        }

        .newsletter-content {
            max-width: 600px;
            margin: 0 auto;
        }

        .newsletter-content h3 {
            font-family: 'Poppins', sans-serif;
            font-size: 2.2rem;
            color: #c2185b;
            margin-bottom: 1rem;
        }

        .newsletter-content p {
            font-size: 1.1rem;
            color: #555;
            margin-bottom: 2rem;
            line-height: 1.6;
        }

        .newsletter-form {
            display: flex;
            justify-content: center;
            gap: 10px;
        }

        .newsletter-form input {
            width: 60%;
            padding: 12px 20px;
            border: 1px solid #ddd;
            border-radius: 25px;
            font-size: 1rem;
            outline: none;
            transition: border-color 0.3s ease;
        }

        .newsletter-form input:focus {
            border-color: #e91e63;
        }

        .newsletter-form button {
            padding: 12px 25px;
            border: none;
            border-radius: 25px;
            background-color: #e91e63;
            color: white;
            font-size: 1rem;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
        }

        .newsletter-form button:hover {
            background-color: #c2185b;
            transform: translateY(-2px);
        }

       /* --- Site Footer --- */
        .site-footer {
            background: rgba(255, 182, 193, 0.5); /* Light pink, semi-transparent */
            backdrop-filter: blur(10px);
            color: #444;
            padding: 4rem 2vw 0;
            margin-top: 10vh; /* Space above footer */
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }

        .footer-container {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 2rem;
            max-width: 1400px;
            margin: 0 auto;
            padding-bottom: 3rem;
        }

        .footer-column {
            flex: 1;
            min-width: 220px;
            padding: 0 1rem;
        }

        .footer-column h4 {
            color: #c2185b;
            font-size: 1.2rem;
            margin-bottom: 1.5rem;
            position: relative;
        }

        .footer-column h4::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: -5px;
            width: 40px;
            height: 2px;
            background-color: #e91e63;
        }

        .footer-column p {
            font-size: 0.95rem;
            line-height: 1.6;
            color: #555;
        }

        .footer-column.links ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .footer-column.links ul li {
            margin-bottom: 0.75rem;
        }

        .footer-column.links a {
            color: #555;
            text-decoration: none;
            transition: color 0.3s ease, padding-left 0.3s ease;
        }

        .footer-column.links a:hover {
            color: #c2185b;
            padding-left: 5px;
        }

        .social-links {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
        }

        .social-links a {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 40px;
            height: 40px;
            background: white;
            border-radius: 50%;
            color: #c2185b;
            font-size: 1.1rem;
            text-decoration: none;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
            transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
        }

        .social-links a:hover {
            transform: translateY(-3px);
            background-color: #c2185b;
            color: white;
        }

        .footer-bottom {
            text-align: center;
            padding: 1.5rem 0;
            border-top: 1px solid rgba(0,0,0,0.08);
            background: rgba(0,0,0,0.02);
        }

        .footer-bottom p {
            margin: 0;
            font-size: 0.9rem;
            color: #666;
        }

       /* --- Back to Top Button --- */
        .back-to-top-btn {
            position: fixed;
            bottom: 25px;
            right: 25px;
            width: 50px;
            height: 50px;
            background-color: #c2185b;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            text-decoration: none;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            z-index: 998;
            opacity: 0;
            visibility: hidden;
            transform: translateY(20px);
            transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
        }

        .back-to-top-btn.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .back-to-top-btn:hover {
            background-color: #e91e63;
            transform: translateY(-3px);
        }

       /* --- Showcase Section --- */
        .product-showcase-section {
            padding: 4vh 2vw;
            text-align: center;
            background-color: #f4f4f4;
        }

        .product-showcase-section h2 {
            font-family: 'Poppins', sans-serif;
            font-size: 2.5rem;
            color: #c2185b;
            margin-bottom: 3rem;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
        }

        /* --- Product Grid --- */
        .product-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            justify-content: center;
            gap: 4rem;
        }

        /* --- Product Card Layout --- */
        .product-card {
            background: white;
            border: 1px solid #ddd;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: flex;
            flex-direction: row;
            height: 200px; /* A fixed height for alignment */
        }

        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        }

        /* --- Card Image Section --- */
        .product-card .product-image {
            width: 45%;
            height: 100%;
            object-fit: cover;
            border-right: 1px solid #eee; /* Vertical separator */
        }

        /* --- Card Content Section --- */
        .product-content {
            width: 55%;
            padding: 1rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between; /* Pushes info up and buttons down */
        }

        .product-info {
            padding-bottom: 0.5rem;
            margin-bottom: 0.5rem;
            border-bottom: 1px solid #eee; /* Separator between info and buttons */
        }

        .product-name {
            font-size: 1.1rem;
            font-weight: 600;
            color: #333;
            margin-bottom: 0.25rem;
        }

        .product-price {
            font-size: 1.1rem;
            font-weight: bold;
            color: #e91e63;
            margin-bottom: 0.25rem;
        }

        .product-seller {
            font-size: 0.85rem;
            color: #777;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .product-rating {
            color: #f8d64e; /* Gold color for stars */
            font-size: 0.9rem;
        }

        .product-buttons {
            display: flex;
            gap: 0.5rem;
        }

        .product-buttons button {
            flex: 1;
            padding: 8px;
            font-size: 0.8rem;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            transition: background-color 0.3s ease;
        }

        .product-buttons .add-to-cart {
            background-color: #ff7f50;
            color: white;
        }

        .product-buttons .add-to-cart:hover {
            background-color: #ff6347;
        }

        .product-buttons .buy-now {
            background-color: #28a745;
            color: white;
        }

        .product-buttons .buy-now:hover {
            background-color: #218838;
        }

        .see-more-btn {
            background-color: transparent;
            border: none;
            color: #c2185b;
            cursor: pointer;
            font-size: 1.2rem;
            font-weight: bold;
            padding: 1rem 2rem;
            margin-top: 2rem;
            transition: color 0.3s ease;
            display: none; /* Initially hidden, JS will manage this */
        }

        .see-more-btn:hover {
            color: #ad1457;
        }

        /* --- Filter Popup --- */
        .filter-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .filter-icon {
            cursor: pointer;
            padding: 10px;
            color: #888;
            font-size: 1.2rem;
            transition: color 0.2s ease;
        }

        .filter-wrapper:hover .filter-icon {
            color: #c2185b;
        }

        .filter-popup {
            display: none; /* Hidden by default */
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 10px;
            width: 300px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
            padding: 1.5rem;
            z-index: 1001;
            text-align: left;
        }

        .filter-wrapper:hover .filter-popup {
            display: block; /* Show on hover */
        }

        .filter-popup h4 {
            margin-top: 0;
            margin-bottom: 1.5rem;
            color: #333;
            font-size: 1.2rem;
            border-bottom: 1px solid #eee;
            padding-bottom: 0.75rem;
        }

        .filter-section {
            margin-bottom: 1.5rem;
        }

        .filter-section h5 {
            margin-top: 0;
            margin-bottom: 0.75rem;
            color: #555;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .category-filters, .star-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .category-btn, .star-filter-btn {
            background: #f0f0f0;
            border: 1px solid #ddd;
            border-radius: 20px;
            padding: 5px 12px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .category-btn.active, .star-filter-btn.active {
            background: #c2185b;
            color: white;
            border-color: #c2185b;
        }

        #price-slider {
            width: 100%;
            cursor: pointer;
        }

        .seller-filter-input {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 0.9rem;
            box-sizing: border-box;
            outline: none;
            transition: border-color 0.2s ease;
        }

        .seller-filter-input:focus {
            border-color: #c2185b;
        }

        .price-label {
            text-align: right;
            font-size: 0.9rem;
            color: #555;
            margin-top: 0.5rem;
        }

       /* --- Q&A Dropdown Menu --- */
        .chat-menu-wrapper {
            position: relative;
            height: 100%;
            display: flex;
            align-items: center;
        }

        .chat-dropdown {
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 10px;
            width: 650px;
            height: 550px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            z-index: 1001;
            overflow: hidden;
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px);
            transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
            display: flex;
            flex-direction: column;
        }

        .chat-main-content {
            display: flex;
            flex-grow: 1;
            overflow: hidden; /* Prevent child overflow from breaking layout */
        }

        .chat-dropdown.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .qa-header {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #eee;
            text-align: center;
        }

        .qa-header h4 {
            margin: 0;
            color: #c2185b;
            font-size: 1.1rem;
        }

        .chat-feed-panel {
            flex: 2; /* Takes up 2/3 of the space */
            display: flex;
            flex-direction: column;
            border-right: 1px solid #eee;
            overflow: hidden;
        }

        .qa-list {
            flex-grow: 1;
            overflow-y: auto;
            padding: 1rem;
        }

        .qa-item {
            margin-bottom: 1.5rem;
        }

        .qa-question, .qa-answer {
            display: flex;
            align-items: flex-start;
            gap: 10px;
        }

        .qa-answer {
            margin-top: 0.75rem;
            padding-left: 20px; /* Indent the answer */
        }

        .qa-avatar {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .qa-content {
            background-color: #f1f0f0;
            padding: 0.75rem 1rem;
            border-radius: 15px;
        }

        .qa-answer .qa-content {
            background-color: #fdeaf1; /* Light pink for answers */
        }

        .qa-content p {
            margin: 0;
            line-height: 1.4;
            font-size: 0.9rem;
        }

        .qa-meta {
            font-size: 0.75rem;
            color: #888;
        }

        .qa-form {
            padding: 1rem;
            flex-shrink: 0; /* Prevent form from shrinking */
            border-top: 1px solid #eee;
            display: flex;
            gap: 10px;
        }

        .qa-form input {
            flex-grow: 1;
            border: 1px solid #ddd;
            border-radius: 20px;
            padding: 10px 15px;
            outline: none;
        }

        .qa-form button {
            background: #e91e63;
            color: white;
            border: none;
            border-radius: 20px;
            padding: 0 15px;
            cursor: pointer;
            font-weight: bold;
            transition: background-color 0.2s ease;
        }

        .qa-form button:hover {
            background-color: #c2185b;
        }

        .qa-form input:disabled {
            background-color: #f8f9fa;
            cursor: not-allowed;
        }

        .qa-form button:disabled {
            background-color: #ccc;
            cursor: not-allowed;
        }

        .qa-actions {
            padding-left: 45px; /* Align with qa-content, accounting for gap */
            margin-top: 8px;
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .answer-btn {
            background: transparent;
            border: none;
            color: #888;
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            transition: color 0.2s ease;
            padding: 4px 8px;
            border-radius: 5px;
        }

        .answer-btn:hover {
            color: #c2185b;
            background-color: #fdeaf1;
        }

        .qa-like-btn {
            background: transparent;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            color: #888;
            transition: all 0.2s ease;
            padding: 4px 8px;
            border-radius: 5px;
        }

        .qa-like-btn:hover {
            color: #c2185b;
            background-color: #fdeaf1;
        }

        .qa-like-btn .fa-heart {
            font-weight: 400; /* Regular (outline) heart icon */
        }

        .qa-like-btn.liked .fa-heart {
            font-weight: 900; /* Solid heart icon */
            color: #e91e63;
        }

        .qa-like-count {
            font-weight: 500;
            min-width: 10px; /* Ensure space for the number */
        }

        .answer-form {
            display: flex;
            gap: 10px;
            padding: 0.75rem 1rem 0 55px; /* Align with qa-content */
        }

        .answer-form input {
            flex-grow: 1;
            border: 1px solid #ddd;
            border-radius: 15px;
            padding: 8px 12px;
            font-size: 0.85rem;
            outline: none;
        }

        .answer-form button {
            background: #28a745;
            color: white;
            border: none;
            border-radius: 15px;
            padding: 0 12px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .answer-form button:hover {
            background: #218838;
        }

       /* --- Notification Bubble --- */
        .chat-menu-wrapper > a {
            position: relative;
            padding-right: 10px; /* Space for the bubble */
        }

        .notification-bubble {
            position: absolute;
            top: 12px;
            right: -2px;
            width: 10px;
            height: 10px;
            background-color: #ff3d00;
            border-radius: 50%;
            border: 2px solid white;
            transform: scale(0);
            transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
            pointer-events: none;
        }

        .notification-bubble.visible {
            transform: scale(1);
        }

        /* --- Recent Message Preview --- */
        .recent-message-preview {
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 10px;
            width: 280px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.15);
            z-index: 997;
            cursor: pointer;
            padding: 1rem;
            border: 1px solid #eee;
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px);
            transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        }

        .recent-message-preview.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .recent-message-preview .preview-header {
            font-weight: bold;
            color: #c2185b;
            margin-bottom: 0.5rem;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .recent-message-preview .preview-text {
            font-size: 0.9rem;
            color: #555;
            margin: 0 0 0.5rem;
            line-height: 1.4;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .recent-message-preview .preview-meta {
            font-size: 0.75rem;
            color: #888;
        }

        .qa-content-wrapper {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            width: 100%;
        }

        .qa-delete-btn {
            background: transparent;
            border: none;
            color: #aaa;
            cursor: pointer;
            font-size: 0.9rem;
            padding: 5px;
            margin-left: 10px;
            opacity: 0.5;
            transition: opacity 0.2s, color 0.2s;
        }

        .qa-delete-btn:hover {
            opacity: 1;
            color: #d6336c;
        }

        .qa-delete-btn .fas { pointer-events: none; } /* Make icon non-clickable */

        .chat-trending-panel {
            flex: 1; /* Takes up 1/3 of the space */
            padding: 1rem;
            background-color: #f8f9fa;
            overflow-y: auto;
        }

        .chat-trending-panel h5 {
            margin-top: 0;
            margin-bottom: 1rem;
            color: #555;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .chat-trending-panel h5 .fa-fire {
            color: #ff6f00;
        }

        .trending-topics-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .trending-topics-list li {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 0.5rem;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s ease;
            border-radius: 5px;
        }

        .trending-topics-list li:hover {
            background-color: #f1f3f5;
        }

        .trending-topic-name {
            font-weight: 500;
            color: #c2185b;
            text-transform: capitalize;
        }

        .trending-topic-count {
            font-size: 0.8rem;
            color: #888;
            background-color: #e9ecef;
            padding: 2px 6px;
            border-radius: 10px;
        }

        .trending-topics-list .no-trends {
            color: #999;
            font-style: italic;
            cursor: default;
        }
        .trending-topics-list .no-trends:hover {
            background-color: transparent;
        }

        .qa-main-block {
            display: flex;
            flex-direction: column;
            width: 100%;
        }

        .qa-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 8px;
            padding: 0 5px;
        }

       /* --- Profile Popup --- */
        .profile-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(5px);
            z-index: 1010;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .profile-overlay.visible {
            opacity: 1;
            visibility: visible;
        }

        .profile-popup {
            background: #fff;
            padding: 2rem 2.5rem;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            text-align: center;
            position: relative;
            width: 320px;
            transform: scale(0.95);
            transition: transform 0.3s ease;
        }

        .profile-overlay.visible .profile-popup {
            transform: scale(1);
        }

        .profile-popup {
            width: 400px; /* Make popup wider for tabs */
        }

        .profile-close-btn {
            position: absolute;
            top: 10px;
            right: 15px;
            background: transparent;
            border: none;
            font-size: 1.8rem;
            color: #aaa;
            cursor: pointer;
            transition: color 0.2s ease;
        }

        .profile-close-btn:hover {
            color: #333;
        }

        .profile-header {
            margin-bottom: 1.5rem;
        }

        .profile-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            margin: 0 auto 0.75rem;
            background-color: #f0f0f0;
            border: 4px solid #e91e63;
            overflow: hidden;
        }

        .profile-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        #profile-name {
            margin: 0 0 0.25rem;
            font-size: 1.4rem;
            color: #333;
        }

        #profile-email {
            margin: 0;
            font-size: 0.9rem;
            color: #777;
        }

        .profile-tabs {
            display: flex;
            border-bottom: 1px solid #eee;
            margin-bottom: 1.5rem;
        }

        .profile-tab-btn {
            flex: 1;
            padding: 12px;
            background: transparent;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-size: 1rem;
            color: #666;
            transition: all 0.2s ease;
            margin-bottom: -1px; /* Overlap the container's border */
        }

        .profile-tab-btn:hover {
            background-color: #f8f9fa;
            color: #333;
        }

        .profile-tab-btn.active {
            color: #c2185b;
            border-bottom-color: #c2185b;
            font-weight: bold;
        }

        .profile-tab-content {
            display: none;
        }

        .profile-tab-content.active {
            display: block;
        }

        #my-questions-list {
            list-style: none;
            padding: 0;
            margin: 0;
            max-height: 250px;
            overflow-y: auto;
            text-align: left;
        }

        #my-questions-list li {
            padding: 12px 15px;
            border-bottom: 1px solid #f0f0f0;
            font-size: 0.9rem;
            color: #555;
        }

        #my-questions-list li:last-child {
            border-bottom: none;
        }

        #my-questions-list .question-meta {
            display: block;
            font-size: 0.75rem;
            color: #999;
            margin-top: 4px;
        }

        .logout-btn {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 10px;
            background-color: #d6336c;
            color: white;
            font-size: 1rem;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s ease, transform 0.2s ease;
        }

        .logout-btn:hover {
            background-color: #c2185b;
            transform: translateY(-2px);
        }

/* --- Wishlist Popup --- */
.wishlist-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1010;
}
.wishlist-popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.wishlist-popup-content {
    background: #f9f9f9;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 950px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.wishlist-popup-overlay.visible .wishlist-popup-content {
    transform: scale(1);
}
.wishlist-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.wishlist-popup-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.wishlist-popup-header h2 .fa-heart {
    color: #e91e63;
}
.wishlist-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s ease;
    line-height: 1;
}
.wishlist-close-btn:hover {
    color: #333;
}
.wishlist-grid {
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 5px; /* Padding for focus outlines and scrollbar */
}

/* Styling for individual wishlist item cards */
.wishlist-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wishlist-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.wishlist-item-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.wishlist-item-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.wishlist-item-info {
    padding: 1rem 1rem 0; /* No bottom padding, actions will have it */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.wishlist-item-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    flex-grow: 1; /* Allow name to take up space */
}

.wishlist-item-price {
    font-weight: bold;
    color: #c2185b;
    font-size: 1.2rem;
    margin-top: auto; /* Pushes price to the bottom of its container */
    padding-top: 0.5rem;
}

.wishlist-item-actions {
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    margin-top: auto; /* Pushes actions to the bottom of the card */
    border-top: 1px solid #f0f0f0;
}

.wishlist-item-actions .btn-upload,
.wishlist-item-actions .btn-remove {
    flex-grow: 1;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.wishlist-item-actions .btn-upload {
    background-color: #e91e63;
    color: white;
}

.wishlist-item-actions .btn-upload:hover {
    background-color: #c2185b;
    transform: translateY(-2px);
}

.wishlist-item-actions .btn-remove {
    background-color: #fbe9e7;
    color: #d84315;
    border-color: #ffccbc;
}

.wishlist-item-actions .btn-remove:hover {
    background-color: #ffccbc;
    color: #bf360c;
}

/* Empty state for the wishlist */
.wishlist-empty-message {
    grid-column: 1 / -1; /* Span all columns */
    text-align: center;
    padding: 4rem 2rem;
    color: #777;
    font-size: 1.1rem;
}

.wishlist-empty-message .fa-heart-crack {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
    display: block;
}

/* --- Wishlist Button on Product Cards --- */
.product-image-container {
    position: relative;
}
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #333;
    transition: background-color 0.2s, color 0.2s;
    backdrop-filter: blur(2px);
}
.wishlist-btn:hover {
    background-color: #fff;
}
.wishlist-btn.active .fa-heart {
    color: #e53935; /* Red for active wishlist item */
}

/* --- Wishlist Button on Product Detail Page --- */
.product-actions {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}
.product-actions .add-to-cart-btn {
    flex-grow: 1;
}
.wishlist-btn-detail {
    padding: 0 1rem;
    font-size: 1.5rem;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    color: #555;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wishlist-btn-detail:hover {
    background-color: #e7e7e7;
}
.wishlist-btn-detail.active .fa-heart {
    color: #e53935;
}

/* --- General Product Card Restructuring --- */
.product-card-link, .product-name-link {
    text-decoration: none;
    color: inherit;
}
.product-name-link:hover .product-name {
    color: #c2185b;
}

/* --- Responsive Navbar Adjustments --- */

.navbar-brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    body {
        padding-top: 0; /* Remove padding for fixed navbars */
    }

    /* Make navbars static and stack them, EXCEPT on pages with the special fixed header */
    body:not(.page-homepage) .navbar,
    body:not(.page-homepage) .secondary-header {
        position: static;
        flex-direction: column;
        height: auto;
        padding: 15px 5vw;
        gap: 15px;
        /* The aggressive removal of box-shadow and border has been reverted as requested. */
        /* This allows other pages to have shadows or borders if defined elsewhere. */
    }

    .secondary-header {
        padding-top: 0;
    }

    .navbar .navbar-brand-container {
        width: 100%;
        justify-content: space-between;
    }

    /* The logic to show/hide the hamburger menu is now in mobile-menu.css */
    .search-container {
        width: 100%;
        box-sizing: border-box;
        box-shadow: none !important; /* Add this to remove the shadow on mobile */
    }
}
.product-buttons .add-to-cart-btn {
    flex-grow: 1;
    background-color: #e91e63;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s;
}
.product-buttons .add-to-cart-btn:hover {
    background-color: #c2185b;
    transform: translateY(-2px);
}

/* --- Info Card Section --- */
.info-card-section {
    color: #c2185b;
}

/* --- Shopping Cart Popup --- */
/* Re-use wishlist styles for consistency, but with cart-specific overrides */
#cart-popup-overlay .wishlist-popup-header h2 .fa-shopping-cart {
    color: #c2185b;
}

#cart-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding: 5px;
    min-height: 200px; /* Ensure it has some height even when empty */
    flex-grow: 1;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.cart-item-details {
    flex-grow: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.cart-item-name {
    font-weight: 600;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    color: #555;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-quantity input {
    width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    -moz-appearance: textfield; /* Firefox */
}

/* Hide arrows from number input */
.cart-item-quantity input::-webkit-outer-spin-button, .cart-item-quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-quantity button {
    background: #f0f0f0;
    border: 1px solid #ddd;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
}

.cart-item-remove {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
}

.cart-item-remove:hover {
    color: #e53935;
}

.cart-popup-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total {
    font-size: 1.5rem;
    font-weight: bold;
}

.cart-total span {
    color: #c2185b;
}

.checkout-btn {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.checkout-btn:hover:not(:disabled) {
    background-color: #218838;
}

.checkout-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.cart-empty-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #777;
    font-size: 1.1rem;
}

.cart-empty-message .fa-cart-shopping {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
    display: block;
}

/* Cart Counter Badge */
.navbar ul a, .mobile-menu ul a {
    position: relative;
}

.cart-counter {
    position: absolute;
    top: 10px;
    right: 0px;
    background-color: #ff3d00;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.cart-counter.visible {
    transform: scale(1);
}
.checkout-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

.checkout-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #c2185b;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.full-width-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #777;
}

@media (min-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr 1fr;
    }
    #order-summary {
        grid-column: 1 / 2;
    }
    #delivery-and-total {
        grid-column: 2 / 3;
    }
}

.order-summary h2, .delivery-options h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.summary-item {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.summary-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.summary-item .name {
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0;
}

.summary-item .price {
    color: #555;
    margin: 5px 0 0;
}

#delivery-form .option {
    display: flex;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#delivery-form .option:has(input:checked) {
    border-color: #c2185b;
    box-shadow: 0 0 0 2px rgba(194, 24, 91, 0.2);
}

#delivery-form input[type="radio"] {
    margin-top: 4px;
    accent-color: #c2185b;
}

#delivery-form label {
    flex-grow: 1;
    margin-left: 1rem;
    cursor: pointer;
}

#delivery-form label strong {
    display: block;
    margin-bottom: 4px;
}

#delivery-form label span {
    display: block;
    color: #666;
    font-size: 0.9rem;
}

#delivery-form label .price {
    font-weight: bold;
    color: #333;
    margin-top: 8px;
}

.total-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: #555;
}

.total-row.grand-total {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    border-top: 2px solid #eee;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

#proceed-to-payment {
    width: 100%;
    margin-top: 1.5rem;
    padding: 15px;
    font-size: 1.1rem;
    background-color: #28a745;
}
#proceed-to-payment:hover {
    background-color: #218838;
}

/* --- Seller Dashboard Styles --- */
.dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.dashboard-container h1 {
    color: #c2185b;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.dashboard-header p {
    margin: 0.25rem 0 0;
    color: #666;
    font-size: 1rem;
}

.my-products-section {
    margin-top: 2rem;
}

/* --- Seller Dashboard Analytics --- */
.analytics-section {
    margin: 2rem 0;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.analytics-header h2 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 0;
    color: #333;
    border-bottom: none;
    padding-bottom: 0;
}

.analytics-filter select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
}
.analytics-filter select:focus {
    outline: none;
    border-color: #c2185b;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.analytics-card {
    /* Upgraded card styling with flexbox for icon alignment */
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(145deg, #ffffff, #f9f9f9);
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.card-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.card-icon.revenue {
    background: linear-gradient(145deg, #28a745, #218838); /* Green for revenue */
}
.card-icon.sales {
    background: linear-gradient(145deg, #17a2b8, #117a8b); /* Teal for sales */
}

.analytics-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #555;
    font-weight: 600;
}

.analytics-card p {
    margin: 0;
    font-size: 2.2rem;
    font-weight: bold;
    color: #c2185b;
}

.analytics-card.top-products {
    display: block; /* Override flex for this specific card */
    background: #fff; /* Keep it clean white */
    grid-column: 1 / -1; /* Make it span full width on smaller grids */
    padding: 2rem; /* More padding for the list */
}

@media (min-width: 992px) {
    .analytics-card.top-products {
        grid-column: auto; /* Revert to auto on larger screens */
    }
}

.analytics-card.top-products h3 {
    margin-bottom: 1rem;
}

#top-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#top-products-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

#top-products-list li:hover {
    background-color: #f8f9fa;
}

#top-products-list li:last-child {
    border-bottom: none;
}

#top-products-list .product-name {
    color: #c2185b;
    font-weight: 500;
}

#top-products-list .sales-count {
    color: #777;
    font-weight: bold;
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.product-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem 1rem;
    border-top: 1px solid #eee;
    margin-top: 1rem;
}

.action-btn {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: #f8f8f8;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.action-btn .fas {
    font-size: 0.8rem;
}

.btn-edit {
    color: #337ab7;
}
.btn-edit:hover {
    background-color: #e7f1fa;
    border-color: #bce8f1;
}

.btn-delete {
    color: #d9534f;
}
.btn-delete:hover {
    background-color: #fbe9e7;
    border-color: #ffccbc;
}

/* --- Polished Upload/Action Button Style --- */
.btn-upload {
    display: inline-block;
    background: linear-gradient(145deg, #e91e63, #c2185b);
    color: white !important; /* Ensure text is white on <a> tags */
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-bottom: 2rem; /* Give it some space from the content below */
}

.btn-upload:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btn-upload i {
    margin-right: 8px;
}

/* --- Seller Dashboard Orders & Messages Section --- */
.orders-section, .messages-section {
    margin: 2rem 0;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

.orders-section h2, .messages-section h2 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-mark-shipped {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-mark-shipped:hover {
    background-color: #218838;
}

/* --- My Orders Page --- */
.my-orders-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
}

.my-orders-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #c2185b;
}

#orders-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.buyer-order-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.buyer-order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.order-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.order-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #333;
}

.order-details p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: #777;
}

.order-pricing {
    text-align: right;
    flex-shrink: 0;
}

.total-cost {
    font-size: 1.4rem;
    font-weight: bold;
    color: #c2185b;
    margin: 0 0 0.5rem 0;
}

.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-completed {
    background-color: #e8f5e9; /* Light green */
    color: #2e7d32;
}

.status-shipped {
    background-color: #e3f2fd; /* Light blue */
    color: #1565c0;
}

.order-actions {
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.order-actions .action-btn {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-view-product {
    background-color: #f1f3f5;
    color: #495057;
}

.btn-view-product:hover {
    background-color: #e9ecef;
}

.btn-contact-seller {
    background-color: #fdeaf1;
    color: #c2185b;
}

.btn-contact-seller:hover {
    background-color: #f8cde0;
}

/* --- Profile Popup Action Link --- */
.profile-action-link {
    display: block;
    text-decoration: none;
    padding: 12px 15px;
    margin: 1rem 0 0; /* Adjusted margin */
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #333;
    font-weight: 500;
    transition: background-color 0.2s ease;
    text-align: left;
}

.profile-action-link:hover {
    background-color: #e9ecef;
}

.profile-action-link i {
    margin-right: 10px;
    color: #c2185b;
    width: 20px;
    text-align: center;
}

/* --- My Orders Page --- */
.my-orders-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
}

.my-orders-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #c2185b;
}

#orders-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.buyer-order-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.buyer-order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.order-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.order-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #333;
}

.order-details p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: #777;
}

.order-pricing {
    text-align: right;
    flex-shrink: 0;
}

.total-cost {
    font-size: 1.4rem;
    font-weight: bold;
    color: #c2185b;
    margin: 0 0 0.5rem 0;
}

.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-completed {
    background-color: #e8f5e9; /* Light green */
    color: #2e7d32;
}

.status-shipped {
    background-color: #e3f2fd; /* Light blue */
    color: #1565c0;
}

.order-actions {
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.order-actions .action-btn {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-view-product {
    background-color: #f1f3f5;
    color: #495057;
}

.btn-view-product:hover {
    background-color: #e9ecef;
}

.btn-contact-seller {
    background-color: #fdeaf1;
    color: #c2185b;
}

.btn-contact-seller:hover {
    background-color: #f8cde0;
}

/* --- Profile Popup Action Link --- */
.profile-action-link {
    display: block;
    text-decoration: none;
    padding: 12px 15px;
    margin: 1rem 0 0; /* Adjusted margin */
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #333;
    font-weight: 500;
    transition: background-color 0.2s ease;
    text-align: left;
}

.profile-action-link:hover {
    background-color: #e9ecef;
}

.profile-action-link i {
    margin-right: 10px;
    color: #c2185b;
    width: 20px;
    text-align: center;
}

/* --- Pagination Controls --- */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-controls .action-btn:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #dee2e6;
}

/* --- Stock Toggle Switch on Seller Dashboard --- */
.product-card-stock-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.stock-status-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.stock-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.stock-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d9534f; /* Red for 'Out of Stock' */
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #28a745; /* Green for 'In Stock' */
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* --- Profile Popup: Conversations List --- */
#my-conversations-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
}

.conversation-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.conversation-list-item:hover {
    background-color: #f8f9fa;
}

.conversation-list-item:last-child {
    border-bottom: none;
}

.conversation-item-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.conversation-item-details {
    flex-grow: 1;
    min-width: 0; /* for text overflow */
}

.conversation-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.conversation-item-user {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.conversation-item-product {
    font-size: 0.8rem;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px; /* Adjust as needed */
}

.conversation-item-last-message {
    font-size: 0.85rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item-last-message.unread {
    font-weight: bold;
    color: #c2185b;
}

/* --- Notification Badges --- */
.profile-tab-btn, #profile-link {
    position: relative; /* Needed for badge positioning */
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background-color: #e53935;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.notification-badge.visible {
    transform: scale(1);
    display: flex;
}

.notification-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    background-color: #e53935;
    border-radius: 50%;
    border: 2px solid rgba(255, 182, 193, 0.7); /* Match navbar background */
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    pointer-events: none;
}

.notification-dot.visible {
    transform: scale(1);
}

/* --- Profile Popup: Conversations List --- */
