/* Custom Font Utilities for new variants */
.font-poppins {
    font-family: 'Poppins', sans-serif;
    font-weight: 500; /* Setting default to medium (500) as requested */
}

/* Custom CSS for exact visual replication and specific elements */
:root {
    --color-primary-dark: #222222; /* Dark text/accents */
    --color-text-light: #FFFFFF;
     --color-stock-out: #dc2626;
    --color-accent-sale: #84cc16; /* Lime color for SALE badge (Tailwind lime-500) */
    --color-gray-background: #F8F8F8; /* Light gray for main background */
    --color-card-background: #FFFFFF; /* White for product cards */
    --color-border-light: #E0E0E0;
    --color-text-gray: #666666;
    --color-text-dark-gray: #333333;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-gray-background);
    color: var(--color-text-dark-gray);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 300; /* Default body font weight to light for lighter look as per image */
}

/* Specific styles for the FANAACS logo - matching the image's appearance */
.fanaacs-logo-text {
    font-family: 'Inter', sans-serif; /* Using Inter, but visually similar to image */
    font-weight: 700; /* Bold as seen in image */
    letter-spacing: 0.05em; /* Slight letter spacing to match visual */
    color: var(--color-primary-dark);
    font-size: 1.5rem; /* text-2xl, for visual match */
}
/* Small text "FOOTBALL UNIFORM STORE" below FANAACS */
.fanaacs-logo-subtext {
    font-size: 0.5rem; /* Smaller text */
    font-weight: 500;
    color: var(--color-text-dark-gray);
    letter-spacing: 0.025em;
    display: block; /* Ensure it's on a new line */
    line-height: 0.8; /* Adjust line height to bring closer */
}

/* "NEW ARRIVALS" heading is bold as per image */
h2 {
    font-weight: 700; /* Bold */
}

/* Product Card specific styles - NO BOXES, ROUNDED CORNERS, OR SHADOWS */
.product-card {
    border-radius: 0; /* Removed rounded corners */
    overflow: hidden; /* Still needed for image overflow */
    box-shadow: none; /* Removed box-shadow */
    background-color: var(--color-gray-background); /* Changed to match body background */
    display: flex; /* Flex container for image and details */
    flex-direction: column; /* Stack image and details vertically */
    transition: transform 0.2s ease-in-out; /* Keep transform for subtle hover */
    border: none; /* Ensure no explicit borders are set */
}
.product-card:hover {
    transform: translateY(-2px); /* Subtle lift on hover */
    box-shadow: none; /* Ensure no shadow on hover either */
}
.product-card .stockout-badge {
    background-color: var(--color-stock-out); /* Changed to lime color */
    color: var(--color-text-light);
    font-weight: 600;
    padding: 0.1rem 0.4rem; /* Made smaller */
    border-radius: 9999px; /* Made curved/pill-shaped */
    font-size: 0.6rem; /* Made smaller */
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
}
.product-card .sale-badge {
    background-color: var(--color-accent-sale); /* Changed to lime color */
    color: var(--color-text-light);
    font-weight: 600;
    padding: 0.1rem 0.4rem; /* Made smaller */
    border-radius: 9999px; /* Made curved/pill-shaped */
    font-size: 0.6rem; /* Made smaller */
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
}

.product-card .action-icons {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /* opacity: 0; Removed opacity:0 to make it always visible */
    /* pointer-events: none; Removed to make it always clickable */
    transition: opacity 0.2s ease-in-out;
    z-index: 10;
}

