/**
 * WineInsight Cellar — redesign (2026-04)
 *
 * All selectors are scoped to .wi-cellar-page so nothing leaks into the
 * scanner result page or the theme. Palette + typography mirrors
 * scanner.css so the two pages feel like the same product.
 */

.wi-cellar-page {
    --wc-bg:           #F5F0EA;
    --wc-bordeaux:     #6B1A2A;
    --wc-bordeaux-mid: #8B2535;
    --wc-bordeaux-deep:#3D0D17;
    --wc-gold:         #9A6B35;
    --wc-gold-light:   #C9A96E;
    --wc-cream-border: rgba(107,26,42,0.13);
    --wc-cream-strong: rgba(107,26,42,0.24);
    --wc-surface:      rgba(107,26,42,0.04);
    --wc-surface-md:   rgba(107,26,42,0.07);
    --wc-surface-hover:rgba(107,26,42,0.09);
    --wc-text-primary: #1C0A0F;
    --wc-text-secondary:#5C3A42;
    --wc-text-muted:   #9C7A82;

    background: var(--wc-bg);
    font-family: 'Inter', sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: visible;
    color: var(--wc-text-primary);
    padding: 0;
}

.wi-cellar-page *,
.wi-cellar-page *::before,
.wi-cellar-page *::after {
    box-sizing: border-box;
}

/* ── Section primitives ────────────────────────────────────────── */
.wi-cellar-page .wi-cellar-divider {
    height: 0.5px;
    margin: 0 24px;
    background: linear-gradient(to right, transparent, var(--wc-cream-strong), transparent);
}
.wi-cellar-page .wi-cellar-sec-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 24px 16px;
}
.wi-cellar-page .wi-cellar-sec-line {
    width: 20px;
    height: 0.5px;
    background: var(--wc-bordeaux);
    opacity: 0.4;
}
.wi-cellar-page .wi-cellar-sec-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--wc-text-muted);
    font-family: 'Inter', sans-serif;
}

/* ── Header ─────────────────────────────────────────────────────── */
.wi-cellar-page .wi-cellar-header {
    padding: 32px 24px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: transparent;
    border: none;
    margin: 0;
}
.wi-cellar-page .wi-cellar-header__left {
    flex: 1;
    min-width: 0;
}
.wi-cellar-page .wi-cellar-header__greeting {
    font-size: 11px;
    font-weight: 400;
    color: var(--wc-text-muted);
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}
.wi-cellar-page .wi-cellar-header__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 38px;
    font-weight: 500;
    color: var(--wc-text-primary);
    line-height: 1;
    margin: 0;
    letter-spacing: 0;
    text-transform: none;
    -webkit-text-fill-color: var(--wc-text-primary);
}
.wi-cellar-page .wi-cellar-header__title em {
    font-style: italic;
    color: var(--wc-bordeaux);
    -webkit-text-fill-color: var(--wc-bordeaux);
}

.wi-cellar-page .wi-cellar-scan-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 11px;
    background: var(--wc-bordeaux);
    border: none;
    color: #F7F0E6;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 6px;
    text-decoration: none;
    line-height: 1;
}
.wi-cellar-page .wi-cellar-scan-btn:hover {
    background: var(--wc-bordeaux-mid);
    transform: translateY(-1px);
    color: #F7F0E6;
}
.wi-cellar-page .wi-cellar-scan-btn--lg {
    padding: 13px 22px;
    font-size: 13px;
    margin: 0 auto;
}

