/* GradedScout — diseño coleccionista, sin fuentes remotas ni cookies */

:root {
    --color-background: #071318;
    --color-surface: #0c2230;
    --color-primary-text: #e8f4f6;
    --color-secondary-text: #8aabb8;
    --color-accent: #7ef0d2;
    --color-accent-strong: #5ee0c0;
    --color-navy: #0a1e32;
    --color-red: #c83a4a;
    --accent: var(--color-accent);
    --color-border: #1a3d4f;
    --color-warning-bg: #143238;
    --color-warning-text: #d8fff4;
    --color-warning-border: #3d7a72;
    --color-psa: #c41e3a;
    --color-bgs: #15417e;
    --color-cgc: #1b7a4c;
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --font-display: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --font-family: var(--font-sans);
    --spacing-unit: 8px;
    --border-radius: 10px;
    --card-aspect-ratio: 0.718;
    --header-h: 76px;
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    color: var(--color-primary-text);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    background-color: var(--color-navy);
    background-image:
        radial-gradient(1100px 520px at 88% -8%, rgba(126, 240, 210, 0.12), transparent 58%),
        radial-gradient(800px 480px at -8% 12%, rgba(200, 58, 74, 0.10), transparent 52%),
        linear-gradient(180deg, #06111a 0%, #0a1e32 38%, #071318 100%);
    background-attachment: fixed;
}

.container {
    width: min(92%, 1520px);
    margin-left: auto;
    margin-right: auto;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--color-accent);
    color: var(--color-navy);
    padding: 0.5rem 1rem;
    z-index: 100;
    font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --- Cabecera fija --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(10, 30, 50, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(126, 240, 210, 0.28);
    padding: 0.7rem 0;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}
.site-header .brand,
.brand a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    text-decoration: none;
    color: inherit;
}
.brand-logo { width: 44px; height: 44px; display: block; flex-shrink: 0; }
.brand-name {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--color-accent);
    line-height: 1;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: rgba(7, 19, 24, 0.45);
}
.lang-switcher button {
    background: none;
    border: none;
    color: var(--color-secondary-text);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}
.lang-switcher button[aria-current="true"] {
    color: var(--color-navy);
    background: var(--color-accent);
}
.lang-switcher button:hover:not([aria-current="true"]) { color: var(--color-primary-text); }
.lang-switcher span { display: none; }

.region-switch {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.28rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid var(--color-accent);
}
.region-switch button {
    font: inherit;
    font-weight: 700;
    font-size: 1.02rem;
    padding: 0.5rem 1.15rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
}
.region-switch button:hover { background: rgba(255, 255, 255, 0.1); }
.region-switch button[aria-pressed="true"] {
    background: var(--color-accent);
    color: var(--color-navy);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.region-switch button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.region-switch .flag { font-size: 1.3rem; }

/* --- Hero --- */
.hero {
    padding: 2.4rem 0 2rem;
    border-bottom: 1px solid rgba(126, 240, 210, 0.12);
}
.hero__grid {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "eyebrow emblem"
        "title   emblem"
        "lead    lead"
        "perks   perks"
        "cta     cta";
    column-gap: 1rem;
    row-gap: 0.75rem;
    align-items: start;
}
.hero__eyebrow { grid-area: eyebrow; align-self: end; }
.hero__title { grid-area: title; }
.hero__lead { grid-area: lead; }
.hero__perks { grid-area: perks; }
.hero__cta { grid-area: cta; justify-self: start; }
.hero__emblem { grid-area: emblem; align-self: center; }
.hero__eyebrow {
    display: inline-block;
    color: var(--color-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}
.hero__title {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 4.2vw, 3.15rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #f4fffb;
    max-width: 18ch;
    margin-bottom: 1rem;
}
.hero__lead {
    font-size: 1.05rem;
    color: var(--color-secondary-text);
    max-width: 44rem;
    margin-bottom: 1.5rem;
}
.hero__perks {
    list-style: none;
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}
.hero__perks li {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    background: rgba(12, 34, 48, 0.55);
    border: 1px solid rgba(126, 240, 210, 0.14);
    border-radius: 12px;
    padding: 0.75rem 0.95rem;
}
.perk-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--color-accent);
    background: rgba(126, 240, 210, 0.1);
    border: 1px solid rgba(126, 240, 210, 0.25);
}
.hero__perks strong {
    display: block;
    color: #f4fffb;
    font-size: 0.95rem;
}
.hero__perks li span span { color: var(--color-secondary-text); font-size: 0.88rem; }
.hero__cta {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-navy);
    font-weight: 700;
    text-decoration: none;
    padding: 0.75rem 1.3rem;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(126, 240, 210, 0.22);
}
.hero__cta:hover { background: var(--color-accent-strong); }

