/* Overall Body */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
}

/* Landing Section */
.landing-section {
    height: 85vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('/img/backgrounds/meat-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.landing-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.landing-section>* {
    position: relative;
    z-index: 2;
}

.landing-h1 {
    font-size: 4rem;
    margin: 10px;
    color: #fff;
}

.landing-p {
    font-size: 2rem;
    margin: 10px;
    color: #fff;
}

/* Main Shop Container */
.shop-container {
    width: 100%;
    margin: 40px 0;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;  /* Allows wrapping of elements to the next line */
    box-sizing: border-box;
}

/* Left Sidebar for Categories */
.sidebar {
    flex: 0 0 20%;
    position: sticky;
    top: 80px;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 1.6rem;
    color: #333;
    margin-bottom: 15px;
}

#category-list {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

#category-list li {
    margin-bottom: 10px;
}

#category-list a {
    text-decoration: none;
    font-size: 1rem;
    color: #333;
    padding: 8px 15px;
    background-color: #f8f8f8;
    border-radius: 25px;
    transition: background-color 0.3s ease;
    display: block;
    width: 90%;
}

#category-list a:hover {
    background-color: #ff6600;
    color: white;
}

/* Product Grid Container */
.product-container-wrapper {
    flex: 1;
    min-width: 0;
    padding-right: 20px;
}

.product-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    gap: 30px;
    padding: 0;
    width: 100%;
}

/* Product Card */
.product {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 90%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Product Image */
.product-image-wrapper {
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #f8f8f8;
    border-radius: 10px;
    margin-bottom: 15px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image-wrapper:hover .product-image {
    transform: scale(1.05);
}

/* Product Details */
.product-title {
    font-size: 1.7rem;
    font-weight: 500;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    height: 60px;
    overflow: hidden;
}

.pd-weight-list li {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

/* View Product Button */
.product-view-button {
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 90%;
    max-width: 250px;
    text-align: center;
    margin-top: 15px;
}

.product-view-button:hover {
    background-color: #e65c00;
}

/* Pagination Styles */
.pagination-container {
    width: 100%;
    text-align: center;
    margin-top: 30px;  /* Adds space between the grid and pagination */
    clear: both;  /* Ensures pagination doesn't float next to the products */
}

.pagination-container button {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    color: #333;
    font-size: 1rem;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ensures pagination buttons have the correct hover effect */
.pagination-container button:hover {
    background-color: #ff6600;
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 1600px) {
    .product-container {
        grid-template-columns: repeat(4, minmax(220px, 1fr));
        gap: 25px;
    }
    
    .product-image-wrapper {
        height: 250px;
    }
}

@media (max-width: 1200px) {
    .product-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sidebar {
        flex: 0 0 25%;
    }
}

@media (max-width: 992px) {
    .shop-container {
        flex-direction: column;
        padding: 0 15px;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        flex: none;
        max-height: none;
    }
    
    .product-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .pagination-container {
        margin-top: 30px;  /* Adjust for smaller screens */
    }

    .product-image-wrapper {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
    }
    
    .product-image-wrapper {
        height: 400px;
    }
    
    .landing-h1 {
        font-size: 2.5rem;
    }
    
    .landing-p {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .product-image-wrapper {
        height: 300px;
    }
    
    .shop-container {
        padding: 0 10px;
    }

    .sidebar {
        width: 85%;
    }
    
    .product-container {
        gap: 15px;
    }
    
    .product {
        margin: 10px auto;
    }
}