/* ── Oversigt: stats grid ───────────────────────────────────────── */
.wi-cellar-page .wi-cellar-stats-block {
    padding: 0 24px 24px;
}
.wi-cellar-page .wi-cellar-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.wi-cellar-page .wi-cellar-stat {
    background: rgba(107,26,42,0.04);
    border: 0.5px solid var(--wc-cream-border);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: default;
    box-shadow: none;
}
.wi-cellar-page .wi-cellar-stat:hover {
    background: var(--wc-surface-hover);
    border-color: var(--wc-cream-strong);
}
.wi-cellar-page .wi-cellar-stat--accent {
    background: rgba(107,26,42,0.07);
    border-color: var(--wc-cream-strong);
}
.wi-cellar-page .wi-cellar-stat__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(107,26,42,0.08);
    border: 0.5px solid var(--wc-cream-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wc-bordeaux);
    flex-shrink: 0;
}
.wi-cellar-page .wi-cellar-stat__icon svg {
    stroke: currentColor;
}
.wi-cellar-page .wi-cellar-stat__num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--wc-text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    -webkit-text-fill-color: var(--wc-text-primary);
}
.wi-cellar-page .wi-cellar-stat__num--gold {
    color: var(--wc-gold);
    -webkit-text-fill-color: var(--wc-gold);
}
.wi-cellar-page .wi-cellar-stat__num--bordeaux {
    color: var(--wc-bordeaux);
    -webkit-text-fill-color: var(--wc-bordeaux);
}
.wi-cellar-page .wi-cellar-stat__label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wc-text-muted);
    font-family: 'Inter', sans-serif;
}

/* ── Avg-score card ─────────────────────────────────────────────── */
.wi-cellar-page .wi-cellar-avg-score {
    background: linear-gradient(135deg, rgba(107,26,42,0.08), rgba(107,26,42,0.03));
    border: 0.5px solid var(--wc-cream-strong);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 24px 8px;
}
.wi-cellar-page .wi-cellar-avg-score__num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 52px;
    font-weight: 600;
    color: var(--wc-gold);
    line-height: 1;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    -webkit-text-fill-color: var(--wc-gold);
}
.wi-cellar-page .wi-cellar-avg-score__body {
    flex: 1;
    min-width: 0;
}
.wi-cellar-page .wi-cellar-avg-score__label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wc-text-muted);
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}
.wi-cellar-page .wi-cellar-avg-score__desc {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-style: italic;
    color: var(--wc-text-secondary);
    line-height: 1.3;
    -webkit-text-fill-color: var(--wc-text-secondary);
}
.wi-cellar-page .wi-cellar-avg-score__track {
    height: 3px;
    background: rgba(107,26,42,0.1);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}
.wi-cellar-page .wi-cellar-avg-score__fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(to right, rgba(154,107,53,0.3), var(--wc-gold));
    width: 0%;
    transition: width 1.2s cubic-bezier(0.22,1,0.36,1);
}

/* ── Vine efter land: progress bars ─────────────────────────────── */
.wi-cellar-page .wi-cellar-lands {
    padding: 0 24px 24px;
}
.wi-cellar-page .wi-cellar-land {
    display: grid;
    grid-template-columns: 100px 1fr 40px;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.wi-cellar-page .wi-cellar-land:last-child { margin-bottom: 0; }
.wi-cellar-page .wi-cellar-land__name {
    font-size: 12px;
    font-weight: 400;
    color: var(--wc-text-secondary);
    text-align: right;
    font-family: 'Inter', sans-serif;
}
.wi-cellar-page .wi-cellar-land__track {
    height: 5px;
    background: rgba(107,26,42,0.1);
    border-radius: 3px;
    overflow: hidden;
}
.wi-cellar-page .wi-cellar-land__fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(to right, rgba(107,26,42,0.4), var(--wc-bordeaux));
    width: 0%;
    transition: width 1s cubic-bezier(0.22,1,0.36,1);
}
.wi-cellar-page .wi-cellar-land__count {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--wc-bordeaux);
    text-align: right;
    font-variant-numeric: tabular-nums;
    -webkit-text-fill-color: var(--wc-bordeaux);
}