.hero__emblem { display: flex; }
.hero__emblem img {
    width: min(280px, 28vw, 140px);
    height: auto;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
}

@media (min-width: 900px) {
    .hero { padding: 3.2rem 0 2.6rem; }
    .hero__grid {
        grid-template-columns: minmax(0, 1.15fr) 0.85fr;
        grid-template-areas:
            "eyebrow emblem"
            "title   emblem"
            "lead    emblem"
            "perks   emblem"
            "cta     emblem";
        column-gap: 2rem;
        row-gap: 0.85rem;
        align-items: center;
    }
    .hero__emblem { justify-self: end; }
    .hero__emblem img { width: 300px; }
}

/* ---Avisos --- */
.notices { padding-top: 1.25rem; }
.banner {
    background-color: var(--color-warning-bg);
    color: var(--color-warning-text);
    border: 1px solid var(--color-warning-border);
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 2);
    border-radius: 10px;
    margin-bottom: 0.85rem;
    text-align: center;
    font-weight: 500;
}
.scope-note {
    margin: 0 0 0.7rem;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- Filtros (sticky en escritorio) --- */
.filters-wrap {
    padding: 0.4rem 0 0.8rem;
}
@media (min-width: 900px) {
    .filters-wrap {
        position: sticky;
        top: var(--header-h);
        z-index: 30;
        background: linear-gradient(180deg, rgba(7, 19, 24, 0.94), rgba(7, 19, 24, 0.88));
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(126, 240, 210, 0.12);
        padding: 0.65rem 0;
    }
}
.filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 1.5);
    background: rgba(12, 34, 48, 0.72);
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(126, 240, 210, 0.16);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
.filter-group { display: flex; flex-direction: column; }
.filter-group label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-secondary-text);
    margin-bottom: 0.35rem;
}
input[type="search"],
select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background-color: rgba(7, 19, 24, 0.85);
    border: 1px solid var(--color-border);
    color: var(--color-primary-text);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}
input[type="search"]:focus,
select:focus { border-color: var(--color-accent); }
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%237ef0d2' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.7rem center;
    background-repeat: no-repeat;
    background-size: 1.1em 1.1em;
    padding-right: 2.3rem;
}
button {
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-primary-text);
}
#clear, #empty-clear {
    background: transparent;
    border-color: rgba(126, 240, 210, 0.4);
    color: var(--color-accent);
    font-weight: 600;
}
#clear:hover, #empty-clear:hover {
    background: rgba(126, 240, 210, 0.1);
    border-color: var(--color-accent);
}
.filter-group-action { display: flex; align-items: flex-end; }

