@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Sophisticated Color Palette */
    --primary-navy: #0F172A;
    --primary-blue: #1E293B;
    --accent-blue: #0EA5E9;
    --light-blue: #3B82F6;
    --sky-blue: #0284C7;
    
    --primary-red: #B91C1C;
    --accent-red: #DC2626;
    --light-red: #EF4444;
    --coral-red: #F87171;
    
    --pure-white: #FFFFFF;
    --off-white: #F8FAFC;
    --light-gray: #F1F5F9;
    --mid-gray: #64748B;
    --dark-gray: #334155;
    --charcoal: #1E293B;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-blue) 50%, var(--sky-blue) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-blue) 0%, var(--light-blue) 100%);
    --gradient-red: linear-gradient(135deg, var(--primary-red) 0%, var(--accent-red) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
    background: var(--pure-white);
}

/* Enhanced Navigation with Updated Sizing */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    z-index: 1000;
    padding: 1.25rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(248, 250, 252, 0.95);
    box-shadow: var(--shadow-lg);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-lg);
}

/* Logo with Image Styling - Updated Sizing */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 180px;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo:hover .logo-img {
    filter: brightness(1.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    align-items: center;
}

.nav-item a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.75rem 0;
}

.nav-item a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-red);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item a:hover {
    color: var(--accent-blue);
    transform: translateY(-1px);
}

.nav-item a:hover::before {
    width: 100%;
}

.nav-item.active a {
    color: var(--accent-blue);
}

.nav-item.active a::before {
    width: 100%;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Products Hero Section */
.products-hero {
    background: var(--gradient-primary);
    color: var(--pure-white);
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.products-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(239, 68, 68, 0.1) 0%, transparent 50%);
}

.products-hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.products-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.products-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

.products-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    max-width: 600px;
    margin: 0 auto;
}

.products-stat {
    text-align: center;
}

.products-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--pure-white);
    display: block;
}

.products-stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Product Categories */
.product-categories {
    padding: var(--spacing-2xl) 0;
    background: var(--off-white);
}

.categories-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-3xl);
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-blue);
    background: var(--pure-white);
    color: var(--primary-blue);
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-blue);
    color: var(--pure-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Search and Filters */
.search-filters {
    max-width: 1400px;
    margin: 0 auto var(--spacing-2xl);
    padding: 0 var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-lg);
    align-items: center;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--pure-white);
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mid-gray);
    font-size: 1rem;
}

/* Products Grid and Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: var(--pure-white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Product Image Styling */
.product-image {
    position: relative;
    height: 200px;
    background: var(--pure-white);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-image-fallback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--light-blue) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 1rem;
}

.product-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(185, 28, 28, 0.9);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.product-name-display {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-top: 0.5rem;
}