/* ── Filter block: search + chips ───────────────────────────────── */
.wi-cellar-page .wi-cellar-filter-block {
    padding: 0 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wi-cellar-page .wi-cellar-search-wrap {
    position: relative;
}
.wi-cellar-page .wi-cellar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wc-text-muted);
    pointer-events: none;
}
.wi-cellar-page .wi-cellar-search {
    width: 100%;
    padding: 11px 16px 11px 38px;
    border-radius: 11px;
    border: 0.5px solid var(--wc-cream-strong);
    background: rgba(107,26,42,0.03);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--wc-text-primary);
    outline: none;
    transition: all 0.2s;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}
.wi-cellar-page .wi-cellar-search:focus {
    border-color: var(--wc-bordeaux);
    background: rgba(107,26,42,0.05);
}
.wi-cellar-page .wi-cellar-search::placeholder {
    color: var(--wc-text-muted);
}
.wi-cellar-page .wi-cellar-filter-chips {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    -ms-overflow-style: none;
}
.wi-cellar-page .wi-cellar-filter-chips::-webkit-scrollbar {
    display: none;
}
.wi-cellar-page .wi-cellar-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 0.5px solid var(--wc-cream-strong);
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    color: var(--wc-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
}
.wi-cellar-page .wi-cellar-filter-chip:hover {
    background: var(--wc-surface-hover);
    color: var(--wc-bordeaux);
}
.wi-cellar-page .wi-cellar-filter-chip.active {
    background: var(--wc-bordeaux);
    border-color: var(--wc-bordeaux);
    color: #F7F0E6;
}

/* ── Wine list ──────────────────────────────────────────────────── */
.wi-cellar-page .wi-cellar-wines-block {
    padding: 0 24px 24px;
}
.wi-cellar-page .wi-cellar-sort-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.wi-cellar-page .wi-cellar-sort-label {
    font-size: 11px;
    color: var(--wc-text-muted);
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}
.wi-cellar-page .wi-cellar-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: var(--wc-bordeaux);
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}
.wi-cellar-page .wi-cellar-sort-btn:hover {
    background: var(--wc-surface);
}

.wi-cellar-page .wi-cellar-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    padding: 0;
    margin: 0;
}

.wi-cellar-page .wi-cellar-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--wc-text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
}
.wi-cellar-page .wi-cellar-loading p {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--wc-text-muted);
}
.wi-cellar-page .wi-cellar-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(107,26,42,0.15);
    border-top-color: var(--wc-bordeaux);
    border-radius: 50%;
    margin: 0 auto;
    animation: wi-cellar-spin 0.8s linear infinite;
}
@keyframes wi-cellar-spin {
    to { transform: rotate(360deg); }
}

/* ── Wine card row ──────────────────────────────────────────────── */
.wi-cellar-page .wi-cellar-wine {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 15px;
    background: rgba(107,26,42,0.04);
    border: 0.5px solid var(--wc-cream-border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    box-shadow: none;
}
.wi-cellar-page .wi-cellar-wine:hover {
    background: var(--wc-surface-hover);
    border-color: var(--wc-cream-strong);
    transform: translateX(3px);
    color: inherit;
    text-decoration: none;
}

.wi-cellar-page .wi-cellar-wine__thumb {
    width: 46px;
    height: 64px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: rgba(107,26,42,0.06);
}
.wi-cellar-page .wi-cellar-wine__thumb-bg {
    position: absolute;
    inset: 0;
    border-radius: 8px;
}
.wi-cellar-page .wi-cellar-wine__thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.wi-cellar-page .wi-cellar-wine__bottle {
    position: relative;
    z-index: 1;
}
.wi-cellar-page .wi-cellar-wine__score {
    position: absolute;
    bottom: 3px;
    right: 3px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--wc-gold-light);
    background: rgba(0,0,0,0.55);
    padding: 1px 4px;
    border-radius: 4px;
    z-index: 2;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

.wi-cellar-page .wi-cellar-wine__info {
    flex: 1;
    min-width: 0;
}
.wi-cellar-page .wi-cellar-wine__producer {
    font-size: 10px;
    font-weight: 500;
    color: var(--wc-gold);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 2px;
    font-family: 'Inter', sans-serif;
}
.wi-cellar-page .wi-cellar-wine__name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--wc-text-primary);
    line-height: 1.15;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-text-fill-color: var(--wc-text-primary);
    letter-spacing: 0;
    text-transform: none;
}
.wi-cellar-page .wi-cellar-wine__vintage {
    font-size: 14px;
    color: var(--wc-text-muted);
    font-weight: 400;
    font-style: italic;
}

