/* Marketplace, affiliate & Vinblik Value styles.
   Follows the VINBLIK design system: blue chrome (#1a2849), fixed wine-accent
   stripe palette, 14–16px card radii, 999px pills. */

/* ── Explore tabs ─────────────────────────────────────────────── */
.ex-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.ex-tab {
    flex: 0 0 auto;
    border: 1px solid rgba(0,0,0,0.10);
    background: var(--color-card-bg, #fff);
    color: var(--color-muted, #5b6a63);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.ex-tab:hover { border-color: rgba(0,0,0,0.2); }
.ex-tab.active {
    background: #1a2849;
    border-color: #1a2849;
    color: #fff;
}

/* ── Marketplace shelves ──────────────────────────────────────── */
.market-shelf { margin-bottom: 1.6rem; }
.market-shelf-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.55rem;
}
.market-shelf-eyebrow {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-muted, #5b6a63);
    opacity: 0.7;
}
.market-shelf-title {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.1;
    color: var(--color-dark-text, #131a17);
    margin: 0;
}
.market-shelf-head-right { display: flex; align-items: center; gap: 0.5rem; }
.market-shelf-count { font-size: 0.78rem; color: var(--color-muted, #5b6a63); opacity: 0.7; }
.market-info-btn {
    border: 1px solid rgba(26,40,73,0.25);
    background: #e8ecf6;
    color: #1a2849;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 0.7rem; font-weight: 700;
    cursor: pointer; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
}
.market-info-pop {
    background: #e8ecf6;
    border: 1px solid rgba(26,40,73,0.18);
    color: #1c2420;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.78rem;
    line-height: 1.45;
    margin-bottom: 0.6rem;
}
.market-shelf-scroll {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.market-shelf-scroll::-webkit-scrollbar { height: 6px; }
.market-shelf-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 999px; }

/* Expandable shelf grid — rows of cards with progressive "View more" reveal */
.market-shelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.7rem;
    padding: 4px 2px 2px;
}
/* Card must fill its grid cell (base style has fixed 190px width for scroll context) */
.market-shelf-grid .market-card { width: 100%; }
.market-shelf-more {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-tertiary-button, #f4f6f5);
    border: 1px solid rgba(19,26,23,0.10);
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-body, 'Inter', sans-serif);
    color: var(--color-brand, #1a2849);
    cursor: pointer;
    text-align: center;
    transition: background 0.12s, border-color 0.12s;
}
.market-shelf-more:hover {
    background: var(--color-secondary-button, #e8ecf6);
    border-color: rgba(19,26,23,0.18);
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.7rem;
}
.market-bycountry-head {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-dark-text, #131a17);
    margin: 0.4rem 0 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(19,26,23,0.08);
}

/* ── Region drill-down: breadcrumb + horizontal country/region pills ──── */
.region-crumbs {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem;
    margin: -0.3rem 0 0.6rem;
}
.region-crumb {
    background: none; border: none; padding: 0;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.78rem; font-weight: 700; cursor: pointer;
    color: var(--color-brand, #1a2849);
    transition: opacity 0.12s;
}
.region-crumb:hover { opacity: 0.7; text-decoration: underline; }
.region-crumb.active { color: var(--color-dark-text, #131a17); cursor: default; }
.region-crumb.active:hover { opacity: 1; text-decoration: none; }
.region-crumb-sep { color: var(--color-muted, #6b736f); opacity: 0.5; font-size: 0.72rem; }

.region-pills {
    display: flex; gap: 0.45rem;
    overflow-x: auto; scrollbar-width: thin;
    padding: 0.1rem 0.1rem 0.7rem;
    margin-bottom: 0.4rem;
    -webkit-overflow-scrolling: touch;
}
.region-pills::-webkit-scrollbar { height: 6px; }
.region-pills::-webkit-scrollbar-thumb { background: rgba(19,26,23,0.14); border-radius: 999px; }
.region-pill {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: var(--color-tertiary-button, #f4f6f5);
    border: 1px solid rgba(19,26,23,0.10);
    border-radius: 999px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.8rem; font-weight: 600; white-space: nowrap;
    color: var(--color-dark-text, #131a17);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.region-pill:hover {
    background: var(--color-secondary-button, #e8ecf6);
    border-color: rgba(19,26,23,0.20);
    transform: translateY(-1px);
}
.region-pill-count {
    font-size: 0.68rem; font-weight: 700;
    color: var(--color-brand, #1a2849);
    background: rgba(26,40,73,0.08);
    padding: 0.05rem 0.4rem; border-radius: 999px;
}

/* ── Partner shops rail (affiliate stores in the discovery foot) ──────── */
.ps-shelf { margin-top: 1.25rem; }
.ps-shelf-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; margin-bottom: 0.7rem;
}
.ps-shelf-titleblock { display: flex; flex-direction: column; gap: 0.15rem; }
.ps-shelf-eyebrow {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--color-muted, #6b736f); opacity: 0.7;
}
.ps-shelf-title {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 1.45rem; font-weight: 500; line-height: 1.1;
    color: var(--color-dark-text, #131a17);
}
.ps-shelf-count { font-size: 0.78rem; color: var(--color-muted, #6b736f); opacity: 0.7; white-space: nowrap; }
.ps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.7rem;
    padding: 4px 2px 12px;
}
.ps-card {
    display: flex; flex-direction: column;
    background: var(--color-card-bg, #fff);
    border: 1px solid rgba(19,26,23,0.08); border-radius: 14px;
    overflow: hidden; cursor: pointer; text-decoration: none; color: inherit;
    transition: border-color 0.14s, box-shadow 0.14s, transform 0.14s;
}
.ps-card:hover {
    border-color: rgba(19,26,23,0.18);
    box-shadow: 0 4px 18px rgba(19,26,23,0.08);
    transform: translateY(-1px);
}
.ps-head { padding: 14px 14px 10px; display: flex; align-items: center; gap: 10px; color: #fff; }
.ps-avatar {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.32);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 1rem; font-weight: 600; flex-shrink: 0;
}
.ps-headmeta { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ps-name {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 1.05rem; font-weight: 500; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps-headstats { font-size: 0.7rem; opacity: 0.85; }
.ps-body { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.ps-topwines { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; }
.ps-wine-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ps-wine-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.1); }
.ps-wine-info { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.ps-wine-producer {
    font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--color-muted, #6b736f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%;
}
.ps-wine-name {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 0.86rem; color: var(--color-dark-text, #131a17);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps-price-pill {
    font-size: 0.68rem; font-weight: 700; background: rgba(0,0,0,0.04);
    color: var(--color-dark-text, #131a17); padding: 1px 6px; border-radius: 6px; flex-shrink: 0;
}
.ps-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding-top: 4px; margin-top: auto; }
.ps-signal { font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em; }
.ps-signal.linkout  { background: rgba(26,40,73,0.08);  color: #1a2849; border: 1px solid rgba(26,40,73,0.18); }
.ps-signal.wishlist { background: rgba(37,99,235,0.10); color: #1d4ed8; border: 1px solid rgba(37,99,235,0.22); }
.ps-signal.deal     { background: rgba(124,58,237,0.10); color: #6d28d9; border: 1px solid rgba(124,58,237,0.22); }

/* ── Market wine card ─────────────────────────────────────────── */
.market-card {
    flex: 0 0 190px;
    width: 190px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: var(--color-card-bg, #fff);
    border: 1px solid rgba(19,26,23,0.08);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.14s, box-shadow 0.14s, transform 0.14s;
}
.market-grid .market-card { width: auto; flex: 1 1 auto; }
.market-card:hover {
    border-color: rgba(19,26,23,0.18);
    box-shadow: 0 4px 16px rgba(19,26,23,0.08);
    transform: translateY(-1px);
}
.market-stripe { height: 4px; width: 100%; background: #8B0000; }
.market-stripe.red       { background: #8B0000; }
.market-stripe.white     { background: #E7D58A; }
.market-stripe.rose      { background: #F2A1B3; }
.market-stripe.sparkling { background: #D4AF37; }
.market-stripe.orange    { background: #E67E22; }
.market-stripe.sweet     { background: #B5651D; }

.market-card-body { padding: 0.6rem 0.7rem 0.7rem; display: flex; flex-direction: column; gap: 0.15rem; }
.market-card-img {
    height: 96px;
    margin: -0.1rem -0.1rem 0.4rem;
    border-radius: 8px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.market-card-img img { max-height: 92px; max-width: 100%; object-fit: contain; }
.market-card-img-placeholder { font-size: 2rem; opacity: 0.25; line-height: 1; }
.value-pill {
    align-self: flex-start;
    background: #e8ecf6;
    color: #1a2849;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    margin-bottom: 0.2rem;
}
.market-card-producer {
    font-size: 0.58rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--color-muted, #5b6a63);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.market-card-name {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 0.96rem; font-weight: 600; line-height: 1.15;
    color: var(--color-dark-text, #131a17);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.market-card-meta { font-size: 0.68rem; color: var(--color-muted, #5b6a63); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-card-price { display: flex; align-items: baseline; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.3rem; }
.market-price-old { font-size: 0.72rem; color: var(--color-muted, #5b6a63); text-decoration: line-through; }
.market-price-new { font-size: 0.95rem; font-weight: 700; color: var(--color-dark-text, #131a17); }
.market-price-cur { font-size: 0.68rem; color: var(--color-muted, #5b6a63); }
.market-discount {
    font-size: 0.62rem; font-weight: 700; color: #14532d;
    background: rgba(34,197,94,0.10); border: 1px solid rgba(34,197,94,0.22);
    border-radius: 999px; padding: 0.05rem 0.4rem; margin-left: auto;
}
.market-card-seller { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.35rem; flex-wrap: wrap; }
.market-seller-name { font-size: 0.66rem; color: var(--color-muted, #5b6a63); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-seller-more { font-size: 0.62rem; color: var(--color-muted, #5b6a63); opacity: 0.7; }

/* ── Partner tag (neutral link-out chip, equal prominence) ────── */
.partner-tag {
    display: inline-flex; align-items: center;
    font-size: 0.62rem; font-weight: 600;
    color: var(--color-muted, #5b6a63);
    background: #eef2f0;
    border: 1px solid #e4eae7;
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
    white-space: nowrap;
}

/* ── Wine page: value banner + buy online ─────────────────────── */
.wine-value-banner {
    display: flex; align-items: center; gap: 0.6rem;
    background: #e8ecf6;
    border: 1px solid rgba(26,40,73,0.16);
    border-radius: 12px;
    padding: 0.6rem 0.85rem;
    margin: 0.4rem 0 0.6rem;
}
.wine-value-banner .value-pill { font-size: 0.82rem; padding: 0.2rem 0.6rem; margin: 0; }

.buy-online-list { display: flex; flex-direction: column; gap: 0.45rem; }
.buy-online-row {
    display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
    border: 1px solid rgba(19,26,23,0.08);
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    background: var(--color-card-bg, #fff);
}
.buy-online-info { display: flex; align-items: baseline; gap: 0.35rem; flex: 1; min-width: 120px; }
.buy-online-store { font-weight: 700; color: var(--color-dark-text, #131a17); font-size: 0.86rem; }
.buy-online-price { display: flex; align-items: baseline; gap: 0.3rem; }
.buy-online-amount { font-weight: 700; color: var(--color-dark-text, #131a17); }
.buy-online-btn {
    background: #1a2849; color: #f6fbf8;
    border: none; border-radius: 10px;
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem; font-weight: 700; cursor: pointer;
    transition: opacity 0.12s;
}
.buy-online-btn:hover { opacity: 0.88; }

/* ── Affiliate store page ─────────────────────────────────────── */
.affiliate-page { padding-bottom: 3rem; }
.affiliate-back {
    display: inline-block;
    font-size: 0.8rem; font-weight: 600;
    color: var(--color-muted, #5b6a63);
    text-decoration: none;
    margin-bottom: 0.6rem;
}
.affiliate-hero {
    border-radius: 16px;
    padding: 1.6rem 1.4rem;
    color: #fff;
    margin-bottom: 1.4rem;
}
.affiliate-hero-inner { display: flex; flex-direction: column; gap: 0.5rem; }
.affiliate-hero-badge {
    align-self: flex-start;
    font-size: 0.58rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 999px; padding: 0.15rem 0.55rem;
}
.affiliate-hero-name {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 2rem; font-weight: 600; line-height: 1.05; margin: 0; color: #fff;
}
.affiliate-hero-desc { font-size: 0.9rem; color: rgba(255,255,255,0.86); margin: 0; max-width: 60ch; line-height: 1.5; }
.affiliate-hero-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem; color: rgba(255,255,255,0.82); margin-top: 0.3rem; }
.affiliate-visit {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.34);
    color: #fff;
    border-radius: 10px; padding: 0.4rem 0.85rem;
    font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.affiliate-visit:hover { background: rgba(255,255,255,0.26); }

.affiliate-region { margin-bottom: 1.6rem; }
.affiliate-region-title {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 1.3rem; font-weight: 600; color: var(--color-dark-text, #131a17);
    margin: 0 0 0.7rem;
}
.affiliate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.7rem;
}
.affiliate-card { width: auto; flex: 1 1 auto; }
.affiliate-buy {
    margin-top: 0.5rem;
    width: 100%;
    background: #1a2849; color: #f6fbf8;
    border: none; border-radius: 10px;
    padding: 0.5rem 0.6rem;
    font-size: 0.76rem; font-weight: 700; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.affiliate-buy:hover { opacity: 0.88; }

/* ── Wishlist partner chip ────────────────────────────────────── */
.wl-chip.partner {
    color: #5b6a63;
    background: #eef2f0;
    border: 1px solid #e4eae7;
}

/* ── Merchant inventory importer ──────────────────────────────── */
.inv-summary { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.inv-stat {
    flex: 1; min-width: 90px;
    background: #f4f6f5; border: 1px solid #e4eae7; border-radius: 12px;
    padding: 0.6rem 0.7rem;
    display: flex; flex-direction: column; gap: 0.1rem;
}
.inv-num { font-size: 1.3rem; font-weight: 800; color: #1a2849; line-height: 1; }
.inv-lbl { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5b6a63; }
.inv-mapping {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem 0.8rem;
    margin: 0.7rem 0;
}
.inv-map-row { display: flex; flex-direction: column; gap: 0.2rem; }
.inv-map-label { font-size: 0.72rem; font-weight: 700; color: #5d4b3f; }
.inv-errors { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: 0.75rem; line-height: 1.5; }