.product-card .action-icons button {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 9999px; /* Full rounded for circle */
    padding: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Keep shadow for icons for visibility */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem; /* w-9 */
    height: 2.25rem; /* h-9 */
    color: var(--color-text-dark-gray);
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.product-card .action-icons button:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.product-card .size-tag {
    border: 1px solid var(--color-border-light);
    color: var(--color-text-dark-gray);
    font-size: 0.75rem; /* text-xs */
    padding: 0.25rem 0.4rem; /* Adjusted padding for smaller size tags */
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    min-width: 1.8rem; /* Ensure tappable area on mobile, slightly smaller */
    min-height: 1.8rem; /* Ensure tappable area on mobile, slightly smaller */
    text-align: center;
    display: flex; /* For centering content */
    align-items: center;
    justify-content: center;
    font-weight: 400; /* Lighter font for size tags */
}
.product-card .size-tag:hover {
    background-color: var(--color-border-light);
    border-color: var(--color-text-dark-gray);
}

/* Category button styling */
.category-btn {
    background-color: #ffffff;
    color: var(--color-text-dark-gray);
    font-size: 0.875rem; /* text-sm */
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 9999px; /* Pill shape */
    border: 1px solid var(--color-border-light);
    white-space: nowrap; /* Prevent text wrapping */
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.category-btn:hover {
    background-color: #f3f4f6; /* Light gray on hover */
    border-color: #d1d5db;
}
.category-btn.active {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    border-color: var(--color-primary-dark);
}


/* Mobile Bottom Navigation */
.mobile-nav {
    position: fixed; /* Keep fixed to ensure it's always at the bottom */
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-card-background); /* White background as in image */
    border-top: 1px solid var(--color-border-light);
    box-shadow: none; /* Removed box-shadow */
    z-index: 50; /* Ensure it's on top */
    height: 4.5rem; /* Fixed height for bottom nav */
}
.mobile-nav a, .mobile-nav button { /* Apply styles to buttons too */
    color: var(--color-text-dark-gray);
    transition: color 0.2s ease-in-out;
    display: flex; /* Ensure flex for icon+text alignment */
    flex-direction: column; /* Stack icon and text */
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75rem; /* text-xs */
}
.mobile-nav a.active, .mobile-nav a:hover,
.mobile-nav button.active, .mobile-nav button:hover { /* Apply to active/hover buttons too */
    color: var(--color-primary-dark); /* Darker on active/hover */
}
/* --- style.css (Modified) --- */

/* ... existing styles ... */

/* Progress Bar Styles */
/* Progress Bar Styles (Customized - Right Side, Below Navbar) */
/* Progress Bar Styles (Customized - Horizontal, Inside Navbar) */
#product-progress-bar {
    position: fixed;
    /* Adjusted: This should place the bar at the bottom of your primary header row (logo/search) */
    top: 0rem; 
    left: 0; 
    right: 0;
    width: 100%; 
    height: 5px; 
    background-color: rgba(0, 0, 0, 0.05);
    z-index: 50; 
}
#progress-indicator {
    width: 0%; /* Progress is controlled by width */
    height: 100%; /* Fills the 5px height */
    background-color: var(--color-primary-dark, #222222);
    transition: width 0.1s linear; /* Smooth visual update for width */
}

/* Media Query to prevent overlap with the fixed mobile navigation at the bottom */
@media (max-width: 767px) {
    #product-progress-bar {
        /* Mobile nav is 4.5rem high, so stop the bar 4.5rem from the bottom */
        bottom: 4.5rem; 
    }
}
/* ... rest of the file ... */
/* Specific styles for the scroll-to-top button */
.scroll-to-top-btn {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    border-radius: 9999px;
    width: 3.5rem; /* Larger for easy tap */
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
    z-index: 40; /* Below mobile nav, above content */
    position: fixed;
    bottom: 5.5rem; /* Above mobile nav (4.5rem + 1rem buffer) */
    right: 1rem;
}
.scroll-to-top-btn:hover {
    transform: scale(1.05);
    background-color: #333333;
}

/* Styles for the fixed header and category scrolling */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: white;
    z-index: 30; /* Above main content, below mobile nav */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header-top-row {
    padding: 1rem 1rem; /* py-4 px-4 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0; /* Subtle separator */
}
/* Style for the new image logo */
.fanaacs-logo-img {
    height:   2.5rem; /* Adjust height as needed */
    width: auto; /* Maintain aspect ratio */
}
@media (min-width: 768px) {
    .fanaacs-logo-img {
        height: 3rem; /* Slightly larger on desktop */
    }
}


.header-category-row {
    padding: 0.5rem 0; /* py-2 */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;  /* Hide scrollbar for IE and Edge */
}
.header-category-row::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}
.header-category-row .flex {
    gap: 0.5rem; /* Reduced gap for tighter fit */
    padding: 0 1rem; /* Horizontal padding for categories */
    white-space: nowrap; /* Ensure items stay in one line for scrolling */
    justify-content: flex-start; /* Align categories to the start */
}

/* Adjust main content padding to prevent overlap with fixed header and fixed bottom nav */
main {
    padding-bottom: 6rem; /* Increased padding to clear bottom nav (4.5rem nav + buffer) */
}

/* Image Banner Styles */
.image-banner {
    position: relative;
    width: 100%;
    height: 12rem; /* h-48 */
    overflow: hidden;
    margin-top: 7rem; /* To push it below the fixed header */
}
@media (min-width: 768px) {
    .image-banner {
        height: 16rem; /* h-64 for desktop */
    }
}

