/* static/css/landing.css */

/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Typography */
body {
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #fff;
    line-height: 1.6;
}

/* Links */
a {
    text-decoration: none;
    color: inherit;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #555;
}

.add-to-cart-btn {
    width: 100%;
}

.add-to-cart-btn:hover {
    background-color: #555;
}

/* Categories Section */
.categories {
    padding: 50px 5%;
}

.categories h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    justify-items: center;
}

.category-item {
    text-align: center;
    padding: 30px 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-item h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 0;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
    gap: 20px;
    padding: 0 5%;
}

.product-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    padding: 20px;
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 5px;
}

.product-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.product-item .price {
    font-size: 1rem;
    color: #555;
}

.product-item form {
    margin-top: auto;
}

/* Blog Section */
.blog-section {
    padding: 50px 5%;
    background-color: #f9f9f9;
}

.blog-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.blog-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.blog-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.blog-item h3 {
    font-size: 1.2rem;
    margin: 15px;
    flex-grow: 1;
}

.read-more {
    display: block;
    text-align: right;
    margin: 0 15px 15px 15px;
    color: #333;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* Responsive Media Queries */
@media (min-width: 1400px) {
    /* Components will naturally expand due to padding percentages */
}

@media (max-width: 768px) {
    .categories h2,
    .featured-products h2,
    .blog-section h2,
    .category-products h2 {
        font-size: 1.8rem;
    }

    .blog-image img {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .blog-image img {
        height: 100px;
    }
}
