/* Products — hub (archive) + single product. v2 remodel.
   Linear/Stripe-tier: --ut-* tokens, Clash Display, glow hero, double-bezel
   cards, button-in-button CTA, two-column single page. Loaded only on product
   pages (see inc/scripts.php). */

/* ═══════════════════════════ Shared button (pill) ═══════════════════════════ */
.prod-btn {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px 12px 24px;
    border-radius: 100px;
    font-family: var(--ut-font-body);
    font-weight: 600;
    font-size: 0.96rem;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    box-sizing: border-box;
    transition: transform 0.25s var(--ut-ease-spring), background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.prod-btn:active { transform: scale(0.975); }
.prod-btn-primary { background: #ececec; color: #101012; border-color: #ececec; }
.prod-btn-primary:hover { background: #fff; }
.prod-btn-secondary { background: var(--ut-fill); color: var(--ut-text-2); border-color: var(--ut-border-strong); }
.prod-btn-secondary:hover { background: var(--ut-fill-hover); border-color: rgba(255, 255, 255, 0.3); }
.prod-btn-muted {
    padding: 12px 24px;
    background: var(--ut-fill-soft);
    color: var(--ut-text-muted);
    border-color: var(--ut-border-mid);
    cursor: default;
}
.prod-btn-block { width: 100%; justify-content: space-between; padding-right: 14px; }
.prod-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(16, 16, 18, 0.10);
    transition: transform 0.25s var(--ut-ease-spring);
}
.prod-btn-secondary .prod-btn-icon { background: var(--ut-fill); }
.prod-btn-icon svg { width: 14px; height: 14px; }
.prod-btn:hover .prod-btn-icon { transform: translateX(3px); }

/* ═══════════════════════════ Hub (archive) ═════════════════════════════════ */
.main-container.products-page,
.main-container.product-single {
    margin: 0 auto;
    max-width: 1200px;
    padding-top: clamp(112px, 14vw, 144px);
    padding-bottom: clamp(60px, 9vw, 104px);
    padding-inline: clamp(16px, 5vw, 24px);
    box-sizing: border-box;
}

.products-hero { position: relative; padding: 14px 0 8px; margin-bottom: clamp(38px, 6vw, 60px); }
.products-hero > *:not(.products-hero-glow) { position: relative; z-index: 1; }
.products-hero-glow {
    position: absolute;
    top: -60px;
    left: 0;
    width: 620px;
    max-width: 92%;
    height: 340px;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(216, 97, 60, 0.18), transparent 68%);
    filter: blur(24px);
}

.prod-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--ut-font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ut-text-3);
    margin-bottom: 22px;
}
.prod-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ut-accent);
    box-shadow: 0 0 10px var(--ut-accent);
}

.products-hero-title {
    font-family: var(--ut-font-display);
    font-weight: 600;
    font-size: clamp(2.5rem, 6.2vw, 4.4rem);
    line-height: 1.0;
    letter-spacing: -2.2px;
    color: var(--ut-text);
    margin: 0;
}

.products-hero-sub {
    color: var(--ut-text-3);
    font-size: clamp(1.05rem, 1.7vw, 1.22rem);
    line-height: 1.6;
    max-width: 56ch;
    margin: 22px 0 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

/* Double-bezel card */
.product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 6px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ut-border);
    box-sizing: border-box;
    transition: border-color 0.3s var(--ut-ease), transform 0.3s var(--ut-ease-spring), background 0.3s ease;
}
.product-card:hover {
    border-color: var(--ut-border-strong);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05);
}
.product-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 16px;
    background: var(--ut-glass-strong);
    border: 1px solid var(--ut-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
}

.product-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.product-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    background: var(--ut-fill-soft);
    border: 1px solid var(--ut-border-mid);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-icon img { width: 100%; height: 100%; object-fit: cover; }
.product-monogram {
    font-family: var(--ut-font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--ut-text-muted);
}

.product-name {
    font-family: var(--ut-font-display);
    color: var(--ut-text);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.4px;
    margin: 0 0 8px;
}
.product-tagline {
    color: var(--ut-text-muted);
    font-size: 0.93rem;
    line-height: 1.55;
    margin: 0 0 18px;
    flex-grow: 1;
}
.product-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-family: var(--ut-font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--ut-text-muted);
    margin-bottom: 18px;
}
.product-platform { display: inline-flex; align-items: center; gap: 6px; }
.product-meta-ico { width: 15px; height: 15px; }
.product-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--ut-text-3);
    font-size: 0.86rem;
    font-weight: 600;
    transition: color 0.2s ease;
}
.product-card-cta span { transition: transform 0.2s var(--ut-ease); }
.product-card:hover .product-card-cta { color: var(--ut-accent); }
.product-card:hover .product-card-cta span { transform: translateX(3px); }

.products-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--ut-text-3);
    padding: 56px 16px;
}