.image-banner .carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.image-banner .carousel-image.active {
    opacity: 1;
}

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}
.carousel-dot {
    width: 0.75rem;
    height: 0.75rem;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.carousel-dot.active {
    background-color: white;
}

/* Styles for horizontally scrollable product sections */
.horizontal-scroll-section {
    position: relative; /* Needed for positioning scroll buttons */
    margin-top: 2rem; /* Adjusted spacing from banner */
    margin-bottom: 1rem; /* Reduced gap to next section */
}

.horizontal-scroll-section .product-grid {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
    gap: 0.5rem; /* Gap between cards */
    padding: 0 0.5rem; /* Padding for the scrollable area */
    scroll-behavior: smooth; /* Smooth scrolling */
}
.horizontal-scroll-section .product-grid::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}
.horizontal-scroll-section .product-grid .product-card {
    flex: 0 0 auto; /* Prevent cards from growing or shrinking */
    width: 48%; /* Approx half width on small screens */
    max-width: 12rem; /* Max width for cards on larger screens */
}
@media (min-width: 768px) {
    .horizontal-scroll-section .product-grid .product-card {
        width: 32%; /* Approx third width on medium screens */
    }
}
@media (min-width: 1024px) {
    .horizontal-scroll-section .product-grid .product-card {
        width: 24%; /* Approx quarter width on large screens */
    }
}

.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 9999px; /* Fully rounded */
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.scroll-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.scroll-button.left {
    left: 0.5rem;
}

.scroll-button.right {
    right: 0.5rem;
}
  .cart-count-badge {
            background-color: #000;
            color: #fff;
            font-size: 0.75rem; /* Small font size for the count */
            font-weight: 500;
            line-height: 1;
            padding: 0.25rem 0.5rem;
            border-radius: 9999px; /* Fully rounded circle */
            position: absolute; /* Position relative to the parent icon */
            top: -0.5rem;
            right: -0.5rem;
            min-width: 1.25rem; /* Ensures a circular shape even with a single digit */
            height: 1.25rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }
/* Cart Sidebar Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 100%;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease-in-out;
    z-index: 100; /* Above everything else */
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.cart-sidebar.open {
    right: 0;
    /* For mobile, cover full width */
    width: 100%;
}

