/* CAMERA PULSE responsive hotfix
 * Scope: 360px and wider; additive override for the current assets/app.css.
 * This file intentionally fixes intrinsic sizing instead of hiding overflow.
 */

/* Grid and flex children default to min-content sizing. Let them shrink. */
.site-header > *,
.site-header nav,
.hero > *,
.detail-hero > *,
.detail-grid > *,
.detail-identity > *,
.watch-panel > *,
.watch-item > *,
.news-list > *,
.source-grid > *,
.product-card,
.product-meta,
.price-row {
    min-width: 0;
}

/* Media and long catalog text must never establish a wider layout. */
img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

.product-card h3,
.watch-item-title,
.news-list strong,
.source-grid strong,
.detail-identity h1 {
    overflow-wrap: anywhere;
}

.product-meta,
.price-row {
    gap: 8px 12px;
    flex-wrap: wrap;
}

.search {
    width: 100%;
    min-width: 0;
}

.search button,
.watch-button,
.outbound-button {
    white-space: nowrap;
}

.watch-form input {
    max-width: 100%;
}

@media (max-width: 560px) {
    .site-header {
        min-height: 68px;
        gap: 12px;
        padding-inline: 16px;
    }

    .brand {
        flex: 1 1 auto;
        min-width: 0;
        font-size: clamp(.92rem, 4.35vw, 1.05rem);
        letter-spacing: .055em;
        white-space: nowrap;
    }

    .site-header nav {
        flex: 0 0 auto;
        gap: 0;
        font-size: .78rem;
    }

    .watch-button {
        padding: 9px 10px;
    }

    main {
        width: auto;
        margin-inline: 16px;
    }

    .hero {
        min-height: 0;
        gap: 40px;
        padding: 64px 0;
    }

    h1,
    .detail-hero h1 {
        font-size: clamp(2.75rem, 12.7vw, 3.4rem);
        overflow-wrap: anywhere;
    }

    .lead {
        font-size: 1rem;
    }

    .search {
        align-items: stretch;
    }

    .search input {
        width: 1%;
        padding: 16px;
    }

    .search button {
        flex: 0 0 auto;
        min-height: 54px;
        padding-inline: 16px;
    }

    .signal-card {
        min-height: 240px;
        padding: 28px;
    }

    .signal-card strong {
        font-size: clamp(1.45rem, 7vw, 1.8rem);
    }

    .pulse-line {
        margin: 28px -28px -28px;
    }

    .market-section,
    .watchlist-section,
    .news-section,
    .source-section {
        padding-block: 64px;
    }

    .product-card {
        min-height: 0;
        padding: 20px;
    }

    .product-card-image {
        width: 100%;
    }

    .product-card h3 {
        min-height: 0;
    }

    .price-row strong {
        font-size: clamp(1.35rem, 7vw, 1.6rem);
    }

    .detail-main {
        padding-top: 32px;
    }

    .detail-hero,
    .detail-grid {
        padding-block: 56px;
    }

    .detail-price,
    .history-panel,
    .market-facts,
    .source-grid article {
        padding: 28px 20px;
    }

    .history-chart {
        gap: 4px;
    }

    .watch-panel {
        padding: 28px 20px;
    }

    .watch-form > div {
        align-items: stretch;
    }

    .watch-form input {
        min-width: 0;
        flex: 1 1 180px;
    }

    .watch-form .primary-button,
    .watch-form .text-button {
        flex: 0 0 auto;
    }

    .watch-item,
    .empty-state {
        padding: 20px;
    }

    .info-band div {
        padding: 28px 20px;
    }

    footer,
    .api-credits {
        padding-inline: 16px;
    }
}

@media (max-width: 380px) {
    .brand {
        font-size: .92rem;
    }

    .watch-button {
        padding-inline: 8px;
    }

    h1,
    .detail-hero h1 {
        font-size: 2.75rem;
    }
}
