/* Featured Wines CSS */

/* Container for featured products */
.featured-products-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.featured-products-section .container {
    max-width: 1140px; /* Standard container width */
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: #800020; /* Wine color */
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Featured Wines Grid - using flex for better spacing control */
.wine-cards-grid {
    display: flex;
    justify-content: center; /* Default center alignment */
    flex-wrap: wrap;
    gap: 30px;
    margin: 40px 0;
}

/* Special handling for exactly 2 cards */
.wine-cards-grid:has(.wine-card:nth-child(2):last-child) {
    justify-content: space-between; /* Space evenly when exactly 2 cards */
    max-width: 750px; /* Limit width to ensure proper spacing */
    margin-left: auto;
    margin-right: auto;
}

/* Fixed width for wine cards */
.wine-card {
    width: 340px; /* Fixed width for consistent sizing */
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.wine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Fallback for browsers without :has support */
@supports not (selector(:has(.a))) {
    .wine-cards-grid {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Image Container */
.wine-image {
    position: relative;
    height: 280px; /* Fixed height for image container */
    overflow: hidden;
    background-color: #f9f9f9;
}

.wine-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Image maintains aspect ratio */
    object-position: center;
    transition: transform 0.5s;
}

.wine-card:hover .wine-img {
    transform: scale(1.05);
}

/* Badge */
.wine-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
    letter-spacing: 0.5px;
}

.wine-badge.seasonal {
    background-color: #ff9800;
    color: white;
}

.wine-badge.new {
    background-color: #4caf50;
    color: white;
}

.wine-badge.promotional {
    background-color: #f44336;
    color: white;
}

/* Wine Details - SIGNIFICANTLY IMPROVED TEXT SIZES */
.wine-details {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.wine-name {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem !important; /* MUCH larger font */
    color: #800020;
    margin-bottom: 15px;
    min-height: 70px;
    display: flex;
    align-items: center;
    line-height: 1.1;
    font-weight: 700; /* Much bolder */
    text-shadow: 0 1px 1px rgba(0,0,0,0.1); /* Add slight shadow for emphasis */
}

.wine-region {
    color: #006400;
    font-size: 1.4rem !important; /* MUCH larger font */
    font-weight: 600;
    margin-bottom: 20px;
    font-style: italic;
    line-height: 1.2;
}

.wine-description {
    color: #333; /* Significantly darker for better contrast */
    font-size: 1.2rem !important; /* MUCH larger font */
    line-height: 1.5;
    margin-bottom: 25px;
    min-height: 80px;
}

/* Price Box */
.wine-price-box {
    margin-top: auto;
    font-size: 2.2rem !important; /* MUCH larger font */
    font-weight: 800;
    color: #800020;
    margin-bottom: 20px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1); /* Add slight shadow for emphasis */
}

/* Promotion Info */
.promotion-info {
    color: #7c0321;
    font-size: 1.15rem !important; /* MUCH larger font */
    font-weight: 600;
    margin-bottom: 20px;
    min-height: 20px;
}

/* Wine Button */
.wine-btn {
    display: inline-block;
    background-color: #800020;
    color: white;
    padding: 14px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem !important; /* Larger button text */
    transition: all 0.3s ease;
    border: 2px solid #800020;
    text-align: center;
    margin-top: auto;
    width: 100%;
}

.wine-btn:hover {
    background-color: transparent;
    color: #800020;
    transform: translateY(-2px);
}

/* View All Button */
.view-all-wrapper {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    background-color: #800020;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #800020;
}

.view-all-btn:hover {
    background-color: transparent;
    color: #800020;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .wine-card {
        width: 320px; /* Slightly smaller on tablets */
    }

    /* Reset the 2-card layout on tablets */
    .wine-cards-grid:has(.wine-card:nth-child(2):last-child) {
        max-width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .wine-card {
        width: 100%; /* Full width on mobile */
        max-width: 340px; /* But don't exceed original size */
    }

    .wine-name {
        min-height: auto;
        font-size: 2.3rem !important;
    }

    .wine-description {
        min-height: auto;
    }
}