.wi-cellar-page .wi-cellar-wine__tags {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
}
.wi-cellar-page .wi-cellar-wine__tag {
    padding: 2px 7px;
    border-radius: 8px;
    border: 0.5px solid var(--wc-cream-border);
    background: transparent;
    font-size: 9px;
    color: var(--wc-text-secondary);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.5;
}

.wi-cellar-page .wi-cellar-wine__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}
.wi-cellar-page .wi-cellar-wine__status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
}
.wi-cellar-page .wi-cellar-wine__status--cellar {
    background: rgba(107,26,42,0.08);
    color: var(--wc-bordeaux);
    border: 0.5px solid var(--wc-cream-border);
}
.wi-cellar-page .wi-cellar-wine__status--drunk {
    background: rgba(154,107,53,0.1);
    color: var(--wc-gold);
    border: 0.5px solid rgba(154,107,53,0.2);
}
.wi-cellar-page .wi-cellar-wine__status--wishlist {
    background: rgba(60,40,60,0.08);
    color: #5a2838;
    border: 0.5px solid rgba(90,40,56,0.2);
}
.wi-cellar-page .wi-cellar-wine__status--gift {
    background: rgba(107,26,42,0.05);
    color: var(--wc-text-secondary);
    border: 0.5px solid var(--wc-cream-border);
}
.wi-cellar-page .wi-cellar-wine__status--fav {
    background: rgba(107,26,42,0.06);
    color: #c0392b;
    border: 0.5px solid rgba(192,57,43,0.2);
}

.wi-cellar-page .wi-cellar-wine__date {
    font-size: 10px;
    color: var(--wc-text-muted);
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
}
.wi-cellar-page .wi-cellar-wine__chevron {
    font-size: 14px;
    color: var(--wc-text-muted);
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
.wi-cellar-page .wi-cellar-wine:hover .wi-cellar-wine__chevron {
    transform: translateX(3px);
    color: var(--wc-bordeaux);
}

.wi-cellar-page .wi-cellar-wine__actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    flex-direction: row;
    gap: 4px;
    z-index: 3;
}
.wi-cellar-page .wi-cellar-wine__fav-btn,
.wi-cellar-page .wi-cellar-wine__delete-btn {
    position: static;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 0.5px solid var(--wc-cream-border);
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wc-text-muted);
    transition: all 0.2s ease;
    padding: 0;
    line-height: 0;
}
.wi-cellar-page .wi-cellar-wine__fav-btn:hover {
    background: rgba(255,255,255,0.95);
    color: #c0392b;
    transform: scale(1.08);
}
.wi-cellar-page .wi-cellar-wine__fav-btn.is-favorite {
    color: #c0392b;
    background: rgba(255,255,255,0.95);
    border-color: rgba(192,57,43,0.25);
}
.wi-cellar-page .wi-cellar-wine__delete-btn:hover {
    background: rgba(255,255,255,0.95);
    color: #b93f3f;
    border-color: rgba(185,63,63,0.3);
    transform: scale(1.08);
}
.wi-cellar-page .wi-cellar-wine__delete-btn svg {
    pointer-events: none;
}

