/* Clean Product Card Styles */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* Single product responsive layout */
.products-grid[data-count="1"] {
    max-width: 600px;
    margin: 0 auto;
    grid-template-columns: 1fr;
    justify-items: center;
}

.products-grid[data-count="1"] .product-card {
    width: 100%;
    max-width: 600px;
}

.products-grid[data-count="1"] .product-image-container {
    aspect-ratio: 1 / 1;
    height: auto;
}

/* Responsive adjustments for single product */
@media (max-width: 768px) {
    .products-grid[data-count="1"] {
        max-width: 90vw;
        padding: 1rem;
    }
    
    .products-grid[data-count="1"] .product-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .products-grid[data-count="1"] {
        max-width: 95vw;
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .products-grid[data-count="1"] .product-card {
        max-width: 100%;
    }
    
    .products-grid[data-count="1"] .product-info {
        padding: 1rem;
    }
}

/* Force square aspect ratio for filtered single products */
.products-grid.single-product .image-wrapper.square,
.products-grid.single-product .simple-image-container,
.products-grid[data-count="1"] .image-wrapper,
.products-grid[data-count="1"] .simple-image-container {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
}

/* Ensure all filter result images are square and centered */
.single-image-card .image-wrapper.square {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
}

.single-image-card img {
    border-radius: 0 !important;
}

.product-card {
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.product-link {
    text-decoration: none !important;
    color: inherit !important;
}

.product-link:hover,
.product-link:focus,
.product-link:visited {
    text-decoration: none !important;
    color: inherit !important;
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 400px; /* Increased from 250px */
    overflow: hidden;
}

/* Square images for all product cards */
.product-image-container {
    aspect-ratio: 4 / 5; /* Adjusted from 1/1 for more height */
}

/* Ensure square aspect ratio is maintained */
.product-image-container.square {
    height: auto;
}

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

.product-image.alt-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.product-card:hover .product-image.main-image {
    opacity: 0;
}

.product-card:hover .product-image.alt-image {
    opacity: 1;
}

.product-card .product-image-container .product-image.main-image:only-child {
    opacity: 1 !important;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0B2341;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.product-collection {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
    text-decoration: none;
}

/* Underline animation effect for product collection - starts full, closes on hover */
.product-collection::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #0B2341;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.product-collection:hover {
    color: #0B2341;
}

.product-collection:hover::before {
    width: 0;
}

/* Default state - full underline */
.product-collection:not(:hover)::before {
    width: 100%;
    transition: width 0.4s ease;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0B2341;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.product-price .per {
    font-size: 0.95rem;
    font-weight: 400;
    color: #0B2341;
}

.product-card-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0B2447;
    margin: 0.3rem 0 0 0;
    line-height: 1.2;
}

.product-card-price span {
    font-size: 0.8rem;
    font-weight: 400;
    color: #8e8e93;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.spec {
    font-size: 0.8rem;
    color: #888;
    padding: 0.3rem 0.6rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .product-image-container {
        height: 300px; /* Increased from 200px */
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}