/* ========================================
   PRODUCTS PAGE STYLES - MODERN & RESPONSIVE
   ======================================== */

/* Essential CSS Variables */
:root {
    --header-height: 80px;
    --transition-normal: 0.3s ease;
    --transition-fast: 0.2s ease;
    --border-radius-sm: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.2);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    
         /* Medical theme colors */
     --medical-blue: #3b82f6;
     --medical-light: #60a5fa;
     --medical-dark: #1e40af;
     --primary-blue: #2563eb;
     --primary-cyan: #06b6d4;
    --text-gray-600: #4b5563;
    --text-gray-700: #374151;
    --text-gray-800: #1f2937;
    --text-gray-900: #111827;
    --bg-gray-50: #f9fafb;
    --bg-gray-100: #f3f4f6;
    --bg-gray-200: #e5e7eb;
    --bg-white: #ffffff;
}

/* Dark mode support */
html.dark {
    --text-gray-600: #9ca3af;
    --text-gray-700: #d1d5db;
    --text-gray-800: #e5e7eb;
    --text-gray-900: #f9fafb;
    --bg-gray-50: #111827;
    --bg-gray-100: #1f2937;
    --bg-gray-200: #374151;
    --bg-white: #1f2937;
}

/* ========================================
   HERO SECTION
   ======================================== */

.products-hero-section {
    position: relative;
    min-height: 60vh;
    padding: 8rem 0 6rem;
    margin-top: var(--header-height);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

html.dark .products-hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
}

/* Hero overlay */
.products-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Floating elements */
.products-hero-floating {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
    z-index: 2;
}

.products-hero-floating-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.products-hero-floating-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 20%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Hero content */
.products-hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.products-hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 900;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: products-hero-fadeInUp 1s ease-out 0.3s both;
}

.products-hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    animation: products-hero-fadeInUp 1s ease-out 0.6s both;
}

/* ========================================
   SEARCH AND FILTER SECTION
   ======================================== */

.products-search-section {
    padding: 4rem 0;
    background: var(--bg-gray-50);
    position: relative;
}

html.dark .products-search-section {
    background: var(--bg-gray-100);
}

.products-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.products-search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 2rem;
    align-items: end;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    animation: products-search-fadeIn 1s ease-out 0.9s both;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

html.dark .products-search-form {
    background: var(--bg-gray-200);
    box-shadow: var(--shadow-xl);
}

/* Search input groups */
.search-input-group,
.category-filter-group,
.search-button-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0; /* Prevents flex items from overflowing */
    width: 100%;
}

.search-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-input,
.category-select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--bg-gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--bg-white);
    color: var(--text-gray-900);
}

html.dark .search-input,
html.dark .category-select {
    background: var(--bg-gray-100);
    color: var(--text-gray-100);
    border-color: var(--bg-gray-100);
}

.search-input:focus,
.category-select:focus {
    outline: none;
    border-color: var(--medical-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-button {
    padding: 0.875rem 2rem;
    background: var(--medical-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-button:hover {
    background: var(--medical-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Active filters */
.active-filters {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.active-filters-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-gray-600);
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--medical-blue);
    color: white;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-remove {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.125rem;
    line-height: 1;
}

.filter-remove:hover {
    opacity: 0.8;
}

.clear-filters-link {
    color: var(--medical-blue);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--medical-blue);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
}

.clear-filters-link:hover {
    background: var(--medical-blue);
    color: white;
}

/* ========================================
   PRODUCTS GRID SECTION
   ======================================== */

.products-grid-section {
    padding: 6rem 0;
    background: var(--bg-white);
}

html.dark .products-grid-section {
    background: var(--bg-gray-50);
}

.products-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Results header */
.results-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: products-results-fadeIn 1s ease-out 1.2s both;
}

.results-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-gray-900);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--medical-blue), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-count {
    font-size: 1.125rem;
    color: var(--text-gray-600);
    font-weight: 500;
}

/* No results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    animation: products-no-results-fadeIn 1s ease-out 1.5s both;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    color: var(--text-gray-400);
}

.no-results-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-gray-800);
    margin-bottom: 1rem;
}

.no-results-description {
    font-size: 1.125rem;
    color: var(--text-gray-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.no-results-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--medical-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.no-results-button:hover {
    background: var(--medical-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    animation: products-grid-fadeIn 1s ease-out 1.8s both;
    width: 100%;
}

/* Product cards - Premium Styling */
.product-card {
    background: var(--bg-white);
    border-radius: 1.5rem; /* More rounded corners for modern look */
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04); /* Premium layered shadow */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Ultra-smooth premium transition */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
    animation: products-card-fadeIn 0.8s ease-out both;
    display: flex;
    flex-direction: column;
    height: auto; /* Allow automatic height */
    min-height: 0; /* Allow cards to shrink if needed */
    width: 100%;
    backdrop-filter: blur(10px); /* Glass effect */
    position: relative;
}