/* ── Empty state ────────────────────────────────────────────────── */
.wi-cellar-page .wi-cellar-empty {
    padding: 48px 24px;
    text-align: center;
    background: transparent;
    border: none;
    margin: 0;
}
.wi-cellar-page .wi-cellar-empty__icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(107,26,42,0.06);
    border: 0.5px solid var(--wc-cream-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--wc-bordeaux);
}
.wi-cellar-page .wi-cellar-empty__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    color: var(--wc-text-primary);
    margin: 0 0 8px;
    letter-spacing: 0;
    text-transform: none;
}
.wi-cellar-page .wi-cellar-empty__desc {
    font-size: 13px;
    color: var(--wc-text-muted);
    line-height: 1.6;
    font-weight: 300;
    margin: 0 0 24px;
    font-family: 'Inter', sans-serif;
}

/* ── Pagination ─────────────────────────────────────────────────── */
.wi-cellar-page .wi-cellar-pagination {
    display: flex;
    justify-content: center;
    padding: 0 24px 16px;
}
.wi-cellar-page .wi-cellar-pagination .wi-pagination {
    display: flex;
    gap: 6px;
    align-items: center;
}
.wi-cellar-page .wi-cellar-pagination .wi-cellar-page,
.wi-cellar-page .wi-cellar-pagination .wi-current-page {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 8px;
    border: 0.5px solid var(--wc-cream-border);
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    color: var(--wc-text-secondary);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.wi-cellar-page .wi-cellar-pagination .wi-cellar-page:hover {
    background: var(--wc-surface-hover);
    border-color: var(--wc-cream-strong);
    color: var(--wc-bordeaux);
}
.wi-cellar-page .wi-cellar-pagination .wi-current-page {
    background: var(--wc-bordeaux);
    border-color: var(--wc-bordeaux);
    color: #F7F0E6;
}
.wi-cellar-page .wi-cellar-pagination .wi-page-dots {
    padding: 0 4px;
    color: var(--wc-text-muted);
    font-size: 12px;
}

/* ── Tilføj flere vine CTA + hint ───────────────────────────────── */
.wi-cellar-page .wi-cellar-cta-wrap {
    padding: 24px 24px 20px;
}
.wi-cellar-page .wi-cellar-cta {
    background: var(--wc-bordeaux);
    border-radius: 16px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #F7F0E6;
}
.wi-cellar-page .wi-cellar-cta:hover {
    background: var(--wc-bordeaux-mid);
    color: #F7F0E6;
    text-decoration: none;
}
.wi-cellar-page .wi-cellar-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 90% 50%, rgba(201,169,110,0.15) 0%, transparent 60%);
    pointer-events: none;
}
.wi-cellar-page .wi-cellar-cta__body {
    position: relative;
    flex: 1;
    min-width: 0;
}
.wi-cellar-page .wi-cellar-cta__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 500;
    color: #F7F0E6;
    margin-bottom: 3px;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.15;
    -webkit-text-fill-color: #F7F0E6;
}
.wi-cellar-page .wi-cellar-cta__desc {
    font-size: 11px;
    color: rgba(247,240,230,0.6);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
}
.wi-cellar-page .wi-cellar-cta__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0.5px solid rgba(247,240,230,0.2);
    background: rgba(247,240,230,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #F7F0E6;
    position: relative;
}

.wi-cellar-page .wi-cellar-sync-hint {
    text-align: center;
    font-size: 10px;
    color: var(--wc-text-muted);
    padding: 0 24px 24px;
    letter-spacing: 0.04em;
    font-family: 'Inter', sans-serif;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .wi-cellar-page .wi-cellar-header__title    { font-size: 32px; }
    .wi-cellar-page .wi-cellar-avg-score__num   { font-size: 44px; }
    .wi-cellar-page .wi-cellar-wine__thumb      { width: 42px; height: 58px; }
    .wi-cellar-page .wi-cellar-wine__name       { font-size: 15px; }
    .wi-cellar-page .wi-cellar-wine__right      { display: none; }
    .wi-cellar-page .wi-cellar-land             { grid-template-columns: 80px 1fr 30px; }
}

/* =============================================================================
   WINE-DETAIL MODAL
   Bottom-sheet-style slide-up modal that covers the viewport with a dimmed
   backdrop. Opened by clicking a .wi-cellar-wine row. CSS is NOT scoped to
   .wi-cellar-page because the modal portal is rendered at the same level —
   we scope each rule with the .wi-modal-overlay ancestor instead.
   ============================================================================= */

