/**
 * Pairing Single Page Styles
 *
 * Styles for /pairing/{slug}/ individual pairing pages
 * Includes hero section, wine grid, serving tips, and content sections
 */

/* =================================================================
   CSS Variables - Champagne/Gold Theme
   ================================================================= */

:root {
  /* 브랜드 그라디언트(헤더/히어로) */
  --brand-grad-start: #f5deb3; /* Champagne light */
  --brand-grad-end:   #c8ad7f; /* Deeper gold */

  /* 기본 포인트(버튼/링크/보더 하이라이트) */
  --primary:       #8c6a2b;    /* Antique gold */
  --primary-hover: #70541f;

  /* 텍스트/중간 텍스트/옅은 텍스트 */
  --text-strong: #2a2a2a;
  --text-mid:    #666666;
  --text-mute:   #9b9b9b;

  /* 배경/카드/보더 */
  --bg-soft:   #faf7f0;
  --card:      #ffffff;
  --border:    #ece7db;

  /* 상태/강조 */
  --danger: #b24a3f;
  --brand-red: #8f2d2d; /* Vivino 로고 색감 유지 용 */
  --warning: #d4b46a;

  /* 보조 그림자 */
  --shadow-weak: rgba(140,106,43,0.08);
  --shadow-mid:  rgba(140,106,43,0.16);
}

/* =================================================================
   Breadcrumb Navigation
   ================================================================= */

.pairing-breadcrumb {
    padding: 15px 0;
    background: linear-gradient(135deg, #fff9f0 0%, #fff5e6 100%);
    border-bottom: 1px solid var(--brand-grad-end);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0 20px;
    font-size: 14px;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.breadcrumb-current {
    color: #666;
    font-weight: 600;
}

.breadcrumb-separator {
    color: #999;
    user-select: none;
}

@media (max-width: 768px) {
    .breadcrumb-list {
        font-size: 13px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .pairing-breadcrumb {
        padding: 12px 0;
    }

    .breadcrumb-list {
        font-size: 12px;
        padding: 0 10px;
        gap: 6px;
    }

    .breadcrumb-separator {
        font-size: 11px;
    }
}

/* =================================================================
   Hero Section
   ================================================================= */

.pairing-hero {
    position: relative;
    background: linear-gradient(135deg, var(--brand-grad-start) 0%, var(--brand-grad-end) 100%);
    color: white;
    margin-bottom: 50px;
}

.pairing-hero-image {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    height: 400px;
    overflow: hidden;
}

.pairing-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1;
}

/* Dark overlay to improve text readability and simplify background */
.pairing-hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.pairing-hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

.pairing-title-section {
    margin-bottom: 20px;
}

.pairing-name-ko {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.pairing-name-en {
    font-size: 20px;
    opacity: 0.9;
    font-weight: 300;
    margin: 0;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.pairing-subtitle {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 20px;
    opacity: 0.95;
    max-width: 800px;
    line-height: 1.5;
}

.pairing-summary {
    max-width: 700px;
    margin: 0 auto;
}

.pairing-summary p {
    font-size: 18px;
    line-height: 1.7;
    opacity: 0.9;
    margin: 0;
}

.pairing-wine-type {
    margin-top: 25px;
    font-size: 16px;
}

.wine-type-label {
    opacity: 0.8;
    margin-right: 8px;
}

.wine-type-value {
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 18px;
    border-radius: 20px;
    display: inline-block;
}

/* =================================================================
   Content Wrapper
   ================================================================= */

.pairing-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.pairing-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.wine-count {
    font-size: 18px;
    color: var(--text-mute);
    font-weight: 400;
}

/* =================================================================
   Recommended Wines Grid
   ================================================================= */

.wines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.wine-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px var(--shadow-weak);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.wine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-mid);
}

.wine-card.out-of-stock {
    opacity: 0.7;
}

.wine-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Wine Image */
.wine-image {
    position: relative;
    width: 100%;
    height: 250px;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wine-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

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

.wine-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wine-comment {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.wine-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-mute);
}

.wine-country,
.wine-grape {
    padding: 4px 10px;
    background: var(--border);
    border-radius: 12px;
}

.wine-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 8px;
}

.wine-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-mid);
}

.vivino-logo {
    font-weight: 700;
    color: var(--brand-red);
}

.rating-value {
    font-weight: 700;
    color: var(--text-strong);
}

/* =================================================================
   Why It Works Section
   ================================================================= */