@media (min-width: 768px) {
    .cart-sidebar.open {
        /* For desktop, cover 3/5 of the page */
        width: 60%; /* 3/5 of 100% */
    }
}
@media (min-width: 1024px) {
    .cart-sidebar.open {
        /* For desktop, cover 3/5 of the page */
        width: 40%; /* Adjust for larger screens if 3/5 is too wide */
    }
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-right: 1rem;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-quantity button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.cart-item-quantity button:hover {
    background-color: #e0e0e0;
}

.cart-item-remove {
    /* Pushes the button to the far right */
    
    /* Set a fixed size and make it round */
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px; /* Perfectly round */
    
    /* Set the button's background to a solid red */
    background-color: #ef4444 !important; 
    
    /* Center the SVG icon */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Spacing and cursor */
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.cart-item-remove:hover {
    background-color: #dc2626 !important; /* Slightly darker red on hover */
    transform: scale(1.05); /* Slight scale effect */
}

.cart-item-remove svg {
    /* Set the icon color to white to contrast with the red background */
    color: white !important; 
    width: 1.2rem; /* Ensure the SVG has a set size */
    height: 1.2rem;
        pointer-events: none; 

}

.add-to-cart-btn {
    background-color: var(--color-primary-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin-top: 0.5rem; /* Space from sizes */
    width: 100%; /* Make it full width in the card */
    font-weight: 500;
}
.add-to-cart-btn:hover {
    background-color: #333333;
}

/* Message Box for alerts */
.message-box-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.message-box {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 80%;
}

.message-box button {
    margin-top: 15px;
    padding: 8px 15px;
    background-color: var(--color-primary-dark);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* NEW SEARCH OVERLAY STYLES */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95); /* Semi-transparent white */
    z-index: 999; /* Above cart sidebar but below message box */
    display: flex;
    flex-direction: column;
    padding: 1rem;
    transform: translateY(-100%); /* Start off-screen upwards */
    transition: transform 0.3s ease-out;
    -webkit-backdrop-filter: blur(8px); /* For iOS Safari */
    backdrop-filter: blur(8px); /* Blur the content behind the overlay */
    filter: none; /* Ensure the overlay itself is not blurred */
}

.search-overlay.active {
    transform: translateY(0); /* Slide into view */
}

/* Blur effect for background content */
/* Updated: Exclude .product-detail-modal-overlay itself from being blurred */
body.search-active > *:not(.search-overlay):not(.product-detail-modal-overlay):not(.message-box-overlay) {
    filter: blur(5px);
    transition: filter 0.3s ease-out;
    pointer-events: none; /* Prevent interaction with blurred elements */
}
/* Specific elements to ensure they don't get pointer events even if not direct children for blur */
body.search-active #fixed-header,
body.search-active main,
body.search-active footer,
body.search-active .mobile-nav,
body.search-active .scroll-to-top-btn,
body.search-active .cart-sidebar {
    pointer-events: none;
}


.search-overlay-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-overlay-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border-radius: 9999px; /* Pill shape */
    border: 1px solid var(--color-border-light);
    font-size: 1rem;
    outline: none;
    box-shadow: none; /* Remove default input shadow */
    -webkit-appearance: none; /* Remove default appearance for consistency */
    appearance: none;
}
.search-overlay-input::placeholder {
    color: var(--color-text-gray);
}
.search-overlay-input:focus {
    border-color: var(--color-primary-dark);
}

.search-overlay-close-btn {
    background: none;
    border: none;
    color: var(--color-text-dark-gray);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    transition: background-color 0.2s ease-in-out;
}
.search-overlay-close-btn:hover {
    background-color: #f0f0f0;
}

.popular-searches-container {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.popular-searches-container span {
    font-weight: 500;
    color: var(--color-text-dark-gray);
    margin-bottom: 0.5rem;
    display: block;
}

.popular-searches-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.popular-searches-buttons button {
    background-color: var(--color-card-background);
    border: 1px solid var(--color-border-light);
    padding: 0.4rem 0.8rem;
    border-radius: 9999px; /* Pill shape */
    font-size: 0.875rem;
    color: var(--color-text-gray);
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.popular-searches-buttons button:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.search-results-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.search-results-container .product-card {
    display: flex;
    flex-direction: row; /* Horizontal layout for search results */
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border-light);
    background-color: transparent; /* No card background */
    box-shadow: none; /* No shadow */
}
.search-results-container .product-card:last-child {
     border-bottom: none; /* No border for the last item */
     margin-bottom: 0;
     padding-bottom: 0;
}

/* Ensure the image inside still fits its container */
.search-results-container .product-card img {
    width: 100%; /* Make the image fill its 4rem container */
    height: 100%; /* Make the image fill its 4rem container */
    object-fit: cover; /* Maintain aspect ratio and cover the container */
    border-radius: 0.25rem;
    margin-right: 0.75rem; /* Keep spacing */
}

.search-results-container .product-card .p-4 {
    padding: 0; /* Remove internal padding */
    flex-grow: 1;
}
.search-results-container .product-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}
.search-results-container .product-card p {
    font-size: 0.85rem;
}
.search-results-container .product-card .add-to-cart-btn {
    display: none; /* Hide add to cart button in search results */
}
/* Add this new rule or modify your existing one if you have it */
.search-results-container .product-card .product-image-interactive {
    /* Explicitly set width and height for the image container in search results */
    width: 5rem;
    height: 5rem;
    /* Remove the padding-bottom trick if you are setting explicit height */
    padding-bottom: 0;
    /* Ensure no shrinking or growing from flexbox if this container is a flex item */
    flex-shrink: 0;
    flex-grow: 0;
}
.search-results-container .product-card .size-tag {
    display: none; /* Hide size tags in search results */
}
.search-results-container .product-card .action-icons {
    display: none; /* Hide action icons in search results */
}

.more-results-btn {
    display: block;
    width: fit-content;
    margin: 1rem auto;
    padding: 0.75rem 2rem;
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    border-radius: 0.25rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}
.more-results-btn:hover {
    background-color: #333333;
}

/* Product Detail Modal CSS */
.product-detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Darker overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001; /* Above cart/search overlays */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.product-detail-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.product-detail-modal-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content vertically */
    gap: 1rem; /* Space between elements */
}

.product-detail-modal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    object-fit: contain; /* Ensure the entire image is visible within its bounds */
}

.product-detail-modal-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

.product-detail-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
    border-radius: 9999px;
    transition: background-color 0.2s;
}

.product-detail-modal-close:hover {
    background-color: #f0f0f0;
}

/* Styles for sizes in modal */
.modal-sizes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* Adjust gap as needed */
    justify-content: center;
    margin-top: 0.5rem;
    margin-bottom: 0rem;
}

.modal-size-tag {
    border: 1px solid var(--color-border-light);
    color: var(--color-text-dark-gray);
    font-size: 0.875rem; /* Slightly larger than product card size tags */
    padding: 0.4rem 0.8rem;
    border-radius: 0.25rem;
    font-weight: 500;
    background-color: #f8f8f8; /* Light background for clarity */
}

