/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    --primary-color: #000000;
    --accent-color: #E53935;
    --accent-hover: #C62828;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --border-color: #EAEAEA;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.12);
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.bg-light {
    background-color: var(--bg-light);
}

section {
    padding: 5rem 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: var(--bg-white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--accent-color);
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 600;
    font-size: 1rem;
}

.nav-link:hover {
    color: var(--accent-color);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(to right bottom, #f8f9fa, #e9ecef);
    padding-top: 70px; /* Offset for fixed header */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.grid {
    display: grid;
    gap: 2rem;
}

.feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==========================================================================
   Products Section
   ========================================================================== */
.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-img {
    height: 250px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    color: inherit;
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    background: var(--bg-light);
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
}

.contact-card h3 {
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-light);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 4rem 0 1rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: var(--bg-white);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-brand p {
    color: #999;
}

.footer-links h4 {
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.footer-links p {
    color: #999;
    margin-bottom: 0.5rem;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: var(--bg-white);
    font-size: 1.5rem;
    margin-right: 1rem;
}

.social-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #666;
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.4s ease-in-out;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   New Styles: Logos & Product Modal Additions
   ========================================================================== */

/* Logo Styling */
.brand-logo {
    max-height: 45px;
    width: auto;
    object-fit: contain;
}

.footer-logo {
    margin-bottom: 1rem;
}

/* Make product cards visually clickable */
.product-card {
    cursor: pointer;
}

/* Modal (Background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Modal Show Class (Toggled by JS) */
.modal.show {
    display: flex;
    opacity: 1;
}

/* Modal Content Box */
.modal-content {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-btn:hover {
    color: var(--accent-color);
}

/* Modal Body/Showcase */
.modal-body {
    text-align: center;
    margin-top: 10px;
}

.modal-body img {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.modal-body h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.modal-body p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.modal-footer .price {
    font-size: 1.5rem;
}

/* ==========================================================================
   New Styles: Thumbnail Gallery in Modal
   ========================================================================== */

/* Reduce bottom margin of main image to make room for thumbnails */
.modal-body img#modal-img {
    margin-bottom: 1rem;
    transition: opacity 0.3s ease;
}

/* Thumbnail Grid Container */
.thumbnail-grid {
    display: flex; /* Changed from inline-block to flex */
    gap: 10px;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Individual Thumbnail */
/* Thumbnail Grid Container */
.thumbnail-grid {
    display: flex !important;
    flex-direction: row !important; /* Forces a horizontal row */
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Individual Thumbnail */
.thumbnail-img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    opacity: 0.6;
    display: inline-block !important; /* Prevents global block rules from breaking the row */
}

.thumbnail-img:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Active State for Thumbnail */
.thumbnail-img.active {
    border-color: var(--accent-color);
    opacity: 1;
}