/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f5f5f5;
}

/* Hero Section */
.hero {
    position: relative;
    background: url('https://pub-90357a31482e4194a8108ad7c5e4217f.r2.dev/smart-security-hero.jpg') center/cover no-repeat;
    text-align: center;
    padding: 100px 20px;
    color: white;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: auto;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 4 columns on large screens */
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

/* Product Tile */
.product-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 450px; /* Ensures uniform height */
}

/* Product Images */
.product-item img {
    width: 100%;
    max-width: 220px;
    height: 220px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 5px;
}

/* Buy Button */
.buy-button {
    display: inline-block;
    padding: 10px 15px;
    background: #0073e6;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: auto;
    transition: all 0.3s ease;
}

.buy-button:hover {
    background: #005bb5;
    transform: scale(1.05);
}

/* Footer */
footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 20px;
    width: 100vw; /* Full width */
    position: relative;
    left: 0;
    right: 0;
    bottom: 0;
    margin-top: auto;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 3 columns */
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 50px 10px;
    }
    .hero h1 {
        font-size: 24px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 2 columns */
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 1 column */
    }
}