/* ─────────────────────────── Status badges ──────────────────────────────── */
.product-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--ut-font-mono);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 11px;
    border-radius: 100px;
    white-space: nowrap;
    border: 1px solid var(--ut-border-mid);
    background: var(--ut-fill-soft);
    color: var(--ut-text-3);
}
.product-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ut-text-muted);
}
.status-live { color: var(--ut-text); border-color: rgba(95, 174, 126, 0.4); background: rgba(95, 174, 126, 0.12); }
.status-live::before { background: var(--ut-success); box-shadow: 0 0 8px var(--ut-success); }
.status-beta { color: var(--ut-text-2); }
.status-beta::before { background: var(--ut-accent); }
.status-in_review::before { background: var(--ut-text-muted); }
.status-coming_soon { color: var(--ut-text-muted); }

/* ═══════════════════════════ Single product ════════════════════════════════ */
.product-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--ut-font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ut-text-muted);
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}
.product-back svg { width: 14px; height: 14px; transition: transform 0.2s var(--ut-ease); }
.product-back:hover { color: var(--ut-text-2); }
.product-back:hover svg { transform: translateX(-3px); }

.product-hero {
    position: relative;
    display: flex;
    gap: 28px;
    align-items: center;
}
.product-hero > *:not(.product-hero-glow) { position: relative; z-index: 1; }
.product-hero-glow {
    position: absolute;
    top: -70px;
    left: -20px;
    width: 480px;
    max-width: 90%;
    height: 320px;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(216, 97, 60, 0.16), transparent 68%);
    filter: blur(24px);
}
.product-hero-icon {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    background: var(--ut-fill-soft);
    border: 1px solid var(--ut-border-mid);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-hero-icon img { width: 100%; height: 100%; object-fit: cover; }
.product-hero-icon .product-monogram { font-size: 44px; }
.product-hero-text { flex: 1; min-width: 0; }
.product-hero-text .product-status { margin-bottom: 16px; }

.product-title {
    font-family: var(--ut-font-display);
    color: var(--ut-text);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -1.5px;
    margin: 0 0 10px;
}
.product-single .product-tagline {
    color: var(--ut-text-3);
    font-size: clamp(1.05rem, 1.7vw, 1.22rem);
    line-height: 1.5;
    margin: 0 0 22px;
    flex-grow: 0;
    max-width: 54ch;
}

/* ── Two-column body + info aside ─────────────────────────────────────────── */
.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
    margin-top: clamp(34px, 5vw, 52px);
}

.product-body {
    color: var(--ut-text-3);
    font-size: 1.04rem;
    line-height: 1.75;
}
.product-body :first-child { margin-top: 0; }
.product-body h2 {
    font-family: var(--ut-font-display);
    color: var(--ut-text);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin: 32px 0 14px;
}
.product-body p { margin: 0 0 18px; }
.product-body ul, .product-body ol { margin: 0 0 18px; padding-left: 22px; }
.product-body li { margin-bottom: 9px; }
.product-body strong { color: var(--ut-text); }
.product-body a {
    color: var(--ut-text);
    text-decoration: underline;
    text-decoration-color: var(--ut-accent);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}
.product-body a:hover { text-decoration-color: var(--ut-text); }

.product-aside { position: sticky; top: 84px; }
.product-info-card {
    padding: 24px;
    border-radius: var(--ut-r-lg);
    background: var(--ut-glass-strong);
    border: 1px solid var(--ut-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.product-info-title {
    font-family: var(--ut-font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ut-text);
    margin: 0 0 16px;
}
.product-info-list { margin: 0; }
.product-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-top: 1px solid var(--ut-border);
}
.product-info-row dt {
    color: var(--ut-text-muted);
    font-size: 0.85rem;
}
.product-info-row dd {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ut-text-2);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: right;
}
.product-info-ico { width: 16px; height: 16px; color: var(--ut-text-3); }
.product-info-row dd a {
    color: var(--ut-text-2);
    text-decoration: underline;
    text-decoration-color: var(--ut-accent);
    text-underline-offset: 2px;
}
.product-info-row dd a:hover { color: var(--ut-text); }
.product-info-card .prod-btn { margin-top: 18px; }

.product-admin { margin-top: 18px; text-align: center; }
.product-admin a { color: var(--ut-text-muted); font-size: 0.82rem; text-decoration: none; }
.product-admin a:hover { color: var(--ut-text); }

/* ───────────────────────────── Mobile ───────────────────────────────────── */
@media (max-width: 900px) {
    .product-layout { grid-template-columns: 1fr; }
    .product-aside { position: static; }
}

@media (max-width: 768px) {
    .products-grid { grid-template-columns: 1fr; gap: 14px; }

    .product-hero {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 20px;
    }
    .product-hero-icon { width: 84px; height: 84px; }
    .product-single .product-tagline { margin-inline: auto; }
    .prod-btn { width: 100%; justify-content: space-between; }
    .prod-btn-muted { justify-content: center; }
}