html.dark .product-card {
    background: rgba(31, 41, 55, 0.8); /* Semi-transparent dark background */
    border-color: rgba(75, 85, 99, 0.3); /* Subtle dark border */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2); /* Enhanced dark shadow */
    backdrop-filter: blur(20px); /* Stronger glass effect in dark mode */
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02); /* Enhanced lift and scale */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 25px rgba(0, 0, 0, 0.1); /* Premium hover shadow */
    border-color: rgba(59, 130, 246, 0.3); /* Subtle blue border on hover */
}

/* Enhanced dark mode hover effects */
html.dark .product-card:hover {
    transform: translateY(-12px) scale(1.02); /* Same smooth lift and scale */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 8px 25px rgba(0, 0, 0, 0.3); /* Enhanced dark shadow */
    border-color: rgba(59, 130, 246, 0.4); /* More visible blue border in dark mode */
}

.product-card:hover .product-image {
    transform: scale(1.05); /* Enhanced image scale */
}

.product-card:hover .product-main-image {
    transform: scale(1.08); /* Enhanced image zoom */
}

/* Add a subtle gradient overlay on hover */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(6, 182, 212, 0.05));
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

/* Product image section - Dynamic and Responsive */
.product-image {
    position: relative;
    width: 100%;
    height: auto; /* Let height be determined by image aspect ratio */
    min-height: 180px; /* Slightly larger minimum height */
    background: linear-gradient(135deg, #f8fafc, #e2e8f0); /* Subtle gradient background */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Clean image display */
    flex-shrink: 0; /* Prevents image from shrinking */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Ultra-smooth transition */
    border-radius: 1.5rem 1.5rem 0 0; /* Rounded top corners */
}

html.dark .product-image {
    background: linear-gradient(135deg, #374151, #4b5563); /* Enhanced dark gradient */
}

.product-icon {
    width: 80px;
    height: 80px;
    color: var(--medical-blue);
    opacity: 0.8;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0; /* Behind the image when it loads */
    display: none; /* Hide when image loads */
}

html.dark .product-icon {
    color: white; /* White icon in dark mode for better visibility */
}

/* Show icon only when image fails to load */
.product-image:not(:has(.product-main-image)) .product-icon {
    display: block;
}

/* Ensure image container adapts to content on all screen sizes */
@media (max-width: 1024px) {
    .product-image {
        height: auto !important; /* Force height to be auto on smaller screens */
        min-height: 100px; /* Very minimal minimum */
    }
}

@media (max-width: 768px) {
    .product-image {
        height: auto !important; /* Force height to be auto on mobile */
        min-height: 80px; /* Very minimal minimum */
    }
}

@media (max-width: 480px) {
    .product-image {
        height: auto !important; /* Force height to be auto on small mobile */
        min-height: 60px; /* Very minimal minimum */
    }
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-cyan);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
}

/* Product info - Premium Styling */
.product-info {
    padding: 2rem; /* Increased padding for better spacing */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Takes remaining space */
    justify-content: space-between;
    min-height: 0; /* Allows flex item to shrink if needed */
    position: relative;
    z-index: 2; /* Above the hover overlay */
    background: rgba(255, 255, 255, 0.95); /* Subtle background */
    backdrop-filter: blur(10px); /* Glass effect */
}

html.dark .product-info {
    background: rgba(31, 41, 55, 0.95); /* Dark content background */
}

.category-badge-container {
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--medical-blue);
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html.dark .category-badge {
    background: rgba(59, 130, 246, 0.2);
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-gray-900);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product footer */
.product-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-learn-more {
    padding: 0.5rem 1rem;
    background: var(--medical-blue);
    color: white;
    border: 2px solid var(--medical-blue);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-block;
}

.product-learn-more:hover {
    background: var(--medical-dark);
    border-color: var(--medical-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

html.dark .product-learn-more {
    background: var(--medical-blue);
    color: white;
    border-color: var(--medical-blue);
}

html.dark .product-learn-more:hover {
    background: var(--medical-dark);
    border-color: var(--medical-dark);
    color: white;
}

.product-get-quote {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--medical-blue);
    border: 2px solid var(--medical-blue);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-block;
}

.product-get-quote:hover {
    background: var(--medical-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

html.dark .product-get-quote {
    color: var(--medical-light);
    border-color: var(--medical-light);
}

html.dark .product-get-quote:hover {
    background: var(--medical-light);
    color: var(--medical-dark);
    border-color: var(--medical-light);
}

/* ========================================
   CATEGORIES OVERVIEW SECTION
   ======================================== */

.categories-overview-section {
    padding: 6rem 0;
    background: var(--bg-gray-50);
    position: relative;
    overflow: hidden;
}

/* Light pattern overlay for categories section in light mode */
.categories-overview-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots-light" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1.5" fill="rgba(59,130,246,0.15)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots-light)"/></svg>');
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
}

/* Ensure content stays above the pattern in light mode */
.categories-overview-section > * {
    position: relative;
    z-index: 2;
}

html.dark .categories-overview-section {
    background: #0f172a; /* Much darker background */
    position: relative;
    overflow: hidden;
}

/* Cool pattern overlay for categories section in dark mode */
html.dark .categories-overview-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1.5" fill="rgba(59,130,246,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
}

/* Ensure content stays above the pattern */
html.dark .categories-overview-section > * {
    position: relative;
    z-index: 2;
}

.categories-overview-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.categories-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: products-categories-header-fadeIn 1s ease-out 2.1s both;
}

.categories-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-gray-900);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--medical-blue), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.categories-description {
    font-size: 1.125rem;
    color: var(--text-gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* No categories / empty state styling (theme-aware & responsive) */
.no-categories-message {
    /* span full grid */
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2.5rem;
    background: linear-gradient(180deg, var(--bg-white), var(--bg-gray-50));
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--bg-gray-200);
    text-align: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

html.dark .no-categories-message {
    background: linear-gradient(180deg, var(--bg-gray-200), var(--bg-gray-100));
    border-color: var(--bg-gray-100);
    box-shadow: var(--shadow-lg);
}

.no-categories-message:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.no-categories-icon {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.08);
    color: var(--medical-blue);
    flex-shrink: 0;
}

html.dark .no-categories-icon {
    background: rgba(59, 130, 246, 0.12);
}

.no-categories-icon svg {
    width: 48px;
    height: 48px;
}

.no-categories-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-gray-900);
    margin: 0;
}

