/* ==========================================================================
   Base styles and variables
   ========================================================================== */
:root {
    --primary-color: #2b2b2b;
    --secondary-color: #f4f4f4;
    --accent-color: #4a90e2;
    --text-color: #333333;
    --bg-color: #ffffff;
    --transition-speed: 0.3s;
}

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

html {
    font-size: 100%; /* Base for rem */
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Base utility classes */
.container {
    width: 90%;
    max-width: 75rem;
    margin: 0 auto;
}

/* Fade-in Animation for content */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: translateY(0); }
}
/* ==========================================================================
   Header and Navigation
   ========================================================================== */
.header {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1rem;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color var(--transition-speed);
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Burger Menu */
.burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 2rem;
    height: 1.5rem;
    z-index: 1001;
}

.burger div {
    background-color: var(--secondary-color);
    height: 0.2rem;
    border-radius: 0.2rem;
    transition: all var(--transition-speed) ease;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 1200px) {
    /* Tablet & Small Desktop (handled in content feature) */
}

@media (max-width: 768px) {
    /* Mobile styles */
    .burger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 60vw;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.5s ease-in-out;
    }

    .nav-links.nav-active {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    /* Burger Toggle Animation */
    .burger.toggle .line1 {
        transform: rotate(-45deg) translate(-0.35rem, 0.45rem);
    }
    .burger.toggle .line2 {
        opacity: 0;
    }
    .burger.toggle .line3 {
        transform: rotate(45deg) translate(-0.45rem, -0.55rem);
    }
}

@media (max-width: 480px) {
    .nav-links {
        width: 100vw;
    }
}

/* ==========================================================================
   Main Content & Grid Gallery
   ========================================================================== */
.catalog-section {
    padding: 3rem 0;
}

.catalog-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.grid-gallery {
    display: grid;
    /* Desktop layout > 1200px: 4 columns */
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* ==========================================================================
   Item Cards (Flexbox inside Grid items)
   ========================================================================== */
.card {
    background-color: var(--bg-color);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 1rem 1.5rem rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 12rem;
    background-color: var(--secondary-color);
    background-size: cover;
    background-position: center;
}

/* Placeholders for images since we don't have real assets */
.bg-drill { background-image: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.bg-tent { background-image: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.bg-bike { background-image: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); }
.bg-projector { background-image: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes button to bottom */
}

.btn {
    align-self: flex-start;
    padding: 0.5rem 1.5rem;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 0.25rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.btn:hover {
    background-color: #357abd;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-bottom {
    text-align: center;
    border-top: 0.1rem solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    font-size: 0.8rem;
}

/* ==========================================================================
   Media Queries (Grid Resizing)
   ========================================================================== */
@media (max-width: 1200px) {
    /* Tablet & Small Desktop layout */
    .grid-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile styles (Grid) */
    .catalog-title {
        font-size: 2rem;
    }
    
    .footer-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    /* Small Mobile styles (Grid) */
    .grid-gallery {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
    
    .catalog-title {
        font-size: 1.5rem;
    }
}
