/* Trending Collections Section V2 - Figma Specs */

.trending-collections-v2 {
    padding: 40px 0 30px;
    background: #fff;
    overflow: hidden;
}

.trending-v2-heading {
    margin-bottom: 25px;
    text-align: center;
}

.trending-v2-heading h2 {
    font-family: Montserrat, serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 36px;
    color: #000;
    margin: 0;
    font-style: italic;
}

/* Container */
.trending-v2-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px; /* Spacing between cards */
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    justify-content: space-between;
}

/* Individual Card */
.trending-v2-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    flex: 0 0 calc(25% - 12px); /* 4 items layout */
    max-width: 100%;
    text-decoration: none !important;
    width: 25%;
}

/* Image Wrapper (Mask Group) */
.trending-v2-image {
    width: 100%;
    aspect-ratio: 475 / 504;
    overflow: hidden;
    position: relative;
    background: #D9D9D9;
}

.trending-v2-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.trending-v2-card:hover .trending-v2-image img {
    transform: scale(1.08);
}

/* Hover Image Support (Keeping existing feature if field exists) */
.trending-v2-image img.hover-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 1;
}

.trending-v2-card:hover .trending-v2-image img.hover-img {
    opacity: 1;
}

/* Shop Now Overlay (Figma: Rectangle 662) */
.trending-v2-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 85.87%; /* Positioned at exactly 85.87% from top as per Figma */
    background: rgba(0, 0, 0, 0.8); /* Adjusted to 0.8 as per request */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateY(10px);
    z-index: 5;
}

.trending-v2-overlay span {
    font-family: 'PP Telegraf', Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    color: #ffffff; /* Changed from black to white */
    text-align: center;
    text-transform: uppercase; /* Standard for Shop buttons */
    letter-spacing: 0.1em;
}

/* Hover State for Overlay */
.trending-v2-card:hover .trending-v2-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Info Section */
.trending-v2-info {
    width: 100%;
    text-align: center;
}

.trending-v2-info h3 {
font-family: Montserrat, sans-serif;
    font-weight: normal;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    letter-spacing: 0.08em;
    text-decoration: underline;
    text-transform: uppercase;
    color: #1D1D1F;
    margin: 0;
    transition: color 0.3s ease;
}

.trending-v2-card:hover .trending-v2-info h3 {
    color: #000;
}

/* View All (Hidden or subtle as per Figma color rgba(0,0,0,0.01)) */
.trending-v2-view-all {
    display: none; /* Based on color 0.01 it seems hidden in mockup */
}

/* Tablet Responsiveness (1024px to 1440px) */
@media (max-width: 1440px) {
    .trending-v2-grid {
        gap: 12px;
        padding: 0 20px;
    }
    .trending-v2-card {
        flex: 0 0 calc(25% - 9px);
    }
}

@media (max-width: 1100px) {
    .trending-v2-grid {
        flex-wrap: wrap;
        gap: 20px;
    }
    .trending-v2-card {
        flex: 0 0 calc(50% - 10px);
        max-width: 100%;
    }
    .trending-v2-heading h2 {
        line-height: 40px;
    }
}

/* Mobile Responsiveness */
@media (max-width: 650px) {
    .trending-collections-v2 {
        padding: 40px 0;
    }
    .trending-v2-grid {
        flex-direction: row; /* Ensure row direction for cards side-by-side */
        flex-wrap: wrap;     /* Allow wrapping for multiple rows */
        justify-content: center;
        gap: 12px;           /* Tighter gap for mobile */
        padding: 0px;
    }
    .trending-v2-card {
        flex: 0 0 calc(50% - 6px); /* 2 cards layout */
        width: calc(50% - 6px);
        max-width: 100%;
        gap: 10px;
    }
    .trending-v2-heading h2 {
        font-size: 24px;
        line-height: 32px;
        padding: 0 15px;
        margin-bottom: 25px;
    }
    .trending-v2-overlay {
        top: 82%; /* Slightly larger overlay for easier mobile tap target */
        background: rgba(0, 0, 0, 0.7); /* Slightly more opaque for better touch contrast */
    }
    .trending-v2-overlay span {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .trending-v2-heading h2 {
        font-size: 24px;
    }
}