html.dark .no-categories-title {
    color: var(--text-gray-100);
}

.no-categories-description {
    font-size: 1rem;
    color: var(--text-gray-600);
    max-width: 720px;
    line-height: 1.6;
    margin: 0.25rem 0 0;
}

html.dark .no-categories-description {
    color: var(--text-gray-400);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .no-categories-message {
        padding: 1.75rem;
    }

    .no-categories-icon {
        width: 72px;
        height: 72px;
    }

    .no-categories-icon svg {
        width: 36px;
        height: 36px;
    }

    .no-categories-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 420px) {
    .no-categories-message {
        padding: 1.25rem;
        gap: 0.5rem;
    }

    .no-categories-icon {
        width: 56px;
        height: 56px;
    }

    .no-categories-icon svg {
        width: 28px;
        height: 28px;
    }

    .no-categories-title {
        font-size: 1.125rem;
    }
}

/* Category cards */
.category-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--bg-gray-200);
    animation: products-category-card-fadeIn 0.8s ease-out both;
}

html.dark .category-card {
    background: rgba(31, 41, 55, 0.8); /* Semi-transparent dark background like blog cards */
    border-color: rgba(75, 85, 99, 0.3); /* Subtle dark border */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2); /* Enhanced dark shadow */
    backdrop-filter: blur(20px); /* Glass effect */
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}


.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 50%;
    color: var(--medical-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

html.dark .category-icon {
    background: rgba(59, 130, 246, 0.3);
    color: white; /* White icons in dark mode for better visibility */
}

.category-icon svg {
    width: 100%;
    height: 100%;
}

.category-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-gray-900);
    margin-bottom: 1rem;
}

html.dark .category-name {
    color: var(--text-gray-100);
}

.category-description {
    font-size: 0.875rem;
    color: var(--text-gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

html.dark .category-description {
    color: var(--text-gray-400);
}

.category-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--medical-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-link:hover {
    background: var(--medical-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

html.dark .category-link {
    background: var(--medical-blue);
    color: white;
}

html.dark .category-link:hover {
    background: var(--medical-dark);
    color: white;
}

/* ========================================
   CTA SECTION
   ======================================== */

.products-cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--medical-blue), var(--primary-blue));
    text-align: center;
    position: relative;
    overflow: hidden;
}

html.dark .products-cta-section {
    background: linear-gradient(135deg, var(--medical-dark), var(--medical-blue));
}

.products-cta-container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.products-cta-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: products-cta-fadeInUp 1s ease-out 2.4s both;
}

.products-cta-description {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: products-cta-fadeInUp 1s ease-out 2.7s both;
}

.products-cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: products-cta-fadeInUp 1s ease-out 3s both;
}

.products-cta-primary,
.products-cta-secondary {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
    min-width: 200px;
    text-align: center;
}

.products-cta-primary {
    background: white;
    color: var(--medical-blue);
    border: 2px solid white;
}

.products-cta-primary:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.products-cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.products-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

html.dark .products-cta-primary {
    background: white;
    color: var(--medical-dark);
    border-color: white;
}

