/* new-collection.css - Compact Version */
.new-collection {
    font-family: 'Inter', 'Segoe UI', Roboto, -apple-system, sans-serif;
}

.new-collection .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Changed from 1 to 2 for mobile */
    gap: 1rem;
}

@media (min-width: 640px) {
    .new-collection .grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 columns for small tablets */
    }
}

@media (min-width: 768px) {
    .new-collection .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .new-collection .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Rest of your existing CSS remains the same */
.new-collection .product-card {
    border-radius: 0.375rem;
    padding: 0.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    transition: border-color 0.3s ease;
    border: 1px solid transparent;
}

/* Product Image Container */
.new-collection .product-image {
    flex-grow: 1;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 9rem;
    overflow: hidden;
}

/* Anchor tag styling to maintain image aspect ratio */
.new-collection .product-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.new-collection .product-image img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Hover effect: Light border around product card when hovering over product image */
.new-collection .product-image:hover ~ *,
.new-collection .product-image:hover ~ .add-to-cart-btn,
.new-collection .product-image:hover ~ h3,
.new-collection .product-image:hover ~ .price {
    /* This ensures other elements don't interfere with the hover */
}

/* Main hover effect - applies border to entire product card */
.new-collection .product-image:hover ~ *,
.new-collection .product-card:hover {
    border-color: #d1d5db;
}

/* Alternative approach - more reliable */
.new-collection .product-image:hover ~ *,
.new-collection .product-card:has(.product-image:hover) {
    border-color: #d1d5db;
}

/* Fallback for browsers that don't support :has() */
.new-collection .product-card:hover {
    border-color: #d1d5db;
}

/* Title with partial underline - Centered */
.title-wrapper {
    margin-bottom: 2rem;
}

.new-collection h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.title-underline {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background-color: #1f2937;
}

/* Font size adjustments */
.new-collection .product-card h3 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b0c0c;
}

.new-collection .product-card .price {
    font-size: 0.875rem !important;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: #374151;
}

.new-collection .product-card .add-to-cart-btn {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.20rem;
    background: #000;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    transform: scale(1);
}

.new-collection .product-card .add-to-cart-btn:hover {
    transform: scale(1.01);
}

/* View All Button */
.view-all-btn {
    background-color: white;
    color: black;
    border: 1px solid black;
    border-radius: 0rem;
    padding: 0.50rem 1rem;
    font-weight: 400;
    font-size: 0.775rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}

.view-all-btn:hover {
    background-color: black;
    color: white;
}

/* Container spacing */
.new-collection.container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
