/* ═══════════════════════════════════════════════════════════
   CARDS — Signal from Noise (1:1 aus showcase-signal.css)
   Cards, Stat-Cards, Product-Cards, Hero-Product, Result-Row,
   Result-Stack, Mini-Card.
   ═══════════════════════════════════════════════════════════ */

/* ── Base Card ──────────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.card--interactive { cursor: pointer; }
.card--interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--teal) 40%, var(--line));
}

.card--ai {
    background: color-mix(in srgb, var(--indigo) 4%, var(--surface));
    border-color: color-mix(in srgb, var(--indigo) 20%, var(--line));
}

.card__header {
    padding: 1.1rem 1.3rem;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.015em;
}

.card__subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.card__body {
    padding: 1.1rem 1.3rem;
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.55;
}

.card__footer {
    padding: 0.9rem 1.3rem;
    border-top: 1px solid var(--line-soft);
    background: var(--surface-2);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ── Stat Card ──────────────────────────────────────────── */

.stat-card {
    padding: 1.2rem 1.3rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -10px; right: -10px;
    width: 52px;
    aspect-ratio: 1 / 1.1547;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--teal);
    opacity: 0.08;
}

.stat-card__label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-card__trend {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
}

.stat-card__trend--up   { color: var(--success); }
.stat-card__trend--down { color: var(--danger); }

/* ── Product Card (Standard) ────────────────────────────── */

.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--teal) 30%, var(--line));
    box-shadow: var(--shadow-lg);
}

.product-card__flag {
    position: absolute;
    top: 0.7rem; right: 0.7rem;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    color: #fff;
    padding: 0.25rem 0.5rem 0.25rem 0.9rem;
    background: var(--teal);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%);
}

[data-theme="dark"] .product-card__flag { color: #050505; }

.product-card__flag--ai { background: var(--indigo); color: #fff; }

.product-card__image {
    height: 9rem;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    border-bottom: 1px solid var(--line-soft);
    position: relative;
    overflow: hidden;
}

.product-card__image::after {
    content: '';
    position: absolute;
    top: -20px; left: -20px;
    width: 50px;
    aspect-ratio: 1 / 1.1547;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--teal);
    opacity: 0.05;
}

.product-card__icon {
    font-size: 2.6rem;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.product-card__brand {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.4rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.product-card__body { padding: 1rem 1.1rem 1.1rem; }

.product-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 0.5rem;
    min-height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.product-card__price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--teal);
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.product-card__price-meta {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}

.product-card__price-unavailable {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.product-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.product-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--teal);
    transition: gap 0.2s;
}

.product-card__link:hover { gap: 0.55rem; }

/* ── Hero Product (große Top-Pick-Karte) ────────────────── */

.hero-product {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.hero-product::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px;
    aspect-ratio: 1 / 1.1547;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--teal);
    opacity: 0.06;
    pointer-events: none;
}

.hero-product__media {
    background: var(--surface-2);
    border-right: 1px solid var(--line);
    display: grid;
    place-items: center;
    min-height: 260px;
    position: relative;
}

.hero-product__media-inner { text-align: center; }

.hero-product__icon { font-size: 5rem; line-height: 1; }

.hero-product__brand {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.5rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-product__flag {
    position: absolute;
    top: 1rem; left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--teal);
    padding: 0.3rem 0.6rem 0.3rem 1.3rem;
    background: var(--teal-soft);
    border: 1px solid color-mix(in srgb, var(--teal) 25%, transparent);
    border-radius: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-product__flag::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    aspect-ratio: 1 / 1.1547;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--teal);
}

.hero-product__body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    position: relative;
    z-index: 2;
}

.hero-product__eyebrow {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-product__name {
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.hero-product__summary {
    font-size: 0.92rem;
    color: var(--text-soft);
    line-height: 1.55;
}

.hero-product__summary em {
    font-style: italic;
    color: var(--teal);
    font-weight: 500;
}

.hero-product__metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.hero-product__metric-val {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.hero-product__metric-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.hero-product__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
}

.hero-product__price {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--teal);
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.hero-product__price-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.2rem;
}

@media (max-width: 760px) {
    .hero-product { grid-template-columns: 1fr; }
    .hero-product__media {
        border-right: none;
        border-bottom: 1px solid var(--line);
        min-height: 180px;
    }
}

/* ── Result Stack + Result Row ──────────────────────────── */

.result-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.25rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.result-stack__label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--teal);
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.result-stack__label::before { content: '// '; opacity: 0.6; }

.result-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.result-row:hover {
    border-color: color-mix(in srgb, var(--teal) 35%, var(--line));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.result-row__hex {
    width: 38px;
    aspect-ratio: 1 / 1.1547;
    flex-shrink: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, var(--teal), var(--teal-hover));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.1rem;
}

[data-theme="dark"] .result-row__hex { color: #050505; }

.result-row__hex--ai     { background: linear-gradient(135deg, var(--indigo), #A78BFA); }
.result-row__hex--muted  { background: linear-gradient(135deg, var(--text-muted), var(--text-soft)); }
.result-row__hex--runner { background: linear-gradient(135deg, #C28440, #D97706); }

.result-row__body { flex: 1; min-width: 0; }

.result-row__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-row__meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-row__meta .sep { opacity: 0.5; margin: 0 0.3rem; }

.result-row__price {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--teal);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.result-row__price--muted {
    color: var(--text-muted);
    font-style: normal;
    font-weight: 500;
}

/* ── Metrics Grid (4 Spalten, geteilte Borders) ─────────── */

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.metric {
    padding: 1.3rem 1.5rem;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.metric:last-child { border-right: none; }

.metric__val {
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.metric__val em {
    color: var(--teal);
    font-style: normal;
}

.metric__val sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    vertical-align: baseline;
    margin-left: 0.1em;
    font-weight: 500;
}

.metric__label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.metric__delta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--success);
    margin-top: 0.2rem;
}

@media (max-width: 900px) {
    .metrics { grid-template-columns: repeat(2, 1fr); }
    .metric:nth-child(1), .metric:nth-child(2) { border-bottom: 1px solid var(--line); }
    .metric:nth-child(2) { border-right: none; }
}

/* ── Mini Inline Card ───────────────────────────────────── */

.mini-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.mini-card:hover {
    border-color: var(--teal);
    transform: translateY(-1px);
}

.mini-card__hex {
    width: 14px;
    aspect-ratio: 1 / 1.1547;
    flex-shrink: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--teal);
    opacity: 0.7;
}

.mini-card__text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.mini-card__val {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--teal);
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}