.listings-panel { padding-top: 0.6rem; padding-bottom: 2rem; scroll-margin-top: 8rem; }

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    color: var(--color-secondary-text);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: var(--spacing-unit);
}
.results-count {
    font-weight: 700;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

/* --- Grid --- */
.card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
@media (min-width: 900px) {
    .card-grid { grid-template-columns: repeat(4, 1fr); gap: 0.85rem; }
    .card__content { padding: 0.7rem 0.75rem 0.85rem; }
    .card__title { font-size: 0.92rem; line-height: 1.3; }
    .card__edition { font-size: 0.72rem; }
    .badge { font-size: 0.72rem; padding: 4px 7px; }
    .price { font-size: 0.95rem; }
    .shipping { font-size: 0.72rem; }
    .total { font-size: 1.05rem; }
    .cta { padding: 0.45rem 0.5rem; font-size: 0.85rem; }
}
@media (min-width: 1200px) {
    .card-grid { grid-template-columns: repeat(5, 1fr); gap: 0.8rem; }
}
@media (min-width: 600px) {
    .filters { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .filters { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
@media (min-width: 1200px) {
    .filters {
        grid-template-columns: 2fr repeat(5, 1fr) auto;
        gap: 0.75rem 1rem;
        align-items: flex-end;
    }
    .filter-group-action button { white-space: nowrap; }
}

/* --- Tarjetas tipo slab --- */
.card {
    background: linear-gradient(180deg, #123041, #0a1c28);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(200, 220, 230, 0.18);
    box-shadow:
        inset 0 0 0 3px rgba(7, 16, 22, 0.92),
        inset 0 0 0 4px rgba(180, 210, 220, 0.22),
        var(--shadow-soft);
    padding: 6px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
    transform: translateY(-5px);
    border-color: rgba(126, 240, 210, 0.55);
    box-shadow:
        inset 0 0 0 3px rgba(7, 16, 22, 0.92),
        inset 0 0 0 4px rgba(126, 240, 210, 0.4),
        0 20px 36px rgba(0, 0, 0, 0.45);
}
.card__image-container {
    position: relative;
    width: 100%;
    aspect-ratio: var(--card-aspect-ratio);
    background: #13222b;
    border-radius: 6px;
    overflow: hidden;
}
.card__image { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__image-container .badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    margin: 0;
}
.card__content {
    padding: 0.8rem 0.7rem 0.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #f4fffb;
}
.card__edition {
    font-size: 0.78rem;
    color: var(--color-secondary-text);
    margin-bottom: 0.45rem;
}
.card__details {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0.4rem;
}
.badge {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 0.28rem 0.5rem;
    border-radius: 4px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.badge.grader--PSA { background-color: var(--color-psa); }
.badge.grader--BGS { background-color: var(--color-bgs); }
.badge.grader--CGC { background-color: var(--color-cgc); }
.badge.high-grade {
    box-shadow: 0 0 0 1px #e8c872, 0 4px 12px rgba(0, 0, 0, 0.4);
}
.card__country { font-size: 1.15rem; }
.card__pricing {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(126, 240, 210, 0.12);
}
.price { font-size: 1.05rem; font-weight: 600; }
.shipping { font-size: 0.8rem; color: var(--color-secondary-text); }
.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-top: 0.15rem;
}
.tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    background: rgba(126, 240, 210, 0.12);
    color: var(--color-accent);
    margin-top: 0.4rem;
}
.cta {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--color-accent);
    color: var(--color-navy);
    padding: 0.55rem 0.75rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.2s;
}
.cta:hover { background: #b8ffe9; }
.cta-wrap { margin-top: 0.7rem; }
.cta-wrap .cta { margin-top: 0; }
.cta-affiliate {
    font-size: 0.68rem;
    line-height: 1.35;
    color: var(--color-secondary-text);
    text-align: center;
    margin-top: 0.35rem;
}

.loading-message, .error-message {
    text-align: center;
    padding: 2rem;
    color: var(--color-secondary-text);
    width: 100%;
}
.empty-state {
    text-align: center;
    max-width: 28rem;
    margin: 2rem auto 3rem;
    padding: 2rem 1.25rem;
    border: 1px dashed rgba(126, 240, 210, 0.28);
    border-radius: 16px;
    background: rgba(12, 34, 48, 0.4);
}
.empty-state__icon { color: var(--color-accent); margin-bottom: 0.7rem; opacity: 0.85; }
.empty-state h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
}
.empty-state p { color: var(--color-secondary-text); margin-bottom: 1rem; }

.skeleton {
    background: linear-gradient(180deg, #123041, #0a1c28);
    border-radius: 12px;
    overflow: hidden;
    min-height: 280px;
}
.skeleton .card__image-container {
    background: #2a2a2a;
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse { 50% { opacity: .5; } }

.pagination { text-align: center; margin-top: 1.5rem; }
.show-more-btn {
    background: var(--color-accent);
    color: var(--color-navy);
    font-weight: 700;
    border: none;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
}
.show-more-btn:hover { background: var(--color-accent-strong); }

/* --- Explicación y FAQ --- */
.explain, .faq {
    border-top: 1px solid rgba(126, 240, 210, 0.12);
    padding: 2.6rem 0;
}
.prose, .faq { max-width: 52rem; }
.faq .container, .explain .container { max-width: 52rem; margin-left: auto; margin-right: auto; }
.explain h2, .faq h2, .empty-state h2 {
    font-family: var(--font-display);
    color: #f4fffb;
}
.explain h2, .faq h2 { font-size: 1.7rem; margin-bottom: 0.9rem; }
.prose p { color: var(--color-secondary-text); margin-bottom: 0.8rem; }
.faq-list details {
    background: rgba(12, 34, 48, 0.55);
    border: 1px solid rgba(126, 240, 210, 0.14);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    margin-bottom: 0.6rem;
}
.faq-list summary {
    cursor: pointer;
    font-weight: 700;
    color: #f4fffb;
}
.faq-list details p {
    margin-top: 0.55rem;
    color: var(--color-secondary-text);
}

/* --- Pie --- */
.site-footer {
    border-top: 1px solid rgba(126, 240, 210, 0.16);
    padding: 2.2rem 0 2.6rem;
    margin-top: 0;
    font-size: 0.82rem;
    color: var(--color-secondary-text);
    background: rgba(4, 10, 16, 0.45);
}
.footer-grid { text-align: center; }
.footer-brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--color-primary-text);
}
.footer-brand img { width: 44px; height: 44px; }
.footer-brand strong {
    display: block;
    font-family: var(--font-display);
    color: var(--color-accent);
    font-size: 1.1rem;
}
.footer-tagline { margin: 0; font-size: 0.85rem; }
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    justify-content: center;
    margin: 0.9rem 0 1rem;
}
.footer-nav a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}
.footer-nav a:hover, .footer-nav a[aria-current="page"] { text-decoration: underline; }
.affiliate-notice { max-width: 52rem; margin: 0 auto 0.4rem; }
.site-footer p { margin-bottom: 0.6rem; }

@media (max-width: 640px) {
    .site-header .container { flex-wrap: wrap; gap: 0.55rem; }
    .region-switch { order: 3; width: 100%; justify-content: center; }
    .region-switch button { flex: 1; justify-content: center; padding: 0.55rem 0.4rem; font-size: 0.95rem; }
    .brand-logo { width: 40px; height: 40px; }
    .brand-name { font-size: 1.2rem; }
    .hero { padding: 1.5rem 0 1.3rem; }
    .hero__emblem img { width: 100px; }
}

[hidden] { display: none !important; }

/* --- Páginas legales --- */
.legal-doc {
    max-width: 46rem;
    margin: 2rem auto 4rem;
    text-align: left;
    padding-bottom: 3rem;
}
.legal-doc h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
    color: var(--color-accent);
}
.legal-doc .legal-updated { color: var(--color-secondary-text); font-size: 0.9rem; margin-bottom: 1.5rem; }
.legal-doc h2 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; }
.legal-doc p, .legal-doc li { margin-bottom: 0.7rem; }
.legal-doc ul, .legal-doc ol { padding-left: 1.25rem; margin-bottom: 0.7rem; }
.legal-doc a { color: var(--color-accent); }
.placeholder {
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: rgba(126, 240, 210, 0.14);
    color: var(--color-accent);
    padding: 0 0.28em;
    border-radius: 3px;
    white-space: nowrap;
}

.footer-contact { margin: 0.35rem 0 0; }
.footer-contact a { color: var(--color-accent); font-weight: 600; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
