/* Products shortcode styles */
#products-container {
    width: 100%;
    font-family: "Poppins", Sans-serif;
    padding: 20px;
}

/* Category buttons */
.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 30px;
    justify-content: center;
}

.category-button {
    background: #f8f9fa00;
    padding: 0px;
    font-family: "Poppins", Sans-serif;
    cursor: pointer;
    font-size: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.category-button:hover {
    background: #e9ecef00;
}

.category-button.active {
    background: #e9ecef00;
    color: #d92c05;
}

/* Main wrapper */
.products-wrapper {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

/* Static category info (25%) */
.category-info {
    flex: 0 0 25%;
    background: #202020;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
}

.category-title {
    margin: 0 0 20px 0;
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
}

.category-link {
    display: inline-block;
    color: #7fd0d9;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 400;
    transition: background 0.3s ease;
}

.category-link:hover {
    font-weight: 800;
    color: #7fd0d9;
}

/* Products grid (75%) */
.products-grid {
    flex: 1;
    position: relative;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.products-list {
    display: grid;
    gap: 20px;
    grid-template-rows: 1fr;
    overflow-x: auto;
    grid-template-columns: repeat(5, 1fr); /* Default desktop */
}

/* Product item - FLEXBOX LAYOUT */
.product-item {
    padding: 0px;
    text-align: center;
    transition: box-shadow 0.3s ease;
    min-width: 0; /* Prevent flexbox overflow */
    display: flex;
    flex-direction: column;
    height: 100%; /* Fill full height */
}

/* Hide excess products - JavaScript will handle this */
.product-item.hidden {
    display: none;
}

.product-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-image {
    margin-bottom: 5px;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

/* FLEXBOX PRODUCT INFO - BUTTON ALWAYS AT BOTTOM */
.product-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 10px;
    flex: 1; /* Flexible height */
    justify-content: space-between; /* Distribute content */
}

.product-header {
    flex: 1; /* Flexible height - fills available space */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.product-category {
    font-size: 11px;
    color: #ffffff7a;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 0px;
    text-align: left;
}

.product-name {
    margin: 0 0 10px 0;
    font-size: 17px;
    line-height: 21px;
    font-weight: 600;
    text-align: left;
}

.product-name a {
    color: #ffffff;
    text-decoration: none;
}

.product-name a:hover {
    color: #007cba;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 15px 0;
}

.product-button {
    margin-top: 15px;
    margin-bottom: 0; /* Remove bottom margin */
    align-self: stretch; /* Full width button */
}

.product-button .button {
    background: #D92B04;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s;
    font-size: 15px;
    padding: 11px 40px;
    width: 100%; /* Full width */
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

.product-button .button:hover {
    background: #005a87;
    color: white;
}

.no-products {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Responsive styles - only category buttons and general elements */
@media (max-width: 480px) {
    #products-container {
        padding: 15px;
    }
    
    .category-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .category-button {
        text-align: center;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .products-wrapper {
        flex-direction: column;
    }
    
    .category-info {
        flex: none;
        width: 100%;
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .product-image img {
        height: 150px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .category-buttons {
        justify-content: flex-start;
    }
    
    .category-button {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .products-wrapper {
        flex-direction: column;
    }
    
    .category-info {
        flex: none;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .product-image img {
        height: 160px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .products-wrapper {
        flex-direction: column;
    }
    
    .category-info {
        flex: none;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .product-image img {
        height: 180px;
    }
}