/* ========================================
   ARCHIVIO — griglia con card del tema
   ======================================== */
.isp-section.offertebot-archive { padding: 0 0 30px; }
.offertebot-archive .isp-section__title { margin-bottom: 16px; }
.offertebot-archive__cat { color: var(--isp-brand, #1e63d4); }
.offertebot-archive__back {
    display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: 8px;
    color: var(--isp-brand, #1e63d4);
    text-decoration: none; font-weight: 600; font-size: 14px;
    transition: color .15s;
}
.offertebot-archive__back:hover { color: var(--isp-brand-dark, #174ea8); }
/* Selector con specificità doppia (0,2,0) per battere `.isp-section__header { align-items: center }` del tema. */
.offertebot-archive .offertebot-archive__header,
.offertebot-archive__header.isp-section__header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
    margin-bottom: 15px;
}
.offertebot-archive__title-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    border-bottom: 1px solid var(--isp-border-soft, #eef1f7); padding-bottom: 12px;
}
.offertebot-archive__title-row .isp-section__title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.3px;
}
.offertebot-archive__count {
    font-size: 14px; color: var(--isp-mute, #6b7a93); white-space: nowrap;
}

/* Search box */
.offertebot-search {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--isp-border-soft, #eef1f7);
    border-radius: var(--isp-radius, 12px);
    transition: border-color .15s, box-shadow .15s;
}
.offertebot-search:focus-within {
    border-color: var(--isp-brand, #1e63d4);
    box-shadow: 0 0 0 3px var(--isp-brand-soft, #e8efff);
}
.offertebot-search__icon { color: var(--isp-mute, #6b7a93); flex-shrink: 0; }
.offertebot-search__input {
    flex: 1; min-width: 0;
    border: 0; background: transparent;
    font-size: 15px; color: var(--isp-ink, #0f1d36); outline: 0;
    padding: 4px 0;
}
.offertebot-search__input::placeholder { color: var(--isp-mute, #6b7a93); }
.offertebot-search__submit { flex-shrink: 0; }
.offertebot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.offertebot-grid__item { display: flex; }
.offertebot-grid__item .isp-card--deal { width: 100%; }

/* Card "In Evidenza" — sostituisce "Ore: HH:MM" con badge testuale blu. */
.isp-card--deal .isp-deal-time--featured {
    color: var(--isp-brand, #1e63d4);
    font-style: normal;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: uppercase;
}
.isp-card--deal .isp-deal-time--featured::before { content: ""; }

/* Separatore orizzontale prima del box Telegram (.tg-split) */
.tg-split-separator { border: none; border-top: 1px solid #e4e8ee; margin: 0 0 40px 0; height: 0; }

/* Box CTA inline (split tra il 6° card e i successivi) */
.offertebot-grid-cta-wrap { margin: 24px 0; }
.offertebot-grid-cta-wrap .tg-split { margin: 24px 0; }
.tg-split-separator--inline { margin: 0; }
.offertebot-grid + .offertebot-grid-cta-wrap + .offertebot-grid { margin-top: 0; }

/* Box intro descrittivo (solo su archivio principale, non su search/categoria) */
.offertebot-intro {
    background: #fff;
    border: 1px solid var(--isp-border, #e4e8ee);
    border-radius: var(--isp-radius, 12px);
    padding: 18px 22px;
}
.offertebot-intro p {
    margin: 0;
    font-size: var(--isp-article-size, 18px);
    line-height: var(--isp-article-lh, 1.6);
    color: var(--isp-ink2, #2c3a52);
}
.offertebot-intro strong { color: var(--isp-ink, #0f1d36); }
.offertebot-intro a { color: var(--isp-brand, #1e63d4); text-decoration: none; }
.offertebot-intro a:hover { text-decoration: underline; }
.offertebot-intro a strong { color: inherit; }
@media (max-width: 640px) {
    .offertebot-intro { padding: 14px 16px; }
    /* Mobile overflow guards: gli ascendenti flex/grid possono lasciare i figli
       crescere oltre il viewport se non hanno min-width:0. Fissiamo i box
       larghezza/wrap del testo + form in colonna. */
    .offertebot-archive,
    .offertebot-archive__header,
    .offertebot-archive__title-row,
    .offertebot-intro,
    .offertebot-search,
    .offertebot-cats-wrap { min-width: 0; max-width: 100%; box-sizing: border-box; }
    .offertebot-cats-wrap { width: 100%; }
    .offertebot-cats { touch-action: pan-x; overscroll-behavior-x: contain; }
    .offertebot-archive__title-row .isp-section__title { font-size: 22px; min-width: 0; word-break: break-word; }
    .offertebot-archive__title-row { flex-wrap: wrap; gap: 4px 12px; }
    .offertebot-intro p { overflow-wrap: anywhere; }
    .offertebot-search { padding: 8px 10px; gap: 8px; }
    .offertebot-search__input { flex: 1 1 0; min-width: 0; width: auto; font-size: 14px; }
    .offertebot-search__submit { padding: 8px 12px; font-size: 13px; }
}

/* Sidebar nascosta su mobile/tablet (<=1024px). PHP gating con wp_is_mobile()
   non e' affidabile dietro page cache (W3TC senza UA bucket). */
@media (max-width: 1024px) {
    .post-type-archive-offerta .isp-sidebar,
    .tax-offerta_cat .isp-sidebar,
    .single-offerta .isp-single-layout__sidebar { display: none !important; }
    .single-offerta .isp-single-layout { grid-template-columns: 1fr !important; }
}

/* Barra categorie sotto la searchbox — sempre singola riga scrollabile */
.offertebot-cats {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.offertebot-cats::-webkit-scrollbar { display: none; }
.offertebot-cats__item {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    background: #fff;
    color: var(--isp-mute, #6b7a93);
    border: 1.5px solid var(--isp-border, #e4e8ee);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.offertebot-cats__item:hover {
    color: var(--isp-brand, #1e63d4);
    border-color: var(--isp-brand, #1e63d4);
}
.offertebot-cats__item.is-active {
    background: var(--isp-brand, #1e63d4);
    color: #fff;
    border-color: var(--isp-brand, #1e63d4);
}
/* "Tutte" è un pin fisso a sinistra fuori dal nav scrollabile,
   in modo che resti sempre visibile mentre le altre chip scorrono. */
.offertebot-cats-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.offertebot-cats-wrap > .offertebot-cats__item--all {
    flex-shrink: 0;
    margin-right: 4px;
    /* leggero divisore visivo per "staccare" Tutte dal resto */
    position: relative;
}
.offertebot-cats-wrap > .offertebot-cats__item--all::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 50%;
    width: 1px;
    height: 24px;
    transform: translateY(-50%);
    background: var(--isp-border, #e4e8ee);
}
.offertebot-cats-wrap > .offertebot-cats {
    flex: 1;
    min-width: 0;
}
@media (max-width: 640px) {
    .offertebot-cats { gap: 6px; }
    .offertebot-cats__item { padding: 6px 12px; font-size: 14px; }
    .tg-split .tg-split__btn { width: 100%; justify-content: center; }
}

/* ========================================
   SINGLE OFFERTA — layout "Magazine"
   Hero copertina full-bleed + body 2-col main+sidebar
   ======================================== */

/* Reset padding di .isp-main per attaccare l'hero al top */
.od-single { padding-top: 0 !important; }
/* Stacco fra hero e body */
.od-single .od-cover + .isp-container { padding-top: 32px; }
@media (max-width: 768px) {
    .od-single .od-cover + .isp-container { padding-top: 20px; }
}

/* === HERO COVER FULL-BLEED === */
.od-cover {
    position: relative;
    padding: 48px 0 40px;
    background:
        radial-gradient(circle at 20% 15%, var(--isp-brand-soft, #e8efff), transparent 55%),
        radial-gradient(circle at 85% 80%, #fef3c7, transparent 55%),
        #fafbfc;
    border-bottom: 1px solid var(--isp-border-soft, #eef1f7);
    overflow: hidden;
}
.od-cover__inner {
    max-width: 1236px;
    margin: 0 auto;
    padding: 0 var(--isp-sp-xl, 32px);
    position: relative;
    z-index: 1;
}
.od-cover__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 48px;
    align-items: center;
    margin-top: 8px;
}
.od-cover__text { min-width: 0; }
.od-cover__media-wrap { position: relative; }
.od-cover__media-wrap .isp-single-actions { top: -14px; right: 10px; }
.od-cover__media {
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: var(--isp-radius-lg, 16px);
    display: flex; align-items: center; justify-content: center;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(15, 29, 54, .1);
    transform: rotate(2deg);
    transition: transform .4s ease;
}
.od-cover__media:hover { transform: rotate(0); }
.od-cover__media img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Eyebrow (live · cat · time) */
.od-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--isp-border-soft, #eef1f7);
    border-radius: 8px;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    color: var(--isp-ink2, #3a4a68);
    margin-bottom: 16px;
}
.od-eyebrow__dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #10b981;
    animation: od-pulse 2s ease-in-out infinite;
}
.od-single--expired .od-eyebrow__dot { background: #6b7280; animation: none; }
.od-eyebrow__sep { color: var(--isp-border, #d1d5db); }
.od-eyebrow__star { color: #f59e0b; display: inline-flex; align-items: center; }
.od-eyebrow__lowest { color: #d4572c; font-weight: 800; }
@keyframes od-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); }
    50%      { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* Titolo nell'hero */
.od-cover__title {
    font-size: var(--isp-single-title-size, 32px);
    line-height: 1.3;
    letter-spacing: var(--isp-single-title-ls, -0.03em);
    font-weight: 800;
    color: var(--isp-ink, #0f1d36);
    margin: 0 0 18px;
    max-width: 720px;
}

/* Price tag fluttuante */
.od-pricetag {
    display: inline-flex; flex-direction: column; gap: 4px;
    padding: 18px 24px;
    background: #fff;
    border-radius: var(--isp-radius, 12px);
    box-shadow: 0 4px 12px rgba(15, 29, 54, .08);
    margin: 0 0 22px;
    max-width: 100%;
}
.od-pricetag__pct {
    align-self: flex-start;
    padding: 3px 10px;
    background: var(--isp-accent, #d4572c);
    color: #fff;
    border-radius: 6px;
    font-size: 12px; font-weight: 800;
    letter-spacing: .4px;
    margin-bottom: 4px;
}
.od-pricetag__row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.od-pricetag__now {
    font-size: clamp(34px, 4.4vw, 48px);
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--isp-ink, #0f1d36);
    line-height: 1;
}
.od-pricetag__old {
    font-size: 18px;
    color: var(--isp-mute, #6b7a93);
    text-decoration: line-through;
}
.od-pricetag__save {
    font-size: 13px; font-weight: 700;
    color: #047857;
    margin-top: 2px;
}

/* CTA bar */
.od-cta-bar {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    margin: 0 0 18px;
}
.od-cta-bar__buy {
    padding: 14px 28px; font-size: 16px;
    position: relative; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.od-cta-bar__buy svg { transition: transform .25s ease; }
a.od-cta-bar__buy::before {
    content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
    transition: left .55s ease;
}
a.od-cta-bar__buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(30, 99, 212, .28);
}
a.od-cta-bar__buy:hover svg { transform: translateX(4px); }
a.od-cta-bar__buy:hover::before { left: 100%; }
a.od-cta-bar__buy:active { transform: translateY(0); }
.od-cta-bar__hint {
    display: inline-flex; align-items: center; gap: 6px;
    flex-wrap: nowrap; white-space: nowrap;
    font-size: 13px;
    color: var(--isp-mute, #6b7a93);
}
.od-cta-bar__hint svg { flex-shrink: 0; padding-left: 3px; }

/* Rating row nella hero */
.od-cover__rating {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap;
}
.od-cover__rating-count {
    font-size: 13px;
    color: var(--isp-mute, #6b7a93);
}

/* === BODY: sezioni nel main column === */
.isp-single-layout__main .isp-article.od-deal {
    padding: 28px 32px;
    display: flex; flex-direction: column; gap: 28px;
}
.od-section { display: flex; flex-direction: column; gap: 14px; }
.od-section--editorial,
.od-section--specs { margin-top: 16px; }
.od-section__title {
    font-size: 18px; font-weight: 700;
    color: var(--isp-ink, #0f1d36);
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--isp-ink, #0f1d36);
    align-self: flex-start;
}

/* Highlights grid */
.od-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.od-hl {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: var(--isp-bg, #f4f6fa);
    border-radius: var(--isp-radius, 12px);
    transition: background .15s, transform .15s;
}
.od-hl:hover { background: var(--isp-brand-soft, #e8efff); transform: translateX(2px); }
.od-hl__icon {
    width: 40px; height: 40px; border-radius: 8px;
    background: var(--isp-brand-soft, #e8efff);
    color: var(--isp-brand, #1e63d4);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.od-hl__icon--discount { --stat-color: #27ae60; background: color-mix(in srgb, var(--stat-color) 12%, white); color: var(--stat-color); }
.od-hl__icon--reviews  { background: #fef3c7; color: #b45309; }
.od-hl__icon--coupon   { background: #d1fae5; color: #047857; }
.od-hl__icon--flash    { background: #fef3c7; color: #d97706; }
.od-hl__icon--checkout { background: #ede9fe; color: #7c3aed; }
.od-hl__icon--shipping { background: #ffd9b3; color: #b8430a; }
.od-hl__icon--lowest   { background: #fee2e2; color: #b91c1c; }
.od-hl__icon--vpc      { background: #d1fae5; color: #047857; }
.od-hl__icon--used     { background: #f3e8ff; color: #7e22ce; }
.od-hl__icon--bomba    { background: #ffe4e6; color: #be123c; }
.od-hl__icon--scorta   { background: #dbeafe; color: #1d4ed8; }
.od-hl__icon--imperdi  { background: #fef9c3; color: #a16207; }
.od-hl__label { font-size: 12px; color: var(--isp-mute, #6b7a93); }
.od-hl__val { font-weight: 700; font-size: 14px; color: var(--isp-ink, #0f1d36); }

/* Editorial content */
.od-editorial {
    font-size: 18px; line-height: 1.7;
    color: var(--isp-ink2, #3a4a68);
}
.od-editorial p { margin: 0 0 12px; }
.od-editorial p:last-child { margin-bottom: 0; }
.od-editorial a { color: var(--isp-brand, #1e63d4); }
.od-editorial code {
    background: var(--isp-bg, #f4f6fa);
    padding: 2px 8px; border-radius: 4px;
    font-family: var(--isp-font-mono, "SF Mono", Consolas, monospace);
    font-size: .9em; color: var(--isp-ink, #0f1d36);
}

/* === Specifiche (nel main) === */
.od-specs {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 20px;
    row-gap: 10px;
    margin: 0;
    font-size: 14px;
}
.od-specs--grid {
    grid-template-columns: max-content 1fr max-content 1fr;
    column-gap: 0;
    row-gap: 0;
    border-top: 1px solid var(--isp-border-soft, #eef1f7);
}
.od-specs--grid > dt,
.od-specs--grid > dd {
    padding: 12px 16px;
    border-bottom: 1px solid var(--isp-border-soft, #eef1f7);
    align-content: center;
}
.od-specs--grid > dt:nth-child(4n+1) { padding-left: 0; }
.od-specs--grid > dd:nth-child(4n+2) { border-right: 1px solid var(--isp-border-soft, #eef1f7); }
.od-specs--grid > dt:nth-child(4n+3) { padding-left: 24px; }
.od-specs--grid > dd:nth-child(4n) { padding-right: 0; }
@media (max-width: 720px) {
    .od-specs--grid { grid-template-columns: max-content 1fr; }
    .od-specs--grid > dd:nth-child(4n+2) { border-right: 0; }
    .od-specs--grid > dt:nth-child(4n+3) { padding-left: 0; }
    .od-specs--grid > dd:nth-child(4n) { padding-right: 16px; }
}
.od-specs dt {
    color: var(--isp-mute, #6b7a93);
    font-size: 13px;
}
.od-specs dd {
    margin: 0;
    font-weight: 600;
    color: var(--isp-ink, #0f1d36);
    word-break: break-word;
}
.od-specs dd a { color: var(--isp-brand, #1e63d4); text-decoration: none; }
.od-specs dd a:hover { color: var(--isp-brand-dark, #174ea8); }
.od-specs__mono { font-family: var(--isp-font-mono, "SF Mono", Consolas, monospace); font-size: 13px; }

/* === Telegram CTA — Conversational bubble === */
.tg-cta {
    --tg-blue: #229ED9;
    --tg-blue-dark: #1c87b8;
    --tg-cta-bg: #eef6fb;
    background: var(--tg-cta-bg);
    border-radius: var(--isp-radius-lg, 16px);
    padding: 28px;
    border: 1px solid #c7e6f5;
    margin-top: 24px;
}
.tg-cta__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid #d2e9f6;
    padding-bottom: 20px;
}
.tg-cta__avatar {
    width: 44px; height: 44px; border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(34, 158, 217, .3);
    flex-shrink: 0;
    background: var(--tg-blue);
}
.tg-cta__channel {
    font-size: 17px;
    font-weight: 700;
    color: var(--isp-ink, #0f1d36);
}
.tg-cta__meta { font-size: 12px; color: var(--isp-mute, #6b7a93); display: flex; align-items: center; gap: 6px; }
.tg-cta__dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
/* Bolle stile iMessage: ricevute (grigio chiaro a sx) e inviate (blu a dx),
   con codina che indica la direzione. La codina è composta da due pseudo-
   elementi: ::before è la pancia colorata, ::after è il "cutout" del colore
   sfondo per simulare la curva di iMessage. */
.tg-cta__bubble {
    position: relative;
    background: #ffffff;
    color: #0f1d36;
    border-radius: 99px;
    padding: 14px 28px;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    max-width: 88%;
    width: max-content;
    border: 1px solid #e4e8ee;
}
.tg-cta__bubble strong { color: inherit; font-weight: 700; }
/* Codina sinistra (bolle ricevute) */
.tg-cta__bubble:not(.tg-cta__bubble--me)::before {
    content: "";
    position: absolute;
    bottom: -1px; left: -1px;
    width: 18px; height: 20px;
    background: #ffffff;
    border-bottom-right-radius: 16px 14px;
    border-left: 1px solid #e4e8ee;
    border-bottom: 0;
}
.tg-cta__bubble:not(.tg-cta__bubble--me)::after {
    content: "";
    position: absolute;
    bottom: -1px; left: -22px;
    width: 16px; height: 22px;
    background: var(--tg-cta-bg, #eef6fb);
    border-bottom-right-radius: 12px;
}
/* Bolla "me" (inviata) — colori iMessage blu */
.tg-cta__bubble--me {
    background: #229ed9;
    color: #fff;
    margin-left: auto;
    margin-top: 18px;
    padding: 14px 28px;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(34, 158, 217, .25);
}
.tg-cta__bubble--me[data-tg-cta-shortcut] { cursor: pointer; }
.tg-cta__bubble--me::before {
    content: "";
    position: absolute;
    bottom: -1px; right: -7px;
    width: 18px; height: 20px;
    margin-right: 10px;
    background: #229ed9;
    border-bottom-left-radius: 16px 14px;
}
.tg-cta__bubble--me::after {
    content: "";
    position: absolute;
    bottom: -1px; right: -22px;
    width: 16px; height: 22px;
    background: var(--tg-cta-bg, #eef6fb);
    border-bottom-left-radius: 12px;
}
.tg-cta__bubble strong { color: var(--isp-ink, #0f1d36); }
.tg-cta__bubble--me strong { color: #fff; }
.tg-cta__cta {
    margin-top: 18px; padding-top: 18px;
    border-top: 1px solid rgba(34, 158, 217, .15);
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; flex-wrap: wrap;
}
.tg-cta__people { font-size: 13px; color: var(--isp-mute, #6b7a93); }
.tg-cta__people strong { color: var(--isp-ink, #0f1d36); }
/* Bottone: usa lo stile dei pulsanti del tema (.isp-btn-primary) ma con il
   colore Telegram al posto del brand iSpazio. */
.tg-cta__btn.isp-btn-primary,
.tg-cta__btn.isp-btn-primary:visited {
    background: var(--tg-blue);
    position: relative;
    overflow: hidden;
    transition: background .15s, transform .2s ease, box-shadow .2s ease;
}
.tg-cta__btn.isp-btn-primary svg { transition: transform .35s ease; will-change: transform; }
.tg-cta__btn-arrow { transition: transform .25s ease; }
@keyframes tg-fly {
    0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
    45%  { transform: translate(28px, -22px) rotate(-15deg); opacity: 0; }
    46%  { transform: translate(-28px, 22px) rotate(0); opacity: 0; }
    100% { transform: translate(0, 0) rotate(0); opacity: 1; }
}
.tg-cta__btn.isp-btn-primary::before {
    content: ""; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.4), transparent);
    transition: left .65s ease;
    pointer-events: none;
}
.tg-cta__btn.isp-btn-primary:hover,
.tg-cta__btn.isp-btn-primary:focus-visible {
    background: var(--tg-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(34, 158, 217, .35);
}
.tg-cta__btn.isp-btn-primary:hover .tg-cta__btn-plane,
.tg-cta__btn.isp-btn-primary:focus-visible .tg-cta__btn-plane,
.tg-cta__bubble--me:hover ~ .tg-cta__cta .tg-cta__btn-plane {
    animation: tg-fly .75s cubic-bezier(.55,.05,.3,1) forwards;
}
.tg-cta__btn.isp-btn-primary:hover .tg-cta__btn-arrow,
.tg-cta__btn.isp-btn-primary:focus-visible .tg-cta__btn-arrow,
.tg-cta__bubble--me:hover ~ .tg-cta__cta .tg-cta__btn-arrow {
    transform: translateX(4px);
}
/* Quando passi sulla bolla blu, anche il bottone si "anima" come se fosse hover */
.tg-cta__bubble--me:hover ~ .tg-cta__cta .tg-cta__btn.isp-btn-primary {
    background: var(--tg-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(34, 158, 217, .35);
}
.tg-cta__bubble--me:hover ~ .tg-cta__cta .tg-cta__btn.isp-btn-primary::before { left: 100%; }
.tg-cta__btn.isp-btn-primary:hover::before { left: 100%; }
.tg-cta__btn.isp-btn-primary:active { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .tg-cta__btn.isp-btn-primary,
    .tg-cta__btn.isp-btn-primary svg,
    .tg-cta__btn.isp-btn-primary::before { transition: none; animation: none; }
}
@media (max-width: 600px) {
    .tg-cta { padding: 20px; }
    .tg-cta__bubble { max-width: 100%; }
}

/* === Telegram CTA — Split layout (archivio offerte) === */
.tg-split {
    --tg-blue: #229ED9;
    --tg-blue-dark: #1c87b8;
    display: grid;
    grid-template-columns: minmax(0, 280px) 1fr;
    border-radius: var(--isp-radius-lg, 16px);
    overflow: hidden;
    border: 1px solid var(--isp-border-soft, #eef1f7);
    box-shadow: var(--isp-shadow-sm, 0 1px 3px rgba(15, 29, 54, .06));
    margin-top: 32px;
    background: #fff;
}
.tg-split__visual {
    background: linear-gradient(135deg, #229ED9, #1c87b8 60%, #144d6b);
    padding: 32px;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    color: #fff; text-align: center; gap: 12px;
    position: relative;
}
.tg-split__visual::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.18), transparent 50%);
    pointer-events: none;
}
.tg-split__avatar {
    width: 84px; height: 84px; border-radius: 24px;
    background: rgba(255,255,255,.18);
    object-fit: cover;
    position: relative; z-index: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}
.tg-split__handle { font-size: 14px; font-weight: 600; opacity: .9; position: relative; z-index: 1; }
.tg-split__count {
    font-size: 22px; font-weight: 800; letter-spacing: -.3px;
    position: relative; z-index: 1; line-height: 1.1;
}
.tg-split__count span {
    display: block; margin-top: 2px;
    font-size: 12px; font-weight: 600; opacity: .75;
}
.tg-split__body { padding: 28px 32px; }
.tg-split__title {
    font-size: 22px; font-weight: 800; letter-spacing: -.3px;
    color: var(--isp-ink, #0f1d36); margin: 0 0 8px;
    line-height: 1.25;
}
.tg-split__lead {
    font-size: 14px; color: var(--isp-ink2, #3a4a68);
    margin: 0 0 16px; line-height: 1.6;
}
.tg-split__benefits { list-style: none; margin: 0 0 18px; padding: 0; }
.tg-split__benefits li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 14px; color: var(--isp-ink2, #3a4a68);
    padding: 6px 0;
}
.tg-split__benefits li::before {
    content: "→"; color: var(--tg-blue);
    font-weight: 700; flex-shrink: 0;
}
/* Bottone — riusa lo stile del tema con animazioni come la CTA bubble */
.tg-split__btn.isp-btn-primary,
.tg-split__btn.isp-btn-primary:visited {
    background: var(--tg-blue);
    position: relative; overflow: hidden;
    transition: background .15s, transform .2s ease, box-shadow .2s ease;
}
.tg-split__btn.isp-btn-primary svg { transition: transform .35s ease; }
.tg-split__btn-arrow { transition: transform .25s ease; }
.tg-split__btn.isp-btn-primary::before {
    content: ""; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.4), transparent);
    transition: left .65s ease;
    pointer-events: none;
}
.tg-split__btn.isp-btn-primary:hover,
.tg-split__btn.isp-btn-primary:focus-visible {
    background: var(--tg-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(34, 158, 217, .35);
}
.tg-split__btn.isp-btn-primary:hover .tg-split__btn-plane,
.tg-split__visual:hover ~ .tg-split__body .tg-split__btn-plane {
    animation: tg-fly .75s cubic-bezier(.55,.05,.3,1) forwards;
}
.tg-split__btn.isp-btn-primary:hover .tg-split__btn-arrow,
.tg-split__visual:hover ~ .tg-split__body .tg-split__btn-arrow { transform: translateX(4px); }
.tg-split__btn.isp-btn-primary:hover::before,
.tg-split__visual:hover ~ .tg-split__body .tg-split__btn.isp-btn-primary::before { left: 100%; }
.tg-split__visual:hover ~ .tg-split__body .tg-split__btn.isp-btn-primary {
    background: var(--tg-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(34, 158, 217, .35);
}
.tg-split__visual[data-tg-cta-shortcut] { cursor: pointer; }
@media (max-width: 700px) {
    .tg-split { grid-template-columns: 1fr; }
    .tg-split__visual { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .tg-split__btn.isp-btn-primary,
    .tg-split__btn.isp-btn-primary svg,
    .tg-split__btn.isp-btn-primary::before { transition: none; animation: none; }
}

/* === Sezione related === */
.od-section--related { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.od-section--related .isp-btn-load-more { margin-top: 0; }
.od-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 768px) {
    .od-related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Breadcrumb (riusato nell'hero) */
.od-crumb {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    font-size: 14px; color: var(--isp-ink2, #3a4a68);
    margin: 0 0 16px;
}
.od-crumb a {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--isp-brand, #1e63d4); text-decoration: none;
    font-weight: 600; transition: color .15s;
}
.od-crumb a:hover { color: var(--isp-brand-dark, #174ea8); }
.od-crumb__sep { color: var(--isp-border, #d1d5db); }
.od-crumb__cat { color: var(--isp-brand); }

/* Badges (lampo / minimo storico / ecc.) */
.od-badges {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 0 0 18px;
}
.od-badges--cover { margin-bottom: 22px; }
.od-tag {
    display: inline-block;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px;
    padding: 5px 12px; border-radius: 20px;
}
.od-tag--lowest  { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; }
.od-tag--flash   { background: linear-gradient(135deg, #fffbeb, #fef3c7); color: #d97706; }
.od-tag--bomba   { background: linear-gradient(135deg, #fff7ed, #fed7aa); color: #c2410c; }
.od-tag--errore  { background: linear-gradient(135deg, #fef2f2, #fecaca); color: #b91c1c; }
.od-tag--scorta  { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #047857; }
.od-tag--imperdi { background: linear-gradient(135deg, var(--isp-brand-soft, #e8efff), #dbeafe); color: var(--isp-brand, #1d4ed8); }
.od-tag--expired { background: #f3f4f6; color: #6b7280; }
.od-tag--used    { background: linear-gradient(135deg, #faf5ff, #ede9fe); color: #7c3aed; }

.od-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    font-size: 13px; font-weight: 700;
    border-radius: 8px;
}
.od-chip--stars {
    background: var(--isp-brand-soft, #e8efff);
    color: var(--isp-brand, #1e63d4);
}
.od-chip--stars svg { color: var(--isp-brand, #1e63d4); }
.od-chip--reviews {
    background: var(--isp-bg, #f4f6fa);
    color: var(--isp-ink2, #3a4a68);
    text-transform: uppercase; letter-spacing: .3px; font-size: 12px;
}

/* CTA Acquista (solo stato expired) */
.od-buy--expired {
    background: #e5e7eb !important; color: #6b7280 !important;
}
a.od-buy--expired:hover { background: #d1d5db !important; color: #4b5563 !important; }

/* Coupon / hint */
.od-notes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.od-coupon {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 12px 16px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px dashed #10b981;
    border-radius: var(--isp-radius-sm, 8px);
    color: #065f46;
}
.od-coupon__left { display: flex; align-items: center; gap: 8px; }
.od-coupon__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.od-coupon__right { display: flex; align-items: center; gap: 8px; }
.od-coupon__code {
    background: #fff; color: #047857;
    padding: 4px 10px; border-radius: 6px;
    font-family: var(--isp-font-mono, "SF Mono", Consolas, monospace);
    font-size: 13px; font-weight: 700;
}
.od-coupon__copy {
    background: #047857; color: #fff;
    border: none; padding: 6px 12px; border-radius: 6px;
    font-size: 12px; font-weight: 700; cursor: pointer;
    transition: background .15s;
}
.od-coupon__copy:hover { background: #065f46; }
.od-coupon__copy:focus-visible {
    outline: 2px solid var(--isp-brand, #1e63d4);
    outline-offset: 2px;
}
.od-cta-bar__buy:focus-visible,
.od-crumb a:focus-visible {
    outline: 2px solid var(--isp-brand, #1e63d4);
    outline-offset: 3px;
    border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
    .od-cover__media,
    .od-eyebrow__dot,
    .od-hl { transition: none !important; animation: none !important; }
    .od-cover__media { transform: none !important; }
}

.od-hint {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    border-radius: var(--isp-radius-sm, 8px);
    font-size: 13px;
}
.od-hint--warn  { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.od-hint--green { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.od-hint--flash { background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fcd34d; color: #b45309; }

/* Expired state */
.od-single--expired .od-cover__media img { opacity: .55; filter: grayscale(.4); }
.od-single--expired .od-cover { filter: saturate(.85); }

/* 404 personalizzato per offerta non trovata */
.od-404 { display: flex; flex-direction: column; gap: 32px; }
.od-404__hero {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 24px 16px 12px;
}
.od-404__hero svg { color: var(--isp-mute, #6b7a93); margin-bottom: 16px; opacity: .55; }
.od-404__title {
    font-size: var(--isp-single-title-size, 32px);
    line-height: 1.3; font-weight: 800;
    letter-spacing: var(--isp-single-title-ls, -0.03em);
    color: var(--isp-ink, #0f1d36);
    margin: 0 0 12px;
}
.od-404__lead {
    font-size: 16px; line-height: 1.6;
    color: var(--isp-ink2, #3a4a68);
    max-width: 560px; margin: 0 0 24px;
}
.od-404__cta {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    margin-bottom: 8px;
}
.od-404__telegram {
    color: var(--isp-mute, #6b7a93); font-size: 14px;
    text-decoration: none; transition: color .15s;
}
.od-404__telegram span { color: var(--isp-brand, #1e63d4); font-weight: 600; }
.od-404__telegram span:hover { text-decoration: underline; }
.od-404-wrap { max-width: 100%; display: flex; flex-direction: column; gap: 32px; }
.od-404__suggested { padding: 0; }
.offertebot-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 768px) {
    .offertebot-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .offertebot-grid--3 { grid-template-columns: 1fr; }
}
.od-404__suggested { padding-bottom: 24px; }
.od-404__suggested-title {
    font-size: 20px; font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--isp-border-soft, #eef1f7);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 960px) {
    .od-cover { padding: 36px 0 32px; }
    .od-cover__inner { padding: 0 var(--isp-sp-md, 16px); }
    .od-cover__layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .od-cover__media {
        max-width: 360px;
        margin: 0 auto;
        transform: rotate(0);
    }
    .od-highlights { grid-template-columns: 1fr; }
    .isp-single-layout__main .isp-article.od-deal { padding: 24px 20px; gap: 24px; }
}
@media (max-width: 768px) {
    .offertebot-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .od-cover { padding: 28px 0; }
    .od-pricetag { padding: 16px 20px; width: 100%; max-width: unset; }
    .od-cta-bar__buy { width: 100%; justify-content: center; }
    .od-cta-bar__hint { justify-content: center; text-align: center; align-self: center; }
    .od-coupon { flex-direction: column; gap: 10px; align-items: flex-start; }

    .tg-cta__bubble:not(.tg-cta__bubble--me)::before,
    .tg-cta__bubble:not(.tg-cta__bubble--me)::after { display: none; }
    .tg-cta__bubble--me::before { right: -1px; width: 15px; }
    .tg-cta__bubble--me::after { background: unset; }
    .tg-cta__cta { justify-content: center; }
    .tg-cta__cta .tg-cta__btn { margin: 0 auto; }

}
@media (max-width: 480px) {
    .offertebot-grid { grid-template-columns: 1fr; }
}
