/* 
######################
Product Panel Container 
######################
*/

.product_panel_container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-md);
    justify-content: center;
    padding: var(--spacing-sm);
}

/* 
######################
Product Panel 
######################
*/

.product_panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    background-color: var(--background-muted);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product_panel:hover {
    transform: var(--transform-final);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-btn);
}

.product_panel a {
    text-decoration: none;
    color: inherit;
}

.product_image {
    width: 100%;
    height: auto;
    object-fit: cover;
    padding: var(--spacing-sm);
}

.product_info {
    padding: var(--spacing-sm);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product_title_wrapper {
    margin-bottom: var(--spacing-xs);
}

.product_title {
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    font-weight: var(--heading-font-weight);
    color: var(--text-dark);
    margin: 0;
}

.product_description_wrapper {
    margin-bottom: var(--spacing-xs);
}

.product_description {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    color: var(--text-muted);
    margin: 0;
}

.product_price_wrapper {
    margin-bottom: var(--spacing-sm);
}

.product_price {
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    font-weight: var(--heading-font-weight);
    color: var(--primary-color);
    margin: 0;
}

/* 
######################
Action Buttons 
######################
*/

.action_container_buy_add_offer {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-xs);
    padding: var(--spacing-sm);
    background-color: var(--bg-subtle);
}

.buy_now_button,
.add_to_bag_button,
.make_offer_button {
    flex: 1;
    min-width: 100px;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    font-weight: var(--heading-font-weight);
    color: var(--text-color-default);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.buy_now_button:hover,
.add_to_bag_button:hover,
.make_offer_button:hover {
    transform: var(--transform-final);
    transition: var(--transition-fast);
}


.add_to_bag_button {
    background-color: var(--primary-color);
}

.add_to_bag_button:hover {
    background-color: var(--primary-hover);
}

.make_offer_button {
    background-color: var(--primary-color);
}

.make_offer_button:hover {
    background-color: var(--primary-hover);
}

.buy_now_button {
    background-color: var(--button-action);
}
.buy_now_button:hover {
background-color: var(--button-action-hover);
}

/* 
######################
Mobile Responsive 
######################
*/

@media (max-width: 767.98px) {
    .clearance-container {
        padding: var(--spacing-sm);
    }

    .product_panel_container {
        flex-direction: column;
        align-items: center;
    }

    .product_panel {
        max-width: 350px;
        width: 90%; /* Ensures it scales down on very narrow screens */
    }

    .product_title {
        font-size: var(--font-size-md);
    }

    .product_description {
        font-size: var(--font-size-sm);
    }

    .product_price {
        font-size: var(--font-size-md);
    }

    .action_container_buy_add_offer {
        flex-direction: column;
    }

    .buy_now_button,
    .add_to_bag_button,
    .make_offer_button {
        font-size: var(--font-size-sm);
        padding: var(--spacing-xxs) var(--spacing-xs);
    }
}