/* ==========================================================================
   W Cellar Reviews — 29CM + Vivino Luxury Minimal Style
   ========================================================================== */

/* ── Hero ────────────────────────────────────────────────────────────────── */
.wcr-hero {
    background: #0a0a0a;
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
}
.wcr-hero__inner { max-width: 600px; margin: 0 auto; padding: 0 24px; }
.wcr-hero__title {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 4px;
    margin: 0 0 12px;
    font-family: 'Georgia', serif;
}
.wcr-hero__subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.5);
    margin: 0 0 32px;
    letter-spacing: 1px;
}
.wcr-hero__stats { display: flex; align-items: center; justify-content: center; gap: 16px; }
.wcr-hero__stat { display: flex; align-items: center; gap: 8px; }
.wcr-hero__stat-value { font-size: 36px; font-weight: 600; }
.wcr-hero__stat-stars { display: flex; gap: 2px; }
.wcr-hero__stat-count { font-size: 14px; color: rgba(255,255,255,0.4); }
.wcr-star--hero { width: 18px; height: 18px; }

/* ── Stars (shared) ──────────────────────────────────────────────────────── */
.wcr-star { width: 14px; height: 14px; fill: #d4d4d4; }
.wcr-star--filled { fill: #f59e0b; }

/* ── Container ───────────────────────────────────────────────────────────── */
.wcr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.wcr-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.wcr-toolbar__right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.wcr-filters { display: flex; flex-direction: column; gap: 10px; }
.wcr-filter-group { display: flex; gap: 6px; flex-wrap: wrap; }

.wcr-filter-chip {
    padding: 6px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 100px;
    background: #fff;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.wcr-filter-chip:hover { border-color: #1a1a1a; color: #1a1a1a; }
.wcr-filter-chip--active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.wcr-sort {
    padding: 8px 32px 8px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.wcr-write-btn {
    padding: 10px 24px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
.wcr-write-btn:hover { background: #333; color: #fff; }
.wcr-write-btn--login { background: transparent; color: #1a1a1a; border: 1px solid #e5e5e5; }
.wcr-write-btn--login:hover { background: #f5f5f5; }

/* ── Review Grid — Masonry-like ──────────────────────────────────────────── */
.wcr-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ── Review Card ─────────────────────────────────────────────────────────── */
.wcr-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wcr-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.wcr-card__photos {
    display: grid;
    gap: 2px;
    max-height: 300px;
    overflow: hidden;
}
.wcr-card__photos:has(> :nth-child(2)) { grid-template-columns: 1fr 1fr; }
.wcr-card__photos:has(> :nth-child(3)) { grid-template-columns: 1fr 1fr; }

.wcr-card__photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}
.wcr-card__photo:hover { opacity: 0.9; }
.wcr-card__photos:has(> :only-child) .wcr-card__photo { height: 280px; }

.wcr-card__body { padding: 20px; }

/* Product link */
.wcr-card__product {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 10px;
    transition: background 0.2s;
}
.wcr-card__product:hover { background: #f0f0f0; }
.wcr-card__product-img {
    width: 36px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}
.wcr-card__product-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wcr-card__product-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wcr-card__vintage { font-size: 11px; color: #999; }

/* Rating */
.wcr-card__rating { display: flex; gap: 2px; margin-bottom: 10px; }

/* Content */
.wcr-card__content {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tags */
.wcr-card__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.wcr-tag {
    padding: 3px 10px;
    background: #f5f5f5;
    border-radius: 100px;
    font-size: 11px;
    color: #666;
}

/* Meta: author & date */
.wcr-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
    margin-bottom: 12px;
}
.wcr-card__author { display: flex; align-items: center; gap: 8px; }
.wcr-card__name { font-size: 13px; color: #666; }
.wcr-card__date { font-size: 12px; color: #bbb; }

/* Grade badges */
.wcr-grade {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 600;
}
.wcr-grade--beginner { background: #f3f4f6; color: #6b7280; }
.wcr-grade--enthusiast { background: #fef3c7; color: #92400e; }
.wcr-grade--connoisseur { background: #ede9fe; color: #5b21b6; }
.wcr-grade--sommelier { background: #fce7f3; color: #9d174d; }

/* ── Actions ─────────────────────────────────────────────────────────────── */
.wcr-card__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wcr-like-btn, .wcr-comment-toggle, .wcr-share-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #999;
    padding: 4px;
    transition: color 0.2s;
}
.wcr-like-btn svg, .wcr-comment-toggle svg, .wcr-share-btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}
.wcr-like-btn:hover { color: #e11d48; }
.wcr-like-btn--active { color: #e11d48; }
.wcr-like-btn--active svg { fill: #e11d48; stroke: #e11d48; }
.wcr-comment-toggle:hover { color: #1a1a1a; }

/* Share dropdown */
.wcr-share-group { position: relative; }
.wcr-share-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 6px 0;
    min-width: 160px;
    z-index: 100;
}
.wcr-share-item {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s;
}
.wcr-share-item:hover { background: #f5f5f5; color: #1a1a1a; }

/* ── Comments section ────────────────────────────────────────────────────── */
.wcr-card__comments-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
}
.wcr-card__comments { margin-bottom: 10px; }
.wcr-comment {
    font-size: 13px;
    padding: 6px 0;
    line-height: 1.5;
}
.wcr-comment__author { font-weight: 600; color: #1a1a1a; }
.wcr-comment__text { color: #555; }

.wcr-comment-form { display: flex; gap: 8px; }
.wcr-comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.wcr-comment-input:focus { border-color: #1a1a1a; }
.wcr-comment-submit {
    padding: 8px 16px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.wcr-empty { grid-column: 1 / -1; text-align: center; padding: 80px 20px; }
.wcr-empty__icon { font-size: 64px; margin-bottom: 16px; }
.wcr-empty__text { font-size: 18px; color: #333; margin: 0 0 8px; }
.wcr-empty__sub { font-size: 14px; color: #999; }

/* ── Infinite scroll loader ──────────────────────────────────────────────── */
.wcr-loader { text-align: center; padding: 40px 0; }
.wcr-loader__spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #e5e5e5;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: wcr-spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes wcr-spin { to { transform: rotate(360deg); } }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.wcr-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wcr-lightbox__img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}
.wcr-lightbox__close, .wcr-lightbox__prev, .wcr-lightbox__next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    padding: 12px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.wcr-lightbox__close:hover, .wcr-lightbox__prev:hover, .wcr-lightbox__next:hover { opacity: 1; }
.wcr-lightbox__close { top: 20px; right: 20px; }
.wcr-lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.wcr-lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.wcr-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wcr-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}
.wcr-modal__content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.wcr-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 0;
}
.wcr-modal__header h2 { font-size: 20px; font-weight: 700; margin: 0; }
.wcr-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 4px;
}
.wcr-modal__body { padding: 24px 28px; }
.wcr-modal__footer {
    padding: 16px 28px 24px;
    border-top: 1px solid #f0f0f0;
}

.wcr-form-group { margin-bottom: 24px; }
.wcr-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.wcr-label-hint { font-weight: 400; color: #999; font-size: 12px; }

/* Star input */
.wcr-star-input { display: flex; gap: 4px; }
.wcr-star-pick {
    width: 32px;
    height: 32px;
    fill: #e5e5e5;
    cursor: pointer;
    transition: fill 0.15s, transform 0.15s;
}
.wcr-star-pick:hover { transform: scale(1.1); }
.wcr-star-pick.active { fill: #f59e0b; }

/* Photo upload */
.wcr-photo-upload { display: flex; gap: 8px; flex-wrap: wrap; }
.wcr-photo-previews { display: flex; gap: 8px; flex-wrap: wrap; }
.wcr-photo-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
}
.wcr-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.wcr-photo-preview__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.wcr-photo-add {
    width: 80px;
    height: 80px;
    border: 2px dashed #e5e5e5;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #bbb;
    font-size: 11px;
    gap: 4px;
    transition: border-color 0.2s, color 0.2s;
}
.wcr-photo-add:hover { border-color: #999; color: #666; }

/* Textarea */
.wcr-textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.wcr-textarea:focus { border-color: #1a1a1a; }
.wcr-char-count { text-align: right; font-size: 12px; color: #bbb; margin-top: 4px; }

/* Tag select */
.wcr-tag-select { display: flex; gap: 6px; flex-wrap: wrap; }
.wcr-tag-btn {
    padding: 6px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 100px;
    background: #fff;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.wcr-tag-btn:hover { border-color: #1a1a1a; }
.wcr-tag-btn.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* Submit button */
.wcr-submit-btn {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.wcr-submit-btn:hover { background: #333; }
.wcr-submit-btn:disabled { background: #ccc; cursor: not-allowed; }

/* Product select in form */
.wcr-product-select__loading { color: #999; font-size: 13px; }
.wcr-product-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.wcr-product-option:hover { border-color: #1a1a1a; }
.wcr-product-option.selected { border-color: #1a1a1a; background: #fafafa; }
.wcr-product-option img { width: 32px; height: 42px; object-fit: contain; }
.wcr-product-option__name { font-size: 13px; font-weight: 500; }
.wcr-product-option__vintage { font-size: 11px; color: #999; }

/* ── Fade-up animation ───────────────────────────────────────────────────── */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: wcrFadeUp 0.5s ease forwards;
}
@keyframes wcrFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .wcr-hero { padding: 60px 0 40px; }
    .wcr-hero__title { font-size: 28px; letter-spacing: 2px; }
    .wcr-hero__stat-value { font-size: 28px; }

    .wcr-grid { grid-template-columns: 1fr; gap: 16px; }

    .wcr-toolbar { flex-direction: column; gap: 12px; }
    .wcr-toolbar__right { width: 100%; justify-content: space-between; }

    .wcr-filter-tags { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .wcr-filter-tags::-webkit-scrollbar { display: none; }

    .wcr-modal__content { border-radius: 16px 16px 0 0; max-height: 95vh; margin-top: auto; }
}

@media (min-width: 1024px) {
    .wcr-grid { grid-template-columns: repeat(3, 1fr); }
}