.pairing-why-section {
    line-height: 1.9;
}

.why-it-works-content {
    font-size: 16px;
    line-height: 1.9;
    color: #000;
    background: var(--bg-soft);
    padding: 35px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.why-it-works-content p {
    margin-bottom: 1.5em;
    line-height: 2.0;
}

.why-it-works-content p:last-child {
    margin-bottom: 0;
}

/* Wine Link Inline Style */
.wine-link {
    display: inline-block;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6cc 100%);
    color: var(--primary);
    padding: 3px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    margin: 0 2px;
    box-shadow: 0 2px 4px rgba(140, 106, 43, 0.1);
}

.wine-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-mid);
    border-color: var(--primary);
}

.wine-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px var(--shadow-mid);
}

/* =================================================================
   Serving Tips
   ================================================================= */

.serving-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.serving-tip-item {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.serving-tip-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px var(--shadow-mid);
    transform: translateY(-2px);
}

.tip-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--brand-grad-start) 0%, var(--brand-grad-end) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.tip-icon::before {
    content: "🍷";
}

/* Icon variations */
.serving-tip-item[data-tip-type="temperature"] .tip-icon::before {
    content: "🌡️";
}

.serving-tip-item[data-tip-type="glass"] .tip-icon::before {
    content: "🥂";
}

.serving-tip-item[data-tip-type="decanting"] .tip-icon::before {
    content: "⏱️";
}

.serving-tip-item[data-tip-type="aeration"] .tip-icon::before {
    content: "💨";
}

.serving-tip-item[data-tip-type="opening_prep"] .tip-icon::before {
    content: "⏰";
}

.serving-tip-item[data-tip-type="volume"] .tip-icon::before {
    content: "📏";
}

.serving-tip-item[data-tip-type="storage"] .tip-icon::before {
    content: "🧊";
}

.tip-content {
    flex: 1;
}

.tip-label {
    font-size: 14px;
    color: var(--text-mute);
    margin-bottom: 6px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tip-value {
    font-size: 16px;
    color: var(--text-strong);
    font-weight: 600;
    line-height: 1.5;
}

/* =================================================================
   Additional Notes
   ================================================================= */

.pairing-notes-content {
    font-size: 15px;
    line-height: 1.8;
    color: #34495e;
    background: var(--bg-soft);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--warning);
}

/* =================================================================
   Navigation
   ================================================================= */

.pairing-navigation {
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
}

.back-to-archive {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.back-to-archive:hover {
    color: var(--primary-hover);
    transform: translateX(-5px);
}

/* =================================================================
   Responsive Design
   ================================================================= */

/* Tablet */
@media (max-width: 992px) {
    .pairing-hero-image {
        height: 300px;
    }

    .pairing-name-ko {
        font-size: 38px;
    }

    .pairing-subtitle {
        font-size: 20px;
    }

    .wines-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }

    .serving-tips-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    .pairing-hero-image {
        height: 250px;
    }

    .pairing-name-ko {
        font-size: 32px;
    }

    .pairing-name-en {
        font-size: 16px;
    }

    .pairing-subtitle {
        font-size: 18px;
    }

    .pairing-summary p {
        font-size: 16px;
    }

    .section-title {
        font-size: 26px;
    }

    .wines-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .wine-image {
        height: 200px;
    }

    .serving-tips-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .why-it-works-content,
    .pairing-notes-content {
        padding: 20px 15px;
        font-size: 15px;
        line-height: 2.0;
    }

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

    .why-it-works-content p {
        margin-bottom: 1.8em;
        line-height: 2.1;
    }

    .wine-link {
        padding: 4px 10px;
        font-size: 14px;
        margin: 2px 1px;
        display: inline-block;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .pairing-hero-content {
        padding: 25px 12px;
    }

    .pairing-name-ko {
        font-size: 28px;
    }

    .pairing-subtitle {
        font-size: 16px;
    }

    .pairing-content-wrapper {
        padding: 0 10px 30px;
    }

    .pairing-section {
        margin-bottom: 30px;
    }

    .why-it-works-content,
    .pairing-notes-content {
        padding: 18px 12px;
    }

    .section-title {
        font-size: 22px;
        flex-direction: column;
        align-items: flex-start;
    }

    .wines-grid {
        grid-template-columns: 1fr;
    }

    .wine-card {
        max-width: 350px;
        margin: 0 auto;
    }

    .serving-tip-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .tip-icon {
        margin-bottom: 10px;
    }
}
