:root {
    --primary-green: #248a73;
    --accent-yellow: #ffc107;
    --text-white: #ffffff;
}


/* --- Resets & Global --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { overflow-x: hidden; width: 100%; }
.container { max-width: 1250px; margin: 0 auto; padding: 0 20px; }

/* --- Header Section --- */
.shop-hero {
    background-color: #1b8a73; 
    color: white;
    /* Increase this value until you see the 'Medical Equipment' text appear */
    padding-top: 150px; 
    padding-bottom: 40px; 
    width: 100%;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999; /* Highest priority */
    background-color: #1b8a73; /* Ensure this is solid teal */
    /* This 40px on the left and right ensures icons never touch the edge */
    padding: 15px 40px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* This class will be added/removed by JavaScript */
.nav-links.show {
    display: flex !important;
    flex-direction: column;
    position: fixed; /* Changed from absolute to fixed */
    top: 70px;      /* Adjust to sit right under your fixed nav */
    left: 0;
    width: 100%;
    background-color: #1b8a73;
    padding: 20px;
    z-index: 1000;
}

/* Ensure the hamburger button is visible and styled */
.mobile-toggle {
    display: none; /* Hidden on desktop */
    background: #004a99; color: white; border: none; padding: 10px; border-radius: 5px;
}

/* Your mobile menu needs a z-index */
.nav-links {
    z-index: 1000;
}

/* Ensure the search close icon is visible when active */
.close-icon {
    color: #333; /* Change to white if search bar background is dark */
}

.nav-links { display: flex; list-style: none; gap: 20px; }
.nav-links a { 
    color: white; text-decoration: none; 
    padding-bottom: 5px; border-bottom: 2px solid transparent; 
}
.nav-links a.active, .nav-links a:hover { border-bottom: 2px solid #ffcc00; }


/* --- Search & Icons --- */
.nav-icons { display: flex; align-items: center; gap: 10px; margin-right: 20px; }
.icon-btn { 
    background: none; border: none; color: white; 
    font-size: 18px; cursor: pointer; position: relative; padding: 8px;
}
.icon-btn:hover::after {
    content: ""; position: absolute; bottom: 0; left: 20%; 
    width: 60%; height: 2px; background: #ffcc00;
}

.search-wrapper { 
    display: flex; 
    align-items: center; 
    border-radius: 50px; 
    transition: 0.3s; 
    position: relative; /* CRITICAL for absolute positioning of results */
    overflow: visible !important; /* Ensures suggestions aren't cut off */
}
.search-wrapper.active { background: white; padding: 2px 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);}
.search-input { width: 0; opacity: 0; border: none; outline: none; background: transparent; transition: 0.3s; }
.search-wrapper.active .search-input { width: 180px; opacity: 1; }
.search-wrapper.active .icon-btn { color: #1b8a73; }
/* --- Optimized Search Wrapper --- */


/* --- Professional Suggestion Dropdown --- */
/* The floating dropdown box */
.suggestion-box {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 100%;
    min-width: 280px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 9999;
    display: none;
    border: 1px solid #eee;
}

/* Remove the bullet points seen in your screenshot */
.suggestion-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.suggestion-list li {
    border-bottom: 1px solid #f9f9f9;
}

.suggestion-list li:last-child {
    border-bottom: none;
}

/* Style the links to be clean and dark on the white background */
.suggestion-list li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333 !important;
    font-size: 14px;
    font-weight: 500;
}

.suggestion-list li:hover {
    background-color: #f0f9f7; /* Subtle teal hover */
}

/* The search magnifying glass icon inside the list */
.suggestion-list li i {
    margin-right: 12px;
    color: #1b8a73; /* Your brand green */
    font-size: 13px;
}

.no-results-msg {
    padding: 15px;
    text-align: center;
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .search-wrapper.active .search-input { 
        width: 140px; 
    }
    .suggestion-box {
        position: fixed; /* Fix to screen on mobile */
        top: 70px;
        left: 5%;
        right: 5%;
        width: 90%;
    }
}

/* --- Hero Content --- */
.hero-content {
    display: flex;
    flex-direction: column; /* Stack the top-row and the title */
    gap: 20px;
    margin-top: 20px; /* Extra breathing room below the fixed nav */
}

.hero-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.page-title { font-size: 50px; font-weight: 800; }
.lab-pill { 
    border: 2px solid white; color: white; text-decoration: none;
    padding: 12px 30px; border-radius: 50px; font-weight: 600;
}

.filter-bar { background: #f9f9f9; padding: 20px; border-radius: 12px; margin-bottom: 30px; border: 1px solid #eee; }
.filter-form { display: flex; gap: 15px; flex-wrap: wrap; align-items: flex-end; }
.filter-group { flex: 1; min-width: 150px; }
.filter-group label { display:block; font-size: 11px; font-weight: 700; margin-bottom: 5px; color: #555; text-transform: uppercase; }
.filter-input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.btn-filter { padding: 10px 20px; background: #1b8a73; color: white; border: none; border-radius: 6px; font-weight: 700; cursor: pointer; }

.filter-action-group {
    display: flex;
    align-items: center; /* Vertically centers the text and button */
    gap: 15px;
    height: 42px; /* Matches the height of your input fields */
}

.reset-link {
    font-size: 14px;
    color: #777;
    text-decoration: none;
    transition: color 0.2s;
}

.reset-link:hover {
    color: #1b8a73;
}
/* --- Product Grid --- */
.shop-main { margin-top: 50px; }
.section-title { font-size: 36px; margin-bottom: 30px; }
.product-grid { 
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; 
}

.card-link { text-decoration: none; color: inherit; display: block; }
.image-box { 
    position: relative; background: #f9f9f9; border-radius: 10px; 
    overflow: hidden; padding: 20px; text-align: center;
}
.image-box img { width: 100%; height: auto; transition: 0.3s; }

/* Hover overlay style */
.hover-overlay { 
    position: absolute; bottom: -100%; left: 0; width: 100%; height: 100%;
    background: rgba(27, 138, 115, 0.1); display: flex; align-items: center; justify-content: center;
    transition: 0.4s ease;
}
.product-card:hover .hover-overlay { bottom: 0; }
.plus-btn { 
    background: #1b8a73; color: white; border: none; width: 45px; height: 45px; 
    border-radius: 50%; font-size: 24px; cursor: pointer; 
}

.product-info { padding: 15px 0; text-align: center; }
.price { font-weight: 800; font-size: 20px; margin-top: 5px; }

/* --- Browse More --- */
.browse-row { display: flex; justify-content: flex-end; margin-top: 20px; }
.browse-more { color: #333; text-decoration: none; font-weight: 600; font-size: 16px; transition: 0.3s; }
.browse-more:hover { color: #1b8a73; }

/* --- Mobile Breakpoints --- */
@media (max-width: 992px) {
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .page-title { font-size: 45px; }
    .hero-content { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 500px) {
    .product-grid { grid-template-columns: 1fr; }
}

/* --- Base Styles Cleanup --- */
.top-selling-section, .top-selling {
    position: relative;
    padding: 60px 0;
    overflow: hidden; /* Prevent horizontal scroll on body */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 5%;
}

.section-title { 
    font-size: 32px; 
    font-weight: 700; 
    margin-bottom: 40px; 
    padding-left: 5%; /* Changed to % for responsiveness */
}


/* --- Slider & Grid Layouts --- */
.product-slider, .product-grid {
    display: flex;
    gap: 20px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide scrollbar for clean look */
.product-slider {
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 30px; /* Space for the floating button */
}

.product-slider::-webkit-scrollbar { display: none; }

/* Item Sizing: 4 items on Desktop */
.product-slider .product-item, 
.product-card {
    flex: 0 0 calc(25% - 15px);
    min-width: calc(25% - 15px);
    text-align: center;
    position: relative;
    background: #fff;
}

/* --- Image Handling --- */
.product-img-holder { padding: 20px; position: relative; }
.product-img-holder img { 
    width: 100%; 
    height: 280px; 
    object-fit: contain; 
}

/* --- Floating Button --- */
.add-btn {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.product-card:hover .add-btn { opacity: 1; bottom: -10px; }

/* --- Responsive Media Queries --- */

/* Tablets (1024px and down) */
@media (max-width: 1024px) {
    .section-title { font-size: 28px; }
    .product-slider .product-item, 
    .product-card {
        flex: 0 0 calc(33.333% - 15px); /* 3 items per view */
        min-width: calc(33.333% - 15px);
    }
    .product-img-holder img { height: 220px; }
}

/* Small Tablets / Landscape Phones (768px and down) */
@media (max-width: 768px) {
    .top-selling-section, .top-selling { padding: 40px 0; }
    
    .product-slider .product-item, 
    .product-card {
        flex: 0 0 calc(50% - 10px); /* 2 items per view */
        min-width: calc(50% - 10px);
    }

    /* Hide arrows on mobile to save space, rely on touch swipe */
    .arrow-btn, .slider-arrows { display: none; }
    
    .product-viewport { width: 95%; }
    
    .product-img-holder img { height: 180px; }
    
    /* Make button visible on mobile since there is no 'hover' */
    .add-btn { 
        opacity: 1; 
        bottom: -15px; 
        width: 40px; 
        height: 40px; 
        font-size: 20px; 
    }

    .section-title { padding-left: 15px; font-size: 24px; text-align: center; }
}

/* Mobile Portrait (480px and down) */
@media (max-width: 480px) {
    .product-slider .product-item, 
    .product-card {
        flex: 0 0 85%; /* Shows one card and a peek of the next one */
        min-width: 85%;
    }
    
    .product-img-holder img { height: 160px; }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .scroll-track { width: 120px; }
}
/* Footer Styling */
.main-footer {
    background-color: #fff;
    padding: 60px 5% 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-top: 1px solid #eee;
}

/* Newsletter Section */
.footer-newsletter {
    margin-bottom: 60px;
}

.newsletter-wrap h3 {
    color: #3e5f58;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.newsletter-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
}

.newsletter-inputs input {
    border: 1px solid #ddd;
    padding: 12px 20px;
    border-radius: 8px;
    width: 250px;
}

.send-btn {
    background-color: #3e5f58;
    border: none;
    width: 50px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr 1.2fr 1.8fr 1fr;
    gap: 30px;
    padding-bottom: 40px;
}

.footer-column h4 {
    color: #2b8c52;
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 15px;
}

.footer-column ul li a, .contact-col p {
    text-decoration: none;
    color: #444;
    font-size: 14px;
    line-height: 1.6;
}

.contact-col p {
    margin-bottom: 10px;
}

/* Social Icons */
.social-col ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon {
    background: #e1ede8;
    color: #3e5f58;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Bottom Bar */
.footer-policies {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 20px 0;
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.footer-policies a {
    text-decoration: none;
    color: #3e5f58;
    font-weight: 500;
}

.footer-copyright {
    display: flex;
    justify-content: center; /* This centers horizontally */
    align-items: center;     /* This centers vertically */
    flex-wrap: wrap;         /* Allows it to stack nicely on small mobile screens */
    color: #666;
    font-size: 14px;
    padding: 20px;           /* Adds some space around the section */
}

.footer-copyright p {
    margin: 0;               /* Removes default paragraph spacing */
}

.footer-copyright a {
    text-decoration: none !important; /* Forces removal of the line */
    color: #2b8c52;
    transition: color 0.3s ease;
}

.footer-copyright a:hover {
    color: #517d63;
}



/* Mobile Footer */
@media (max-width: 768px) {
    .footer-content { grid-template-columns: 1fr; } /* Stacks all columns on mobile */
    .newsletter-bar { flex-direction: column; gap: 20px; text-align: center; }
}

/* --- Global Mobile Refinements --- */
@media (max-width: 1024px) {
    .container { padding: 0 15px; }
    .footer-grid { 
        grid-template-columns: repeat(3, 1fr); 
        gap: 40px;
    }
}

/* --- Tablet & Small Desktop --- */
@media (max-width: 992px) {
    /* Header & Hero */
    .navbar { margin-bottom: 40px; }
    .nav-links { display: none; } /* Consider adding a JS toggle for this */
    .mobile-toggle { display: block; }
    .page-title { font-size: 48px; }
    .hero-content { flex-direction: column; align-items: flex-start; gap: 30px; }

    /* Product Grid & Sliders */
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .product-slider .product-item { min-width: calc(50% - 15px); }
    .product-card { flex: 0 0 calc(50% - 10px); }
    
    /* Section Titles */
    .section-title { padding-left: 0; text-align: center; font-size: 28px; }
}

/* --- Mobile Devices --- */
@media (max-width: 768px) {
    /* Newsletter */
    .newsletter-inputs { flex-direction: column; width: 100%; align-items: stretch; }
    .newsletter-inputs input { width: 100%; }
    .send-btn { width: 100%; height: 50px; }

    /* Footer Grid - 2 columns */
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-policies { flex-wrap: wrap; gap: 15px; justify-content: center; }

    /* Slider Adjustments */
    .product-viewport { width: 100%; }
    .arrow-btn { display: none; } /* Hide arrows on mobile, rely on touch scroll */
    .product-slider { padding-left: 10px; padding-right: 10px; }
}

/* --- Small Mobile Devices --- */
@media (max-width: 500px) {
    .page-title { font-size: 36px; }
    
    /* Product Grid - 1 column */
    .product-grid { grid-template-columns: 1fr; }
    
    /* Slider - mostly 1.5 items to show it's scrollable */
    .product-slider .product-item,
    .product-card { flex: 0 0 85%; }

    /* Footer - Single Column */
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .social-col ul li a { justify-content: center; }
    
    .shop-hero { padding: 20px 0 60px 0; }
    .add-btn { opacity: 1; bottom: -10px; width: 40px; height: 40px; } /* Always show button on mobile as there is no hover */
}

/* Base state: Hidden and shrunk */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffc107; /* Your accent yellow */
    color: black;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* This keeps it hidden until the first click */
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

/* --- RESPONSIVE MEDIA QUERIES --- */

/* TABLETS */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .company-name-heading {
        font-size: 1.5rem;
    }
}
/* --- UPDATED MOBILE FIXES --- */

@media (max-width: 768px) {
    /* 1. Force the Hero and Main to be full width */
    .shop-hero, .shop-main {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden;
    }

    /* 2. Fix the Hero Branding alignment */
    .hero-content {
        padding: 40px 20px 80px 20px; /* Give text some breathing room from the edges */
        text-align: left;
    }

    .hero-top-row {
        flex-direction: column;
        align-items: flex-start; /* Align branding to the left as per screenshot */
        gap: 15px;
    }

    .page-title {
        font-size: 2.5rem;
        margin-top: 10px;
    }

    /* 3. The Filter Bar Box */
    .filter-bar {
        width: 90%; /* Keeps it from touching the very edge of the screen */
        margin: -50px auto 40px auto; /* Centered with overlap */
        padding: 20px;
        box-sizing: border-box;
    }

    .filter-form {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-input {
        width: 100% !important;
        box-sizing: border-box;
        height: 45px;
    }

    /* Action buttons side-by-side or stacked */
    .filter-action-group {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-top: 5px;
    }

    /* 4. Product Section Alignment */
    .product-section {
        padding: 0 15px; /* Adds padding so products don't touch screen edges */
    }

    .section-title {
        font-size: 1.6rem;
        text-align: left;
        margin-left: 5px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* Maintains 2-column grid from your image */
        gap: 12px;
    }

    /* Ensure product cards and images scale down correctly */
    .product-card {
        padding: 10px;
    }

    .image-box {
        height: 160px; /* Reduced height for mobile to keep them side-by-side */
    }

    .product-info h3 {
        font-size: 0.9rem;
        line-height: 1.2;
    }
}

/* Fix for very small screens (iPhone SE, etc.) */
@media (max-width: 380px) {
    .product-grid {
        grid-template-columns: 1fr; /* Stack products on very narrow screens */
    }
    
    .image-box {
        height: 220px;
    }
}

/* Active state: Visible and popped up */
.cart-badge.show {
    opacity: 1;
    transform: scale(1);
}