/* Single Product Card Sizing - 705x705 when only one product in category */

/* When a category section has only one product, make it larger */
.category-section .products-grid:has(.product-card:only-child) .product-card,
.products-grid .product-card:only-child {
    width: 705px;
    height: 705px;
    max-width: 705px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Fallback for browsers that don't support :has() selector */
.category-section .products-grid.single-product .product-card,
.products-grid.single-product .product-card {
    width: 705px;
    height: 705px;
    max-width: 705px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Adjust image height for single product cards */
.category-section .products-grid:has(.product-card:only-child) .product-card .product-image,
.products-grid .product-card:only-child .product-image,
.category-section .products-grid.single-product .product-card .product-image,
.products-grid.single-product .product-card .product-image {
    height: 400px;
}

/* Adjust product info section for single product cards */
.category-section .products-grid:has(.product-card:only-child) .product-card .product-info,
.products-grid .product-card:only-child .product-info,
.category-section .products-grid.single-product .product-card .product-info,
.products-grid.single-product .product-card .product-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Adjust text sizes for single product cards */
.category-section .products-grid:has(.product-card:only-child) .product-card .product-name,
.products-grid .product-card:only-child .product-name,
.category-section .products-grid.single-product .product-card .product-name,
.products-grid.single-product .product-card .product-name {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.category-section .products-grid:has(.product-card:only-child) .product-card .product-description,
.products-grid .product-card:only-child .product-description,
.category-section .products-grid.single-product .product-card .product-description,
.products-grid.single-product .product-card .product-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.category-section .products-grid:has(.product-card:only-child) .product-card .product-price,
.products-grid .product-card:only-child .product-price,
.category-section .products-grid.single-product .product-card .product-price,
.products-grid.single-product .product-card .product-price {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.category-section .products-grid:has(.product-card:only-child) .product-card .product-actions .btn,
.products-grid .product-card:only-child .product-actions .btn,
.category-section .products-grid.single-product .product-card .product-actions .btn,
.products-grid.single-product .product-card .product-actions .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

/* Responsive adjustments for single product cards */
@media (max-width: 768px) {
    .category-section .products-grid:has(.product-card:only-child) .product-card,
    .products-grid .product-card:only-child,
    .category-section .products-grid.single-product .product-card,
    .products-grid.single-product .product-card {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
    
    .category-section .products-grid:has(.product-card:only-child) .product-card .product-image,
    .products-grid .product-card:only-child .product-image,
    .category-section .products-grid.single-product .product-card .product-image,
    .products-grid.single-product .product-card .product-image {
        height: 250px;
    }
    
    .category-section .products-grid:has(.product-card:only-child) .product-card .product-info,
    .products-grid .product-card:only-child .product-info,
    .category-section .products-grid.single-product .product-card .product-info,
    .products-grid.single-product .product-card .product-info {
        padding: 1.5rem;
    }
}