.wi-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28,10,15,0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.wi-modal-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.wi-modal-overlay .wi-modal {
    background: #F5F0EA;
    width: 100%;
    max-width: 560px;
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.38s cubic-bezier(0.22,1,0.36,1);
    scrollbar-width: none;
    font-family: 'Inter', sans-serif;
    color: #1C0A0F;
    box-sizing: border-box;
}
.wi-modal-overlay .wi-modal::-webkit-scrollbar { display: none; }
.wi-modal-overlay.is-open .wi-modal { transform: translateY(0); }

.wi-modal-overlay *,
.wi-modal-overlay *::before,
.wi-modal-overlay *::after {
    box-sizing: border-box;
}

.wi-modal-overlay .wi-modal-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(107,26,42,0.18);
    margin: 14px auto 0;
}

/* Hero — bottle SVG on gradient background (or uploaded image) */
.wi-modal-overlay .wi-modal-hero {
    height: 220px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 14px 16px 0;
    border-radius: 16px;
}
.wi-modal-overlay .wi-modal-hero-bg {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(160deg,#3D0D17,#6B1A2A);
}
.wi-modal-overlay .wi-modal-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}
.wi-modal-overlay .wi-modal-hero-fade {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 90px;
    border-radius: 0 0 16px 16px;
    background: linear-gradient(to bottom, transparent, #F5F0EA);
    pointer-events: none;
}
.wi-modal-overlay .wi-modal-bottle {
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
    animation: wi-modal-float 5s ease-in-out infinite;
    position: relative;
    z-index: 1;
}
@keyframes wi-modal-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}
.wi-modal-overlay .wi-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(20,5,10,0.6);
    border: 0.5px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(247,240,230,0.85);
    font-size: 15px;
    z-index: 10;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
    font-family: 'Inter', sans-serif;
}
.wi-modal-overlay .wi-modal-close:hover {
    background: rgba(107,26,42,0.85);
    color: #F7F0E6;
}
.wi-modal-overlay .wi-modal-score-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(20,5,10,0.6);
    border: 0.5px solid rgba(201,169,110,0.3);
    border-radius: 10px;
    padding: 7px 12px;
    text-align: center;
    z-index: 5;
}
.wi-modal-overlay .wi-modal-score-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 600;
    color: #C9A96E;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.wi-modal-overlay .wi-modal-score-label {
    font-size: 9px;
    color: rgba(247,240,230,0.55);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
    font-family: 'Inter', sans-serif;
}

/* Body */
.wi-modal-overlay .wi-modal-body {
    padding: 20px 24px 40px;
}
.wi-modal-overlay .wi-modal-producer {
    font-size: 11px;
    font-weight: 500;
    color: #9A6B35;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}
.wi-modal-overlay .wi-modal-producer:empty { display: none; }
.wi-modal-overlay .wi-modal-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 500;
    color: #1C0A0F;
    line-height: 1;
    margin: 0 0 6px;
    letter-spacing: 0;
}
.wi-modal-overlay .wi-modal-meta {
    font-size: 12px;
    color: #9C7A82;
    margin-bottom: 18px;
    font-family: 'Inter', sans-serif;
}

/* 3-col KPI */
.wi-modal-overlay .wi-modal-kpi {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: rgba(107,26,42,0.04);
    border: 0.5px solid rgba(107,26,42,0.13);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}
.wi-modal-overlay .wi-modal-kpi-item {
    padding: 12px 8px;
    text-align: center;
    position: relative;
}
.wi-modal-overlay .wi-modal-kpi-item + .wi-modal-kpi-item::before {
    content: '';
    position: absolute;
    left: 0; top: 15%;
    height: 70%;
    width: 0.5px;
    background: rgba(107,26,42,0.24);
}
.wi-modal-overlay .wi-modal-kpi-label {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9C7A82;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}
.wi-modal-overlay .wi-modal-kpi-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 600;
    color: #1C0A0F;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.wi-modal-overlay .wi-modal-kpi-value--gold {
    color: #9A6B35;
}