html.dark .products-cta-primary:hover {
    background: transparent;
    color: white;
    border-color: white;
}

html.dark .products-cta-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.8);
}

html.dark .products-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

/* ========================================
   PRODUCT MODAL
   ======================================== */

.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    pointer-events: none;
    background: rgba(0, 0, 0, 0.5); /* Debug: Add background to see if modal exists */
}

.product-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.product-modal:not(.hidden),
.product-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}



.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    animation: modalOverlayFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalOverlayFadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px) saturate(100%);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(20px) saturate(180%);
    }
}

.modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 95%;
    max-width: 1000px;
    max-height: 95vh;
    overflow-y: auto;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1002;
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.9) translateY(0);
    }
}

.product-modal:not(.hidden) .modal-container {
    transform: translate(-50%, -50%) scale(1);
}

.modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 
        0 32px 64px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    z-index: 1001;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(30px) saturate(180%);
    display: flex;
    flex-direction: column;
    min-height: 600px;
    transform: translateZ(0);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, transparent 50%, rgba(59, 130, 246, 0.01) 100%);
    pointer-events: none;
    z-index: 1;
}

html.dark .modal-content {
    background: #232a36 !important;
    color: #f3f4f6 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 2px 8px rgba(0,0,0,0.4);
    border: 2px solid #374151;
    backdrop-filter: blur(30px) saturate(180%);
}

.modal-header {
    padding: 2.5rem 3rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: var(--text-gray-900);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%, rgba(59, 130, 246, 0.02) 100%);
    pointer-events: none;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.2) 50%, transparent 100%);
}

html.dark .modal-header {
    background: #232a36;
    color: #f3f4f6;
    border-bottom: 1px solid #374151;
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    position: relative;
    z-index: 3;
    letter-spacing: -0.03em;
    background: none;
    color: var(--text-gray-900);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.2;
}
html.dark .modal-title {
    color: #f3f4f6;
    background: none;
    -webkit-text-fill-color: #f3f4f6;
    text-shadow: 0 2px 8px #111827;
}
}

.modal-close {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid rgba(0, 0, 0, 0.08);
    font-size: 1.125rem;
    color: var(--text-gray-600);
    cursor: pointer;
    padding: 0;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--medical-blue);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.modal-body {
    padding: 0;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

/* Modal Image */
.modal-image-container {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin: 0;
    z-index: 2;
}

.modal-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, transparent 100%);
    pointer-events: none;
}

.modal-image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.15) 50%, transparent 100%);
}

html.dark .modal-image-container {
    background: linear-gradient(135deg, var(--bg-gray-100), var(--bg-gray-200));
}

.modal-main-image {
    width: 100%;
    height: auto; /* Let height be determined by image aspect ratio */
    object-fit: contain; /* Shows complete image without cropping */
    object-position: center; /* Centers the image */
    border-radius: 0;
    max-height: 80vh; /* Allow more height for modal images */
}

.modal-main-image-icon {
    width: 80px;
    height: 80px;
    color: var(--medical-blue);
    opacity: 0.8;
}

html.dark .modal-main-image-icon {
    color: white; /* White icon in dark mode for better visibility */
}

/* Modal Content */
.modal-content-details {
    color: var(--text-gray-900);
    padding: 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    z-index: 2;
}
html.dark .modal-content-details {
    background: #232a36;
    color: #e5e7eb;
}
}

.modal-content-details p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-content-details strong {
    color: var(--text-gray-800);
    font-weight: 600;
}
html.dark .modal-content-details strong {
    color: #f3f4f6;
}
}

.modal-description {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2.5rem;
    border-radius: 16px;
    border-left: 6px solid var(--medical-blue);
    margin: 2rem 0 2.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    border: 2px solid rgba(59, 130, 246, 0.1);
    flex: 1;
    backdrop-filter: blur(10px);
}
html.dark .modal-description {
    background: #232a36;
    color: #e5e7eb;
    border-left: 6px solid #06b6d4;
}
}

.modal-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, transparent 100%);
    border-radius: 16px;
    pointer-events: none;
}

html.dark .modal-description {
    background: var(--bg-gray-100);
}

.modal-footer {
    padding: 2.5rem 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

.modal-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.2) 50%, transparent 100%);
}

html.dark .modal-footer {
    background: var(--bg-gray-100);
    border-top-color: var(--bg-gray-100);
}

.modal-close-button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: var(--text-gray-600);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.modal-get-quote-button {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 50%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    box-shadow: 
        0 8px 24px rgba(59, 130, 246, 0.3),
        0 4px 12px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.modal-get-quote-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.modal-get-quote-button:hover::before {
    left: 100%;
}

.modal-close-button:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--medical-blue);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.modal-get-quote-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 16px 32px rgba(59, 130, 246, 0.4),
        0 8px 16px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
}

