/* =====================================================
   CARD PRODOTTO (fragments/steelbook-card.html)
   Unico stile per home, calendario e correlati della scheda.
   Prima le stesse regole erano copiate in index.css e detail.css con token
   diversi, e sulla scheda l'oro usciva più scuro (trappola 35 in docs/07).

   Colori: oro solo sul bottone, viola solo su bottone e orologio dei
   preordini, tutto il resto neutro.
   Va caricato PRIMA del CSS di pagina: larghezze, caroselli e griglie
   restano in index.css / detail.css e devono poter vincere.
====================================================== */
.st-pcard {
    --c-gold: #f59e0b;
    --c-gold-hover: #fbbf24;
    --c-purple: #7c3aed;
    --c-purple-hover: #6d28d9;
    --c-text: #141412;
    --c-text-mid: #5f5c55;
    --c-text-light: #8a877f;
    --c-border: #e4e2dc;
    --c-red: #dc2626;

    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    min-width: 0;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.035);
    transition: transform 0.22s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.22s, border-color 0.22s;
}
.st-pcard:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08); border-color: #c9c6be; }
.st-pcard-link-overlay { position: absolute; inset: 0; z-index: 1; border-radius: 14px; }

.st-pcard-img { height: 225px; background: linear-gradient(180deg, #fcfcfc 0%, #f8f7f5 100%); display: flex; align-items: center; justify-content: center; padding: 10px 8px; border-bottom: 1px solid #f0ede8; overflow: hidden; position: relative; }
.st-pcard-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.08)); transition: transform 0.38s cubic-bezier(0.165, 0.84, 0.44, 1); }
.st-pcard:hover .st-pcard-img img { transform: scale(1.04); }

.st-pcard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex-grow: 1; }
.st-pcard-edition { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-text-light); margin-bottom: 4px; height: 14px; line-height: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.st-pcard-title { font-size: 13.5px; font-weight: 700; color: var(--c-text); line-height: 1.3; margin-bottom: 6px; height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Riga data: sempre presente, anche vuota, così le card in griglia restano allineate */
.st-pcard-when { font-size: 11px; color: var(--c-text-mid); font-weight: 500; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; height: 18px; overflow: hidden; }
.st-pcard-when span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.st-pcard-when strong { color: var(--c-text); font-weight: 700; }
.st-pcard-when i { color: var(--c-text-light); font-size: 10.5px; flex-shrink: 0; }
/* Preordini: "Esce tra X giorni" in viola, è l'informazione che fa scegliere (trappola 23) */
.st-pcard-when.urgent, .st-pcard-when.urgent strong, .st-pcard-when.urgent i { color: var(--c-purple); }
.st-pcard-when.urgent strong { font-weight: 800; }

.st-buy-box { margin-top: auto; position: relative; z-index: 2; display: flex; flex-direction: column; }
.st-pcard-price-row { display: flex; align-items: baseline; gap: 6px; height: 22px; margin-bottom: 2px; flex-wrap: nowrap; overflow: hidden; }
.st-pcard-price { font-size: 15px; font-weight: 900; color: var(--c-text); white-space: nowrap; }
.st-pcard-price.missing { font-size: 12px; font-weight: 600; color: var(--c-text-light); }
.st-pcard-oldprice { font-size: 11.5px; font-weight: 500; color: var(--c-text-light); text-decoration: line-through; white-space: nowrap; }
.st-buybox-winner { font-size: 10.5px; color: var(--c-text-light); margin-bottom: 8px; height: 15px; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Bottone piatto: oro = disponibile, viola = preordine, neutro = senza prezzo */
.btn-detail-cp { display: flex; align-items: center; justify-content: center; width: 100%; background: var(--c-gold); color: #111; border: none; font-family: inherit; font-weight: 700; font-size: 12px; padding: 9px 10px; border-radius: 8px; text-decoration: none; white-space: nowrap; transition: background-color 0.18s; }
.btn-detail-cp:hover { background: var(--c-gold-hover); color: #111; text-decoration: none; }
.btn-detail-cp.preorder { background: var(--c-purple); color: #fff; }
.btn-detail-cp.preorder:hover { background: var(--c-purple-hover); color: #fff; }
.btn-detail-cp.neutral { background: #f1efea; color: var(--c-text-mid); }
.btn-detail-cp.neutral:hover { background: #e7e4dd; color: var(--c-text); }

/* Cuore e badge sulla foto della card */
.st-pcard .st-pcard-wishlist-btn { position: absolute; top: 10px; right: 10px; z-index: 10; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--c-border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--c-text-light); font-size: 13px; outline: none; transition: color 0.2s, transform 0.2s; }
.st-pcard .st-pcard-wishlist-btn.active { color: var(--c-red); background: #fff; }
/* Contorno = non salvato, pieno rosso = salvato. L'hover non colora di rosso: su mobile resta
   "attaccato" dopo il tocco e il cuore appena tolto sembrava ancora attivo. */
.st-pcard .st-pcard-wishlist-btn i { font-weight: 400; }
.st-pcard .st-pcard-wishlist-btn.active i { font-weight: 900; }
@media (hover: hover) {
    .st-pcard .st-pcard-wishlist-btn:hover { transform: scale(1.1); color: var(--c-text); background: #fff; }
    .st-pcard .st-pcard-wishlist-btn.active:hover { color: var(--c-red); }
}
.st-pcard .st-pcard-tbd-badge { position: absolute; top: 10px; left: 10px; z-index: 6; background: rgba(20, 20, 18, 0.85); color: #fff; font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 12px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; pointer-events: none; }
.st-pcard .st-pcard-tbd-badge i { font-size: 8.5px; }

@media (max-width: 768px) {
    .st-pcard-img { height: 195px; padding: 8px 6px; }
    .st-pcard-body { padding: 11px 12px 12px; }
    .btn-detail-cp { font-size: 11.5px; padding: 9px 8px; }
}

/* =====================================================
   BANNER TELEGRAM AZZURRO (scheda prodotto e home)
====================================================== */
.tg-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, #eaf6fd 0%, #d8eefb 100%); border: 1px solid #bfe2f5; text-decoration: none; color: var(--text); transition: border-color 0.2s, box-shadow 0.2s; }
.tg-banner:hover { border-color: #24a1de; box-shadow: 0 6px 18px rgba(36, 161, 222, 0.15); color: var(--text); }
.tg-icon { width: 40px; height: 40px; border-radius: 50%; background: #24a1de; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.tg-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tg-text strong { font-size: 14px; font-weight: 800; color: #0b4a6e; }
.tg-text span { font-size: 12.5px; color: #33607a; line-height: 1.35; }
.tg-cta { flex-shrink: 0; background: #24a1de; color: #fff; font-size: 13px; font-weight: 800; padding: 8px 16px; border-radius: 999px; }
@media (max-width: 768px) {
    .tg-banner { padding: 12px 14px; border-radius: 14px; }
    .tg-text strong { font-size: 13.5px; }
    .tg-cta { padding: 7px 12px; }
}
