/* product_detail.css — Page-specific styles only.
   Reuses: if-bg-light, if-rounded-corner-not-mobile, if-shadow-box,
   if-text-dark-grey, if-badge, summary-positive, summary-negative,
   fade-in-box from insightfolio.css */

/* ── Hero ─────────────────────────────────────────────────────────── */
.product-asof {
    font-size: 1rem;
    color: var(--if-dark-grey);
}

.product-symbol {
    font-size: 1rem;
    color: var(--if-dark-grey);
}

.product-hero-headline {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    margin-bottom: 4px;
}

.product-hero-logo-shell {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.product-hero-logo {
    width: 72px;
    height: 72px;
    display: block;
    object-fit: contain;
    border-radius: 18px;
    background: var(--if-white);
}

.product-hero-logo-fallback {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #f1f4f8;
    color: var(--if-anthrazit);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-hero-logo.is-hidden,
.product-hero-logo-fallback.is-hidden {
    display: none;
}

.product-hero-logo-sm {
    width: 28px;
    height: 28px;
}
.product-hero-logo-sm .product-hero-logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}
.product-hero-logo-sm .product-hero-logo-fallback {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.65rem;
}

.product-id-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 1rem;
    color: var(--if-dark-grey);
}
.product-id-label {
    color: var(--if-dark-grey);
}
.product-id-copy {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    color: var(--if-dark-grey);
    transition: color 0.15s;
}
.product-id-copy:hover {
    color: var(--if-anthrazit);
}
.product-id-copy svg {
    width: 18px;
    height: 18px;
}
.product-id-copy .product-id-check-icon {
    color: inherit;
}

/* Price sits inline, no card */

.product-price {
    font-size: 2.05rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--if-anthrazit);
}

.product-daily-change {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    margin-top: 0.35rem;
    padding: 0.18rem 0.58rem;
    font-weight: 700;
    font-size: 1rem;
    background: rgba(46, 125, 50, 0.1);
    color: var(--if-positive);
}
.product-daily-change.is-negative {
    background: rgba(198, 40, 40, 0.08);
    color: var(--if-negative);
}

/* ── Badges ───────────────────────────────────────────────────────── */
.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(64, 178, 226, 0.1);
    color: var(--if-blue);
}

.product-logo-attribution {
    font-size: 12pt;
    line-height: 1.3;
    color: var(--if-dark-grey);
}

.product-logo-attribution a {
    color: inherit;
    text-underline-offset: 2px;
}

/* ── Quick facts ─────────────────────────────────────────────────── */
.product-quick-fact {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--if-light-grey);
    border-radius: 12px;
    padding: 12px 18px;
    min-width: 0;
    flex: 0 0 calc(50% - 8px);
}
.product-quick-fact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}
.product-quick-fact-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--if-dark-grey);
}
.product-quick-fact-info {
    color: var(--if-dark-grey);
    cursor: help;
    display: inline-flex;
    transition: color 0.15s;
}
.product-quick-fact-info:hover {
    color: var(--if-anthrazit);
}
.product-quick-fact-info svg {
    width: 14px;
    height: 14px;
}
.product-quick-fact-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--if-anthrazit);
    margin-top: auto;
}
.product-star-filled {
    color: var(--if-anthrazit);
}
.product-star-empty {
    color: var(--if-medium-grey);
}

/* ── Section typography ──────────────────────────────────────────── */
.product-section-title {
    font-family: var(--if-font-serif);
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--if-anthrazit);
}

.product-section-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--if-dark-grey);
    margin-bottom: 4px;
}

.product-helper-text {
    font-size: 1rem;
    color: var(--if-dark-grey);
    margin-bottom: 12px;
}

.product-legend-text {
    font-size: 1rem;
    font-style: italic;
    color: var(--if-dark-grey);
    margin-bottom: 8px;
}

.product-disclaimer-text {
    font-size: 1rem;
    color: var(--if-dark-grey);
    margin-bottom: 4px;
}

.product-text-block {
    font-size: 1rem;
    color: var(--if-anthrazit);
    line-height: 1.6;
    margin-bottom: 12px;
}

.product-empty-state {
    font-size: 1rem;
    color: var(--if-dark-grey);
    font-style: italic;
    padding: 16px 0;
}

/* ── Chart ────────────────────────────────────────────────────────── */
.product-range-switcher {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.product-range-btn {
    padding: 5px 14px;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--if-light-grey);
    color: var(--if-dark-grey);
    transition: background 0.15s, color 0.15s;
}
.product-range-btn:hover {
    color: var(--if-anthrazit);
}
.product-range-btn.active {
    background: var(--if-anthrazit);
    color: var(--if-white);
}

/* ── Stat cards ──────────────────────────────────────────────────── */
.product-stat-card {
    background: var(--if-white);
    border-radius: 15px;
    padding: 20px;
    height: 100%;
}

.product-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--if-dark-grey);
    margin-bottom: 6px;
}

.product-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--if-anthrazit);
}
.product-stat-sub {
    font-size: 0.8rem;
    margin-top: 2px;
}

/* ── Data rows ───────────────────────────────────────────────────── */
.product-rows {
    display: flex;
    flex-direction: column;
}

.product-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--if-medium-grey, #D8D8D8);
}
.product-row:last-child {
    border-bottom: none;
}

.product-row-label {
    font-size: 1rem;
    color: var(--if-dark-grey);
    flex: 1;
    min-width: 0;
}
.product-row-label a {
    color: var(--if-blue);
    text-decoration: none;
}
.product-row-label a:hover {
    text-decoration: underline;
}

.product-row-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--if-anthrazit);
    text-align: right;
    flex-shrink: 0;
}
.product-row-value.summary-positive { color: var(--if-positive); }
.product-row-value.summary-negative { color: var(--if-negative); }

.product-row-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(64, 178, 226, 0.1);
    color: var(--if-blue);
}

/* ── Groups ──────────────────────────────────────────────────────── */
.product-group-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--if-anthrazit);
    margin-bottom: 4px;
}

/* ── Links ────────────────────────────────────────────────────────── */
.product-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-link-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--if-blue);
    background: rgba(64, 178, 226, 0.08);
    text-decoration: none;
    transition: background 0.15s;
}
.product-link-pill:hover {
    background: rgba(64, 178, 226, 0.16);
    text-decoration: none;
    color: var(--if-blue);
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .product-hero-logo-sm {
        width: 24px;
        height: 24px;
    }
    .product-hero-logo-sm .product-hero-logo {
        width: 24px;
        height: 24px;
        border-radius: 6px;
    }
    .product-hero-logo-sm .product-hero-logo-fallback {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        font-size: 0.6rem;
    }
    .product-section-title { font-size: 1.2rem; }
    .product-price { font-size: 1.6rem; }
    .product-row {
        flex-direction: column;
        gap: 2px;
    }
    .product-row-value { text-align: left; }
}

@media (min-width: 1200px) {
    .product-quick-fact {
        flex: 1 1 0;
    }
}

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .product-return-fill { transition: none; }
}
