/* ========================================
   Wine Portfolio Component Styles
   ======================================== */

/* Wine Portfolio Preview (on cards) */
.wine-portfolio-preview {
    margin-top: 16px;
    margin-bottom: 12px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    /* Prevent overflow */
    width: 100%;
    box-sizing: border-box;
    /* Ensure it stays within card bounds */
    overflow: hidden;
}

.portfolio-header {
    margin-bottom: 12px;
}

.portfolio-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #7c2d12;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.wine-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    /* Prevent overflow */
    max-width: 100%;
    overflow: hidden;
}

.wine-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #fef2f2;
    border-radius: 8px;
    /* Prevent text overflow */
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.wine-preview-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    /* Allow text to wrap and prevent overflow */
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.wine-preview-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    /* Prevent text overflow */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.wine-preview-type {
    font-size: 11px;
    color: #7c2d12;
    text-transform: uppercase;
}

.wine-preview-price {
    font-size: 14px;
    font-weight: 700;
    color: #7c2d12;
    /* Prevent shrinking */
    flex-shrink: 0;
    margin-left: 8px;
    white-space: nowrap;
}

.view-all-wines {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: #7c2d12;
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.view-all-wines:hover {
    background: #991b1b;
}

/* Wine Portfolio Section (on detail page) */
.wine-portfolio-section {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E7EB;
    margin-top: 40px;
    box-sizing: border-box;
    width: 100%;
}

.wine-portfolio-section .section-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 0;
}

.wine-portfolio-section .section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 8px;
    padding-bottom: 16px;
    border-bottom: 2px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.wine-portfolio-section .section-header h2 i {
    color: #7c2d12;
    font-size: 22px;
}

.wine-portfolio-section .section-header p {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    text-align: left;
}

/* Wine Portfolio Grid */
.wine-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
    width: 100%;
    box-sizing: border-box;
}

.wine-portfolio-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.wine-portfolio-card:hover {
    box-shadow: 0 8px 24px rgba(124, 45, 18, 0.15);
    transform: translateY(-4px);
}

/* Wine Card Image */
.wine-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.wine-card-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.wine-portfolio-card:hover .wine-card-image img {
    transform: scale(1.05);
}

.wine-no-image {
    font-size: 64px;
    color: #f87171;
    opacity: 0.3;
}

.wine-type-badge {
    position: absolute;
    top: 12px;
    right: 55px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wine-type-badge.red {
    background: #991b1b;
    color: white;
}

.wine-type-badge.white {
    background: #fef3c7;
    color: #92400e;
}

.wine-type-badge.rose {
    background: #fce7f3;
    color: #9f1239;
}

.wine-type-badge.amber {
    background: #fed7aa;
    color: #7c2d12;
}

.wine-type-badge.sparkling {
    background: #dbeafe;
    color: #1e40af;
}

.wine-type-badge.dessert {
    background: #e9d5ff;
    color: #6b21a8;
}

/* Wine Card Content */
.wine-card-content {
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.wine-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
}

.wine-card-grape {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wine-card-grape i {
    color: #7c2d12;
}

.wine-card-specs {
    display: flex;
    gap: 16px;
    margin: 12px 0;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.wine-card-specs .spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
}

.wine-card-specs .spec-item i {
    color: #7c2d12;
}

.wine-card-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 12px 0;
}

.wine-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.wine-card-price {
    font-size: 24px;
    font-weight: 700;
    color: #7c2d12;
}

.btn-wine-details {
    padding: 8px 16px;
    background: #7c2d12;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-wine-details:hover {
    background: #991b1b;
}

/* Wine Modal */
.wine-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wine-modal.active {
    display: flex;
}

.wine-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.wine-modal-content {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

#wine-modal-body {
    position: relative;
}

.wine-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1001;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.wine-modal-close:hover {
    background: #f3f4f6;
    color: #7c2d12;
    transform: scale(1.1);
}

.wine-modal-close:active {
    transform: scale(0.95);
}

.wine-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    padding: 40px;
}

.wine-modal-image {
    position: sticky;
    top: 40px;
    height: fit-content;
}

.wine-modal-image img {
    width: 100%;
    border-radius: 16px;
}

.wine-modal-no-image {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: #f87171;
    opacity: 0.3;
}

.wine-modal-details h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
}

.wine-name-ka {
    font-size: 18px;
    color: #6b7280;
    margin: 0 0 16px;
}

.wine-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    font-size: 15px;
    color: #374151;
}

.wine-detail-item i {
    color: #7c2d12;
    font-size: 18px;
}

.wine-detail-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin: 24px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.wine-detail-specs .spec-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wine-detail-specs .spec-item i {
    font-size: 24px;
    color: #7c2d12;
}

.wine-detail-specs .spec-item div {
    display: flex;
    flex-direction: column;
}

.wine-detail-specs .spec-item strong {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wine-detail-specs .spec-item span {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.wine-modal-price {
    font-size: 36px;
    font-weight: 700;
    color: #7c2d12;
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: 12px;
    text-align: center;
}

.wine-modal-description {
    margin: 24px 0;
}

.wine-modal-description h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px;
}

.wine-modal-description p {
    font-size: 15px;
    color: #374151;
    line-height: 1.8;
    margin: 0;
}

/* Responsive */
/* Tablet and below - 2 columns */
@media (max-width: 1199px) {
    .wine-portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile - 1 column */
@media (max-width: 767px) {
    .wine-portfolio-section {
        padding: 24px;
        margin-top: 32px;
    }
    
    .wine-portfolio-section .section-header h2 {
        font-size: 20px;
    }
    
    .wine-portfolio-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .wine-modal-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .wine-modal-image {
        position: relative;
        top: 0;
    }

    .wine-modal-details h2 {
        font-size: 24px;
    }

    .wine-modal-price {
        font-size: 28px;
    }

    .wine-modal-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