/* Section mini-header */
.wi-modal-overlay .wi-modal-sec {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 20px 0 10px;
}
.wi-modal-overlay .wi-modal-sec-line {
    width: 14px;
    height: 0.5px;
    background: #6B1A2A;
    opacity: 0.4;
}
.wi-modal-overlay .wi-modal-sec-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9C7A82;
    font-family: 'Inter', sans-serif;
}

/* Status selector */
.wi-modal-overlay .wi-modal-status-row {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.wi-modal-overlay .wi-modal-status-btn {
    flex: 1 1 calc(50% - 3px);
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    border-radius: 10px;
    border: 0.5px solid rgba(107,26,42,0.24);
    background: rgba(107,26,42,0.04);
    font-size: 11px;
    font-weight: 500;
    color: #5C3A42;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    line-height: 1.3;
    white-space: nowrap;
}
.wi-modal-overlay .wi-modal-status-btn:hover {
    background: rgba(107,26,42,0.09);
}
.wi-modal-overlay .wi-modal-status-btn.is-active {
    background: #6B1A2A;
    border-color: #6B1A2A;
    color: #F7F0E6;
}
.wi-modal-overlay .wi-modal-status-btn[data-status="favorite"].is-active {
    background: #c0392b;
    border-color: #c0392b;
}

/* Taste rows */
.wi-modal-overlay .wi-modal-taste-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.wi-modal-overlay .wi-modal-taste-row:last-child { margin-bottom: 0; }
.wi-modal-overlay .wi-modal-taste-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9C7A82;
    padding-top: 6px;
    min-width: 44px;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}
.wi-modal-overlay .wi-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.wi-modal-overlay .wi-modal-tag-grape {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 16px;
    border: 0.5px solid rgba(107,26,42,0.24);
    background: rgba(107,26,42,0.08);
    font-size: 11px;
    font-weight: 500;
    color: #6B1A2A;
    font-family: 'Inter', sans-serif;
}
.wi-modal-overlay .wi-modal-tag-grape::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #9A6B35;
}
.wi-modal-overlay .wi-modal-tag-flavour {
    padding: 5px 11px;
    border-radius: 16px;
    border: 0.5px solid rgba(0,0,0,0.09);
    background: rgba(0,0,0,0.04);
    font-size: 11px;
    color: #5C3A42;
    font-family: 'Inter', sans-serif;
}