/* Product Content */
.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-description {
    color: var(--mid-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.product-chip {
    font-size: 0.9rem;
    color: #0066cc;
    margin-bottom: 1rem;
    font-weight: 500;
}

.product-specs {
    border-top: 1px solid var(--light-gray);
    padding-top: 1rem;
    margin-top: 1rem;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(241, 245, 249, 0.5);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    font-size: 0.85rem;
    color: var(--dark-gray);
    font-weight: 500;
    flex: 1;
}

.spec-value {
    font-size: 0.85rem;
    color: var(--primary-navy);
    font-weight: 600;
    text-align: right;
    flex: 1;
}

/* Loading and Error States */
.loading {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-products, .error-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.error-message {
    color: #e74c3c;
    background: #fdf2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin: 1rem;
}

/* Footer */
.footer {
    background: var(--primary-navy);
    color: var(--pure-white);
    padding: var(--spacing-xl) 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    display: block !important;
    width: 100%;
    clear: both;
    margin-top: auto;
}

.footer p {
    opacity: 0.8;
    font-size: 0.95rem;
    margin: 0;
    padding: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar {
        padding: 1rem 0;
    }
    
    .navbar.scrolled {
        padding: 0.875rem 0;
    }
    
    .logo-img {
        height: 45px;
        max-width: 160px;
    }
    
    .nav-item a {
        font-size: 1rem;
    }

    .search-filters {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.875rem 0;
    }
    
    .logo-img {
        height: 40px;
        max-width: 140px;
    }

    .nav-menu {
        display: none;
    }

    .categories-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: var(--spacing-sm);
    }

    .category-btn {
        flex-shrink: 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .product-card {
        max-width: none;
    }

    .products-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-hero {
        padding: 140px 0 60px;
    }

    .search-input {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
    }

    .search-icon {
        left: 0.875rem;
        font-size: 0.9rem;
    }
}

/* Add this to the END of your products.css file for mobile responsiveness */

@media (max-width: 768px) {
    /* Hero Section Mobile */
    .products-hero {
        padding: 120px 0 50px;
    }

    .products-hero h1 {
        font-size: 2rem;
    }

    .products-hero p {
        font-size: 1rem;
        padding: 0 var(--spacing-md);
    }

    /* Product Stats Mobile */
    .products-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
        padding: 0 var(--spacing-md);
    }

    .products-stat-number {
        font-size: 2rem;
    }

    .products-stat-label {
        font-size: 0.85rem;
    }

    /* Product Categories Mobile */
    .product-categories {
        padding: var(--spacing-xl) 0;
    }

    /* Categories Navigation Mobile */
    .categories-nav {
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 var(--spacing-md) var(--spacing-sm);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: var(--spacing-sm);
    }

    .categories-nav::-webkit-scrollbar {
        display: none;
    }

    .category-btn {
        flex-shrink: 0;
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    /* Search and Filters Mobile */
    .search-filters {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        padding: 0 var(--spacing-md) var(--spacing-lg);
    }

    .search-box {
        width: 100%;
    }

    .search-input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
        font-size: 0.95rem;
    }

    .search-icon {
        left: 0.875rem;
        font-size: 0.9rem;
    }

    /* Products Grid Mobile */
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        padding: var(--spacing-md);
    }

    /* Product Card Mobile */
    .product-card {
        border-radius: 12px;
    }

    .product-image {
        height: 180px;
        border-radius: 12px 12px 0 0;
    }

    .product-category-badge {
        top: 10px;
        left: 10px;
        padding: 0.35rem 0.7rem;
        font-size: 0.7rem;
    }

    .product-name-display {
        font-size: 1rem;
    }

    .product-content {
        padding: var(--spacing-md);
    }

    .product-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .product-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .product-chip {
        font-size: 0.85rem;
    }

    .product-specs {
        padding-top: 0.75rem;
        margin-top: 0.75rem;
    }

    .spec-row {
        padding: 0.35rem 0;
    }

    .spec-label,
    .spec-value {
        font-size: 0.8rem;
    }

    /* Loading and Error States Mobile */
    .loading {
        padding: 2rem var(--spacing-md);
    }

    .spinner {
        width: 35px;
        height: 35px;
    }

    .no-products,
    .error-message {
        padding: var(--spacing-lg) var(--spacing-md);
        font-size: 1rem;
    }

    /* Container Mobile */
    .container {
        padding: 0 var(--spacing-md);
    }

    /* Footer Mobile */
    .footer {
        padding: var(--spacing-lg) 0;
    }

    .footer p {
        font-size: 0.85rem;
        padding: 0 var(--spacing-md);
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .products-hero {
        padding: 110px 0 40px;
    }

    .products-hero h1 {
        font-size: 1.75rem;
    }

    .products-hero p {
        font-size: 0.95rem;
    }

    .products-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .products-stat {
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .products-stat:last-child {
        border-bottom: none;
    }

    .products-stat-number {
        font-size: 1.75rem;
    }

    .products-stat-label {
        font-size: 0.8rem;
    }

    .product-categories {
        padding: var(--spacing-lg) 0;
    }

    .categories-nav {
        padding: 0 var(--spacing-sm) var(--spacing-sm);
    }

    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .search-input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        font-size: 0.9rem;
    }

    .search-icon {
        left: 0.75rem;
    }

    .products-grid {
        gap: var(--spacing-md);
        padding: var(--spacing-sm);
    }

    .product-image {
        height: 160px;
    }

    .product-category-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }

    .product-name-display {
        font-size: 0.95rem;
    }

    .product-content {
        padding: var(--spacing-sm);
    }

    .product-title {
        font-size: 1rem;
    }

    .product-description {
        font-size: 0.85rem;
    }

    .product-chip {
        font-size: 0.8rem;
    }

    .spec-row {
        padding: 0.3rem 0;
    }

    .spec-label,
    .spec-value {
        font-size: 0.75rem;
    }

    .no-products,
    .error-message {
        padding: var(--spacing-md) var(--spacing-sm);
        font-size: 0.95rem;
    }
}
