/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #D6001C;
    --secondary-green: #008C45;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f5 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    overflow-x: hidden;
    width: 100%;
    min-height: 100%;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

@view-transition {
    navigation: auto;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.12);
}

/* Navigation */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 10px 30px;
    border-radius: 20px;
    transition: all 0.3s ease;
    width: 90%;
    max-width: 1200px;
    opacity: 1; 
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.logo-container {
    cursor: pointer;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 10px;
}

.nav-links a:hover, .nav-links a.active {
    background: var(--primary-red);
    color: #ffffff;
}

/* Main Page Container */
.main-page {
    display: block;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 20px 60px;
    position: relative;
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 72px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary-red) 0%, #b30018 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 24px;
    margin-bottom: 40px;
    color: var(--text-light);
    font-weight: 400;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    background: var(--primary-red);
    color: #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(214, 0, 28, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(214, 0, 28, 0.4);
    background: #b30018;
}

/* Categories Section */
.categories {
    padding: 80px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text-dark);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    justify-content: center; /* FIXED: Centers the cards */
}

a.category-card {
    display: block;
    text-decoration: none;
}

.category-card {
    padding: 0;
    border-radius: 25px;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.category-card:hover .category-image {
    transform: scale(1.05);
}

.category-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-content {
    padding: 30px 25px;
}

.category-icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
    color: var(--primary-red); /* Added color to icons */
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

.category-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-dark);
}

.category-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Product Gallery Page */
.product-gallery-page {
    min-height: 100%;
    padding: 140px 20px 60px;
}

.back-button {
    position: fixed;
    top: 90px;
    left: 20px;
    z-index: 999;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateX(-5px);
    color: var(--primary-red);
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
    margin-top: 40px;
}

.gallery-header h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.gallery-header p {
    font-size: 20px;
    color: var(--text-light);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-item {
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

.product-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.product-info p {
    font-size: 14px;
    color: var(--primary-red);
    font-weight: 500;
}

/* About Section */
.about {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-content {
    padding: 60px;
    border-radius: 30px;
    text-align: center;
}

.about h2 {
    font-size: 48px;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--text-dark);
}

.about p {
    font-size: 20px;
    line-height: 1.8;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Features Section - FIXED */
.features {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 40px 30px;
    border-radius: 25px;
    text-align: center;
    /* removed background: white to let .glass work */
}

.feature-icon {
    font-size: 48px;
    margin: 0 auto 20px; /* Centered with auto margins */
    display: block;
    color: var(--primary-red); /* Applied brand color */
    width: fit-content;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.feature-card p {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-content {
    padding: 60px;
    border-radius: 30px;
    text-align: center;
}

.contact h2 {
    font-size: 48px;
    margin-bottom: 50px;
    font-weight: 700;
    color: var(--text-dark);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.contact-item {
    text-align: center;
}

.contact-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
    color: var(--primary-red);
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

.contact-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

.contact-item p {
    font-size: 16px;
    color: var(--text-light);
}

.contact-item a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.contact-item a:hover {
    color: #b30018;
}

/* Footer */
footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: #fff;
    margin-top: 60px;
}

footer p {
    color: var(--text-light);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        padding: 12px 15px;
        background: rgba(255, 255, 255, 0.98);
        border: none;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    .nav-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
    }
    
    .logo-img {
        height: 30px;
    }

    .nav-links {
        gap: 8px;
        width: auto;
    }
    
    .nav-links a {
        font-size: 13px;
        padding: 6px 8px;
        background: transparent;
    }

    .hero {
        padding-top: 100px;
        padding-bottom: 40px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 18px;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .back-button {
        top: 75px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        text-align: center;
        background: var(--bg-light);
    }
    
    .back-button:hover {
        transform: translateX(-50%);
        background: #fff;
    }

    .gallery-header h1 {
        font-size: 32px;
    }
    
    .product-gallery-page {
        padding-top: 130px;
    }

    .about-content,
    .contact-content {
        padding: 40px 25px;
    }

    .category-grid, .features-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-item img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        padding: 4px 6px;
        font-size: 12px;
    }
    
    .logo-img {
        height: 24px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
}