/* Bars */
.wi-modal-overlay .wi-modal-bar {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.wi-modal-overlay .wi-modal-bar:last-child { margin-bottom: 0; }
.wi-modal-overlay .wi-modal-bar-name {
    font-size: 11px;
    color: #5C3A42;
    text-align: right;
    font-family: 'Inter', sans-serif;
}
.wi-modal-overlay .wi-modal-bar-track {
    height: 4px;
    background: rgba(107,26,42,0.1);
    border-radius: 2px;
    overflow: hidden;
}
.wi-modal-overlay .wi-modal-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(to right, rgba(107,26,42,0.3), #6B1A2A);
    transition: width 1s cubic-bezier(0.22,1,0.36,1);
    width: 0%;
}
.wi-modal-overlay .wi-modal-bar-fill--gold {
    background: linear-gradient(to right, rgba(154,107,53,0.3), #9A6B35);
}
.wi-modal-overlay .wi-modal-bar-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    font-weight: 500;
    color: #1C0A0F;
    line-height: 1;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.wi-modal-overlay .wi-modal-bar-desc {
    font-size: 9px;
    color: #9C7A82;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: right;
    margin-top: 2px;
    font-family: 'Inter', sans-serif;
}

/* Food pairings */
.wi-modal-overlay .wi-modal-food {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.wi-modal-overlay .wi-modal-food-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: rgba(107,26,42,0.04);
    border: 0.5px solid rgba(107,26,42,0.13);
    border-radius: 10px;
    transition: background 0.2s;
}
.wi-modal-overlay .wi-modal-food-item:hover {
    background: rgba(107,26,42,0.09);
}
.wi-modal-overlay .wi-modal-food-emoji {
    font-size: 20px;
    line-height: 1;
}
.wi-modal-overlay .wi-modal-food-name {
    font-size: 9px;
    font-weight: 500;
    color: #5C3A42;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    font-family: 'Inter', sans-serif;
}

/* Producer note */
.wi-modal-overlay .wi-modal-note {
    background: rgba(107,26,42,0.05);
    border-left: 1.5px solid #8B2535;
    border-radius: 0 10px 10px 0;
    padding: 14px 16px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    font-style: italic;
    color: #5C3A42;
    line-height: 1.7;
}

/* Similar wines */
.wi-modal-overlay .wi-modal-sim {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: rgba(107,26,42,0.04);
    border: 0.5px solid rgba(107,26,42,0.13);
    border-radius: 11px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}
.wi-modal-overlay .wi-modal-sim:hover {
    background: rgba(107,26,42,0.09);
    border-color: rgba(107,26,42,0.24);
    color: inherit;
}
.wi-modal-overlay .wi-modal-sim-body { flex: 1; min-width: 0; }
.wi-modal-overlay .wi-modal-sim-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 500;
    color: #1C0A0F;
    line-height: 1.2;
}
.wi-modal-overlay .wi-modal-sim-meta {
    font-size: 10px;
    color: #9C7A82;
    margin-top: 2px;
    font-family: 'Inter', sans-serif;
}
.wi-modal-overlay .wi-modal-sim-match {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 500;
    color: #9A6B35;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.wi-modal-overlay .wi-modal-sim-arrow {
    font-size: 14px;
    color: #9C7A82;
    margin-left: 2px;
    flex-shrink: 0;
}

/* Actions */
.wi-modal-overlay .wi-modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}
.wi-modal-overlay .wi-modal-btn-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 11px;
    background: #6B1A2A;
    border: none;
    color: #F7F0E6;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}
.wi-modal-overlay .wi-modal-btn-primary:hover {
    background: #8B2535;
    transform: translateY(-1px);
}
.wi-modal-overlay .wi-modal-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 11px;
    background: transparent;
    border: 0.5px solid rgba(107,26,42,0.24);
    color: #6B1A2A;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.wi-modal-overlay .wi-modal-btn-ghost:hover {
    background: rgba(107,26,42,0.08);
}

/* Lock body scroll when open */
body.wi-modal-open {
    overflow: hidden;
}

/* Mobile tweaks */
@media (max-width: 480px) {
    .wi-modal-overlay .wi-modal            { max-height: 94vh; }
    .wi-modal-overlay .wi-modal-hero       { height: 180px; }
    .wi-modal-overlay .wi-modal-name       { font-size: 30px; }
    .wi-modal-overlay .wi-modal-body       { padding: 18px 18px 36px; }
    .wi-modal-overlay .wi-modal-kpi-value  { font-size: 17px; }
    .wi-modal-overlay .wi-modal-status-btn { flex-basis: calc(50% - 3px); }
}

/* ── Login prompt (logged-out users) ────────────────────────────── */
.wi-cellar-page .wi-login-required {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
    padding: 48px 32px;
    background: #FFFFFF;
    border-radius: 16px;
    border: 0.5px solid var(--wc-cream-strong);
    box-shadow: 0 4px 20px rgba(61,13,23,0.08);
}
.wi-cellar-page .wi-login-required h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    color: var(--wc-text-primary);
    margin: 0 0 12px;
    font-weight: 500;
}
.wi-cellar-page .wi-login-required > p {
    color: var(--wc-text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 28px;
    font-family: 'Inter', sans-serif;
}