/* ========================================
   PRODUCT IMAGES
   ======================================== */

.product-main-image {
    width: 100%;
    height: auto; /* Let height be determined by image aspect ratio */
    object-fit: contain; /* Shows complete image without cropping */
    object-position: center; /* Centers the image */
    border-radius: var(--border-radius-sm);
    transition: transform var(--transition-normal);
    display: block; /* Remove absolute positioning */
    z-index: 1;
    max-width: 100%; /* Ensure image doesn't exceed container width */
}

.product-card:hover .product-main-image {
    transform: scale(1.05);
}

.modal-images-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bg-gray-200);
}

html.dark .modal-images-section {
    border-top-color: var(--bg-gray-100);
}

.modal-images-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-gray-900);
    margin-bottom: 1rem;
}

html.dark .modal-images-section h4 {
    color: var(--text-gray-100);
}

.modal-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.modal-image-item {
    aspect-ratio: 1;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 2px solid var(--bg-gray-200);
    transition: all var(--transition-normal);
}

html.dark .modal-image-item {
    border-color: var(--bg-gray-100);
}

.modal-image-item:hover {
    border-color: var(--medical-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.modal-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.modal-product-image:hover {
    transform: scale(1.05);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .products-search-form {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .product-image {
        min-height: 120px; /* Very minimal minimum height for tablets */
    }
}

@media (max-width: 768px) {
    .products-hero-section {
        padding: 6rem 0 4rem;
        min-height: 50vh;
    }
    
    .products-hero-title {
        font-size: 2.5rem;
    }
    
    .products-hero-subtitle {
        font-size: 1.125rem;
    }
    
    .products-search-section,
    .products-grid-section,
    .categories-overview-section,
    .products-cta-section {
        padding: 3rem 0;
    }
    
    .products-search-container,
    .products-grid-container,
    .categories-overview-container {
        padding: 0 1.5rem;
    }
    
    .products-cta-container {
        width: 85%;
        padding: 0 1.5rem;
    }
    
    .products-search-form {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .search-input,
    .category-select {
        width: 100%;
        min-width: 0;
    }
    
    .search-button {
        width: 100%;
        justify-self: stretch;
    }
    
    .results-title,
    .categories-title {
        font-size: 2rem;
    }
    
    .products-cta-title {
        font-size: 2.25rem;
    }
    
    .products-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .products-cta-primary,
    .products-cta-secondary {
        width: 100%;
        max-width: 280px;
    }
    
    .modal-container {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .modal-image-container {
        height: 250px;
        padding: 1rem;
    }
    
    .modal-content-details {
        padding: 1.5rem;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-description {
        padding: 1.5rem;
        font-size: 0.95rem;
        margin: 1rem 0 1.5rem;
    }
    
    .modal-footer {
        padding: 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-get-quote-button,
    .modal-close-button {
        width: 100%;
        max-width: 200px;
    }
    
    .product-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .products-hero-section {
        padding: 4rem 0 3rem;
    }
    
    .products-hero-title {
        font-size: 2rem;
    }
    
    .products-hero-subtitle {
        font-size: 1rem;
    }
    
    .products-search-container,
    .products-grid-container,
    .categories-overview-container {
        padding: 0 1rem;
    }
    
    .products-cta-container {
        width: 90%;
        padding: 0 1rem;
    }
    
    .products-search-form {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .search-input,
    .category-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    .search-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .results-title,
    .categories-title {
        font-size: 1.75rem;
    }
    
    .products-cta-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-card {
        margin: 0;
        max-width: 100%;
    }
    
    .category-card {
        margin: 0 0.5rem;
    }
    
    .product-image {
        min-height: 100px; /* Very minimal minimum height for mobile */
    }
    
    .product-info {
        padding: 1.25rem;
    }
    
    .product-title {
        font-size: 1.125rem;
        line-height: 1.3;
    }
    
    .product-description {
        font-size: 0.875rem;
        -webkit-line-clamp: 2; /* Show fewer lines on mobile */
        line-clamp: 2;
    }
}

/* Extra small screens - ensure search form fits perfectly */
@media (max-width: 360px) {
    .products-search-container {
        padding: 0 0.5rem;
    }
    
    .products-search-form {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .search-input,
    .category-select {
        padding: 0.625rem;
        font-size: 14px;
    }
    
    .search-button {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .search-label {
        font-size: 0.75rem;
    }
    
    .product-image {
        min-height: 80px; /* Very minimal minimum height for very small screens */
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* Medium screens - 2 columns */
@media (min-width: 481px) and (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .product-image {
        min-height: 100px;
    }
}

/* Large mobile screens - 2 columns with better spacing */
@media (min-width: 640px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .product-image {
        min-height: 120px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes products-hero-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes products-search-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes products-results-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes products-no-results-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes products-grid-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes products-card-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes products-categories-header-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes products-category-card-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes products-cta-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ACCESSIBILITY & PERFORMANCE
   ======================================== */

/* Focus states */
.search-input:focus,
.category-select:focus,
.search-button:focus,
.product-learn-more:focus,
.product-get-quote:focus,
.category-link:focus,
.products-cta-primary:focus,
.products-cta-secondary:focus {
    outline: 2px solid var(--medical-blue);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .category-card,
    .products-cta-primary,
    .products-cta-secondary,
    .product-learn-more,
    .product-get-quote,
    .category-link {
        transition: none;
    }
    
    .products-hero-floating {
        animation: none;
    }
    
    .product-card:hover,
    .category-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card,
    .category-card {
        border-width: 2px;
        border-color: var(--text-gray-900);
    }
    
    .search-input,
    .category-select {
        border-width: 2px;
    }
}

/* ==========================================================
   REDESIGNED PRODUCT MODAL (GALLERY + DETAILS)
   Non-destructive: appended so we can migrate progressively
   ========================================================== */

.product-modal.new-modal-active .modal-container { max-width: 1180px; width:100%; margin:4vh auto; padding:0; background:transparent; box-shadow:none; }
.product-modal.new-modal-active .modal-content.new-modal { background: var(--bg-white); border-radius:28px; box-shadow:0 25px 60px -10px rgba(0,0,0,0.35),0 8px 24px rgba(0,0,0,0.18); border:1px solid rgba(0,0,0,0.05); overflow:hidden; display:flex; flex-direction:column; padding:0; position:relative; backdrop-filter:blur(18px) saturate(160%); }
html.dark .product-modal.new-modal-active .modal-content.new-modal { background: linear-gradient(145deg,#1d2530 0%,#12181f 100%); border:1px solid #2d3642; box-shadow:0 25px 60px -12px rgba(0,0,0,0.75),0 8px 24px rgba(0,0,0,0.55); }

.modal-close-icon { position:absolute; top:14px; right:14px; width:46px; height:46px; border-radius:50%; background:rgba(255,255,255,0.85); border:1px solid rgba(0,0,0,0.08); display:flex; align-items:center; justify-content:center; cursor:pointer; color:#111827; font-size:1.25rem; font-weight:600; z-index:30; transition:all .35s cubic-bezier(.4,0,.2,1); backdrop-filter:blur(10px) saturate(160%); }
html.dark .modal-close-icon { background:rgba(45,54,66,0.9); border-color:#2d3642; color:#f3f4f6; }
.modal-close-icon:hover,.modal-close-icon:focus-visible { transform:scale(1.07) rotate(8deg); box-shadow:0 10px 28px rgba(0,0,0,0.22); background:#ffffff; }
html.dark .modal-close-icon:hover,html.dark .modal-close-icon:focus-visible { background:#2f3a48; }

.modal-grid { display:grid; grid-template-columns: minmax(0,1fr) 400px; min-height:560px; max-height:82vh; overflow:hidden; }
@media (max-width:1100px){ .modal-grid { grid-template-columns:minmax(0,1fr) 360px; } }
@media (max-width:980px){ .modal-grid { grid-template-columns:1fr; max-height:none; } }

.modal-gallery { position:relative; background:linear-gradient(135deg,#eef5ff 0%,#dbe8f5 100%); display:flex; flex-direction:column; padding:clamp(1rem,1.5vw,1.75rem) clamp(1rem,1.4vw,1.5rem) 1rem; gap:1rem; }
html.dark .modal-gallery { background:linear-gradient(120deg,#1e2833 0%,#25303c 60%,#1c252f 100%); }
.modal-media-wrapper { position:relative; flex:1; border-radius:20px; overflow:hidden; background:#ffffff; display:flex; align-items:center; justify-content:center; box-shadow:0 10px 28px rgba(0,0,0,0.1),0 3px 10px rgba(0,0,0,0.05); }
html.dark .modal-media-wrapper { background:#10161c; box-shadow:0 12px 34px rgba(0,0,0,0.55),0 3px 12px rgba(0,0,0,0.4); }
#modalMainImage,.modal-main-display { width:100%; height:100%; object-fit:contain; object-position:center; display:block; image-rendering:-webkit-optimize-contrast; padding:.75rem; }
.modal-media-placeholder { width:110px; height:110px; opacity:.6; color:var(--medical-blue); }
html.dark .modal-media-placeholder { opacity:.8; color:#60a5fa; }

.gallery-nav { position:absolute; top:50%; transform:translateY(-50%); width:48px; height:48px; border-radius:50%; background:rgba(255,255,255,0.85); border:1px solid rgba(0,0,0,0.08); display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:1.35rem; font-weight:600; color:#1f2937; backdrop-filter:blur(8px) saturate(180%); transition:all .35s cubic-bezier(.4,0,.2,1); z-index:10; }
.gallery-nav.prev { left:12px; } .gallery-nav.next { right:12px; }
.gallery-nav:hover,.gallery-nav:focus-visible { background:#ffffff; box-shadow:0 8px 22px rgba(0,0,0,0.25); transform:translateY(-50%) scale(1.08); }
html.dark .gallery-nav { background:rgba(34,42,52,0.85); border-color:#2d3642; color:#f3f4f6; }
html.dark .gallery-nav:hover,html.dark .gallery-nav:focus-visible { background:#2f3a48; }

.modal-thumbs { display:flex; gap:.65rem; overflow-x:auto; padding:.1rem .25rem .35rem; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
.modal-thumb { width:70px; height:70px; border-radius:14px; object-fit:cover; cursor:pointer; border:2px solid transparent; background:#ffffff; box-shadow:0 4px 14px rgba(0,0,0,0.08); transition:all .3s; flex-shrink:0; }
.modal-thumb:hover,.modal-thumb:focus-visible { transform:translateY(-4px); box-shadow:0 10px 20px rgba(0,0,0,0.15); }
.modal-thumb.active { border-color:var(--medical-blue); box-shadow:0 0 0 3px rgba(59,130,246,0.25),0 6px 18px rgba(0,0,0,0.18); }
html.dark .modal-thumb { background:#1a232b; box-shadow:0 4px 16px rgba(0,0,0,0.5); }
html.dark .modal-thumb.active { border-color:#06b6d4; box-shadow:0 0 0 3px rgba(6,182,212,0.3),0 6px 20px rgba(0,0,0,0.65); }

.modal-details { padding:clamp(1.9rem,2.6vw,2.65rem) clamp(2rem,3vw,3.25rem) 0; display:flex; flex-direction:column; gap:1.45rem; overflow:hidden; background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%); position:relative; }
html.dark .modal-details { background:linear-gradient(180deg,#1d2530 0%,#12181f 100%); }
.modal-details h3#modalTitle { font-size:clamp(2rem,2.8vw,3.1rem); font-weight:800; margin:0 0 .9rem; line-height:1.05; letter-spacing:-0.04em; text-align:center; color:#1f2937; background:none; -webkit-text-fill-color:initial; filter:drop-shadow(0 2px 4px rgba(0,0,0,0.06)); }
html.dark .modal-details h3#modalTitle { color:#ffffff; text-shadow:0 2px 6px rgba(0,0,0,0.6),0 8px 30px rgba(0,0,0,0.7); filter:drop-shadow(0 0 2px rgba(255,255,255,0.25)); }
html.dark .modal-details h3#modalTitle:after { display:none; }
.modal-meta { justify-content:center; }
.modal-description-text { text-align:center; }
.modal-description-text { font-size:1.08rem; line-height:1.88; }
html.dark .modal-description-text { line-height:1.9; }
.modal-meta { font-size:.78rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--text-gray-600); display:flex; gap:.55rem; flex-wrap:wrap; opacity:.9; }
html.dark .modal-meta { color:#9ca3af; }
.modal-meta .meta-badge { background:rgba(59,130,246,0.12); color:var(--medical-blue); padding:.38rem .6rem; border-radius:7px; font-size:.62rem; letter-spacing:.08em; font-weight:800; box-shadow:0 2px 4px rgba(0,0,0,0.06); }
html.dark .modal-meta .meta-badge { background:rgba(6,182,212,0.2); color:#06b6d4; box-shadow:0 2px 6px rgba(0,0,0,0.4); }
.modal-description-text { font-size:1.04rem; line-height:1.78; color:var(--text-gray-700); white-space:pre-line; font-weight:500; letter-spacing:.01em; }
html.dark .modal-description-text { color:#dde3e9; }
.modal-divider { height:1px; width:100%; background:linear-gradient(90deg,transparent,#d1d5db,#d1d5db,transparent); margin:.1rem 0 .7rem; }
html.dark .modal-divider { background:linear-gradient(90deg,transparent,#2d3642,#2d3642,transparent); }
.modal-details-scroll { flex:1 1 auto; overflow-y:auto; padding-right:.35rem; padding-bottom:1rem; scrollbar-width:thin; }
.modal-details-scroll::-webkit-scrollbar { width:8px; }
.modal-details-scroll::-webkit-scrollbar-track { background:transparent; }
.modal-details-scroll::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.18); border-radius:4px; }
html.dark .modal-details-scroll::-webkit-scrollbar-thumb { background:#2d3642; }
.modal-actions { margin-top:0; display:flex; flex-wrap:wrap; gap:.85rem; padding:1rem clamp(1.2rem,2vw,2rem) 1.25rem; background:linear-gradient(180deg,rgba(255,255,255,0.78) 0%,rgba(255,255,255,0.95) 70%,#ffffff 100%); position:sticky; bottom:0; backdrop-filter:blur(14px) saturate(140%); border-top:1px solid rgba(0,0,0,0.06); box-shadow:0 -6px 18px -8px rgba(0,0,0,0.25); }
html.dark .modal-actions { background:linear-gradient(180deg,rgba(29,37,48,0.85) 0%,rgba(18,24,31,0.95) 70%,#12181f 100%); border-top:1px solid #2d3642; box-shadow:0 -8px 22px -10px rgba(0,0,0,0.65); }
.modal-btn.primary { position:relative; isolation:isolate; }
.modal-btn.primary::after { content:""; position:absolute; inset:0; border-radius:inherit; background:radial-gradient(circle at 30% 20%,rgba(255,255,255,0.35),transparent 60%); opacity:.65; mix-blend-mode:overlay; pointer-events:none; }
.modal-btn.primary:hover::after { opacity:.85; }
.modal-btn.outline { background:rgba(255,255,255,0.85); color:#1f2937; border-color:#cbd5e1; }
html.dark .modal-btn.outline { background:#2a3541; border-color:#2d3642; color:#f3f4f6; }
@media (max-width:640px){ .modal-btn.outline { padding:.85rem 1.1rem; } }
.modal-btn { position:relative; display:inline-flex; align-items:center; gap:.5rem; font-weight:700; font-size:.9rem; letter-spacing:.05em; padding:.9rem 1.4rem; border-radius:14px; cursor:pointer; border:2px solid transparent; text-decoration:none; transition:all .35s cubic-bezier(.4,0,.2,1); }
.modal-btn.primary { background:linear-gradient(135deg,#1e40af 0%,#2563eb 55%,#06b6d4 100%); color:#ffffff; box-shadow:0 10px 28px -6px rgba(37,99,235,0.55),0 4px 14px rgba(37,99,235,0.4); }
.modal-btn.primary:hover,.modal-btn.primary:focus-visible { transform:translateY(-4px); box-shadow:0 18px 38px -8px rgba(37,99,235,0.6),0 6px 18px rgba(37,99,235,0.45); }
html.dark .modal-btn.primary { background:linear-gradient(140deg,#3b82f6 0%,#1e40af 55%,#06b6d4 100%); }
.modal-btn.outline { background:rgba(255,255,255,0.85); color:#1f2937; border-color:#cbd5e1; }
.modal-btn.outline:hover,.modal-btn.outline:focus-visible { background:#ffffff; border-color:#2563eb; color:#1e3a8a; box-shadow:0 6px 20px rgba(0,0,0,0.15); }
html.dark .modal-btn.outline { background:#2a3541; border-color:#2d3642; color:#f3f4f6; }
html.dark .modal-btn.outline:hover,html.dark .modal-btn.outline:focus-visible { background:#32404e; border-color:#06b6d4; color:#ffffff; }
.modal-btn:active { transform:translateY(0); }
.modal-btn:focus-visible, .gallery-nav:focus-visible, .modal-close-icon:focus-visible, .modal-thumb:focus-visible { outline:3px solid #2563eb; outline-offset:2px; }
html.dark .modal-btn:focus-visible, html.dark .gallery-nav:focus-visible, html.dark .modal-close-icon:focus-visible, html.dark .modal-thumb:focus-visible { outline:3px solid #06b6d4; }
@media (max-width:980px){ .modal-grid { max-height:92vh; } .modal-gallery { min-height:300px; } .modal-media-wrapper { height:330px; } #modalMainImage { padding:.45rem; } .modal-details { max-height:none; } .modal-details-scroll { max-height:48vh; } .modal-close-icon { top:10px; right:10px; } }
@media (max-width:640px){ .modal-btn { flex:1 1 auto; justify-content:center; } .modal-actions { flex-direction:column; } .gallery-nav { width:42px; height:42px; } .modal-media-wrapper { height:clamp(260px,55vh,380px); } }
.modal-thumbs::-webkit-scrollbar { height:8px; }
.modal-thumbs::-webkit-scrollbar-track { background:transparent; }
.modal-thumbs::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.15); border-radius:4px; }
html.dark .modal-thumbs::-webkit-scrollbar-thumb { background:#2d3642; }
.product-modal.new-modal-active .modal-content.new-modal { animation:newModalFade .55s cubic-bezier(.4,0,.2,1); }
@keyframes newModalFade { from { opacity:0; transform:translateY(28px) scale(.96); } to { opacity:1; transform:translateY(0) scale(1); } }
.product-modal.new-modal-active .modal-header, .product-modal.new-modal-active .modal-body, .product-modal.new-modal-active .modal-footer { display:none !important; }

