/**
 * Dante Wine Collection Widget - Frontend Styles
 */

/* Section Container */
.dante-wine-section {
    margin: 0 auto;
    font-family: 'Georgia', serif;
}

/* Header */
.section-header {
    margin-bottom: 60px;
}

.wine-heading {
    font-size: 3.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 1.2;
}

.wine-subheading {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.category-tab {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #ddd;
    font-family: inherit;
}

.category-tab:hover,
.category-tab.active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 45, 45, 0.2);
}

/* Category Select (Mobile) */
.category-select-wrapper {
    display: none;
    justify-content: center;
    margin-bottom: 50px;
}

.category-select {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #ddd;
    font-family: inherit;
    background-color: #ffffff;
    color: #6b2d2d;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 15px 50px 15px 40px;
    border-radius: 50px;
    width: auto;
    max-width: 280px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b2d2d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 20px;
}

.category-select:hover,
.category-select:focus {
    border-color: #6b2d2d;
    box-shadow: 0 3px 10px rgba(107, 45, 45, 0.2);
}

/* Wine Slider Container */
.wine-slider-container {
    position: relative;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.wine-slider-container.hidden {
    display: none;
}

/* Swiper Overrides */
.wine-swiper {
    padding: 20px 50px 60px;
}

.wine-swiper .swiper-wrapper {
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.swiper-slide {
    height: auto;
    display: flex;
}

/* Wine Card */
.wine-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
}

.wine-card:hover {
    transform: translateY(-5px);
}

/* Wine Image */
.wine-image {
    position: relative;
    width: 100%;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
}

.wine-image img:not(.wine-badge-image) {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Wine Badge */
.wine-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.wine-badge.sold-out {
    background: #e74c3c !important;
    color: white !important;
}

/* Wine Badge Image */
.wine-badge-image {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 80px;
    height: auto;
    z-index: 2;
    object-fit: contain;
    display: block;
}

/* Wine Info */
.wine-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wine-vintage {
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.wine-name {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.wine-region {
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-style: italic;
}

.wine-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
    flex: 1;
    /* Single line with ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Wine Footer */
.wine-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.wine-price {
    font-size: 1.8rem;
    font-weight: 600;
}

/* Button */
.add-to-cart-btn,
.wine-card-buy-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    padding: 12px 24px;
    border-radius: 5px;
}

.add-to-cart-btn:hover,
.wine-card-buy-btn:hover {
    transform: scale(1.05);
}

.add-to-cart-btn:disabled,
.wine-card-buy-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.add-to-cart-btn:disabled:hover,
.wine-card-buy-btn:disabled:hover {
    transform: none;
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
}

/* Swiper Pagination */
.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
}

/* Single Wine Container */
.single-wine-container {
    max-width: 400px;
    margin: 0 auto;
}

/* GSAP Animation Classes */
.wine-heading.blur-animate {
    overflow: hidden;
}

.wine-heading.blur-animate .word {
    display: inline-block;
    opacity: 0;
    filter: blur(10px);
}

/* Responsive */
@media (max-width: 1024px) {
    .wine-heading {
        font-size: 2.5rem;
    }

    .wine-swiper {
        padding: 20px 40px 60px;
    }
}

@media (max-width: 768px) {
    .wine-heading {
        font-size: 2rem;
    }

    .wine-subheading {
        font-size: 1rem;
    }

    /* Hide tabs and show select dropdown on mobile */
    .category-tabs {
        display: none !important;
    }

    .category-select-wrapper {
        display: flex !important;
    }

    .wine-swiper {
        padding: 20px 30px 50px;
    }

    .wine-image {
        min-height: 300px;
    }

    .wine-name {
        font-size: 1.3rem;
    }

    .wine-price {
        font-size: 1.5rem;
    }

    /* Hide pagination dots on mobile */
    .swiper-pagination {
        display: none !important;
    }

    /* Smaller navigation arrows on mobile to prevent overlap */
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .wine-heading {
        font-size: 1.75rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .category-tabs {
        margin-bottom: 30px;
    }

    .wine-swiper {
        padding: 20px 20px 50px;
    }

    .wine-info {
        padding: 20px;
    }

    .wine-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .add-to-cart-btn,
    .wine-card-buy-btn {
        width: 100%;
    }

    .wine-badge-image {
        width: 60px;
    }

    /* Even smaller arrows on very small screens */
    .swiper-button-next,
    .swiper-button-prev {
        width: 25px;
        height: 25px;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 14px;
    }
}