/* Button to product page */
.go-to-product-page-btn {
    background-color: var(--color-primary-dark);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    width: 100%; /* Make it full width in the modal */
    font-weight: 500;
}
.go-to-product-page-btn:hover {
    background-color: #333333;
}

.product-name-multiline {
    /* Allow title to wrap and then truncate with ellipsis if it overflows more than 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show up to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3em; /* Adjust line height as needed */
    max-height: 2.6em; /* max-height = line-height * -webkit-line-clamp */
}

/* Adjust space between size tags */
.product-card .sizes-container {
    display: flex;
    flex-wrap: nowrap; /* Force single line */
    gap: 0.25rem; /* Reduced gap between size tags */
    margin-top: 0.5rem; /* Adjusted top margin */
    margin-bottom: 0.5rem; /* Adjusted bottom margin */
    overflow: hidden; /* Hide overflow to prevent scrollbar */
    white-space: nowrap; /* Ensure text within tags doesn't wrap */
}

.product-card .sizes-container .size-tag {
    white-space: nowrap; /* Prevent text within size tags from wrapping */
    flex-shrink: 0; /* Prevent tags from shrinking */
}

/* Styles for the interactive product image container */
.product-card .product-image-interactive {
    position: relative; /* For absolute positioning of children */
    width: 100%; /* Take full width of parent .product-card */
    padding-bottom: 125%; /* INCREASED to make the height 125% of the width */
    height: 1; /* Important for padding-bottom trick to work */
    overflow: hidden; /* Crucial for cropping content that overflows this square container */
    cursor: pointer; /* Indicate interactivity */
}

.product-card .product-image-interactive img {
    position: absolute; /* Position within the square container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill the square container, cropping as necessary */
}
.most-reviewed-section-container {
    grid-column: 1 / -1; 
    width: 100%;
    margin-bottom: 2rem;
    background-color: transparent; /* Remove background color */
    padding: 0; /* Remove vertical padding */
    border: none; /* Crucial: Remove borders for "no boxing" */
}

/* Container for the horizontally scrollable products */
.most-reviewed-carousel {
    display: flex;
    overflow-x: scroll; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smoother scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
    gap: 1rem; /* Spacing between product cards */
    padding-bottom: 1rem; 
}

.most-reviewed-carousel::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

/* Ensure product cards are correctly sized and shrink-resistant in the carousel */
.most-reviewed-carousel .product-card {
    min-width: 10rem;
    width: 45vw;
    max-width: 15rem;
    flex-shrink: 0;
    /* Remove card-specific border/shadow if they were added previously inside the carousel */
    /* If the product-card class already handles styling, no change is needed here, 
       but if you added overrides for the carousel, remove them: */
    /* border: none; 
       box-shadow: none; */
}

/* Styling for scroll buttons (refined for exact match, no border/box shadow on the button itself) */
.most-reviewed-section-container .relative {
    position: relative;
    /* Add horizontal padding to the relative container to match the overall spacing */
    padding-left: 2rem; 
    padding-right: 2rem;
}


/* 4. SCROLL BUTTON STYLES (BLACK, SEMI-TRANSPARENT, ALWAYS VISIBLE) */
.most-reviewed-section-container .scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    
    /* FIX: Set a BLACK background with 70% opacity */
    background-color: rgba(34, 34, 34, 0.7); /* Using #222222 (color-primary-dark) at 70% opacity */
    
    /* FIX: Set the icon color to white for contrast against the black background */
    color: var(--color-text-light); /* Assuming --color-text-light is white */
    
    border: none; /* Remove border to keep it clean */
    box-shadow: 0 1px 3px rgba(0,0,0,0.15); 
    
    padding: 0.5rem;
    border-radius: 9999px;
    width: 2.5rem;
    height: 2.5rem;
    display: flex !important; /* Ensure visibility on all devices */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.most-reviewed-section-container .scroll-button:hover {
    /* Make slightly less transparent on hover */
    background-color: rgba(34, 34, 34, 0.9);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.most-reviewed-section-container .scroll-button.left {
    left: 0.5rem;
}

.most-reviewed-section-container .scroll-button.right {
    right: 0.5rem;
}

/* Ensure any media queries hiding the buttons are removed. */

@media (max-width: 767px) {
    /* Hide scroll buttons on mobile for easier touch scrolling */
  
    .most-reviewed-section-container .relative {
        padding-left: 0; 
        padding-right: 0;
    }
}