/* Base Styles */
.box {
    width: 100%;
    max-width: 1400px;
    margin: 5vh auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.box h1 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.2rem;
    color: rgb(var(--htext_color));
}

.fp_container {
    width: 100%;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Product Cards */
.fp_product {
    background-color: rgba(var(--secbackgroundcolor), 0.6);
    transition: all 0.3s ease;
    padding: 1.5rem;
    box-sizing: border-box;
    display: flex;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    height: 100%;
}

.fp_product::before {
    content: '';
    position: absolute;
    width: 0%;
    height: 4px;
    left: 50%;
    top: 0;
    background-color: rgb(var(--primarycolor));
    transition: all 0.5s ease;
    z-index: 1;
}

.fp_product:hover {
    background-color: rgb(var(--secbackgroundcolor));
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.fp_product:hover::before {
    left: 0;
    width: 100%;
}

/* Left Side Layout */
.fp_left_side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
}

.fp_top_product {
    height: 100%;
}

.fp_bottom_product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    height: 100%;
}

/* Right Side Layout */
.fp_right_side {
    height: 100%;
}

/* Content Styling */
.fp_product_cont, .fp_side_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 1rem;
    z-index: 2;
}

.fp_product a {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgb(var(--htext_color));
    text-decoration: none;
    transition: color 0.3s ease;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.fp_product p {
    font-size: 1rem;
    color: rgb(var(--text_color));
    margin-bottom: 1rem;
    line-height: 1.5;
}

.fp_product h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: rgb(var(--primarycolor));
    margin: 0;
}

/* Image Container */
.fp_imagecontainer {
    flex: 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 150px;
    position: relative;
    z-index: 1;
}

/* Responsive Adjustments */
@media (max-width: 1000px) {
    .fp_container {
        grid-template-columns: 1fr;
    }
    
    .fp_right_side {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .box h1 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .fp_bottom_product {
        grid-template-columns: 1fr;
    }
    
    .fp_product a {
        font-size: 1.3rem;
    }
    
    .fp_product h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    
    
    .fp_product {
        padding: 1rem;
    }
    
    .fp_product a {
        font-size: 1.2rem;
    }
    
    .box {
        padding: 0 0.5rem;
    }
}

/* Fallback for empty products */
.fp_imagecontainer[style*="no-image.jpg"] {
    background-color: rgba(var(--backgroundcolor), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fp_imagecontainer[style*="no-image.jpg"]::after {
    content: "No Image";
    color: rgba(var(--text_color), 0.5);
    font-size: 0.9rem;
}