/**
 * Coupon Orario — front office (popup, linguetta, box prodotto, banda listing,
 * promemoria carrello, pagina prodotti selezionati).
 *
 * Tutto è sotto .cor-scope: i colori arrivano come variabili CSS inline dal
 * modulo (--cor-accent, --cor-dark, --cor-gold). Il reset locale dei
 * pulsanti/titoli evita che le regole generiche del tema (Leo/Classic)
 * deformino i componenti.
 *
 * @author  KeideaCMS
 */

/* ===================================================================== */
/* Base / reset locale                                                    */
/* ===================================================================== */
.cor-scope {
    --cor-accent: #c8102e;
    --cor-accent-rgb: 200, 16, 46;
    --cor-dark: #1b202c;
    --cor-gold: #f0d7b0;
    --cor-ink: #ffffff;
    --cor-ink-rgb: 255, 255, 255;
    --cor-muted: rgba(var(--cor-ink-rgb), .74);
    --cor-line: rgba(var(--cor-ink-rgb), .26);
    --cor-radius: 22px;
    --cor-font-display: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.cor-font--condensed {
    --cor-font-display: "Barlow Condensed", "Oswald", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}
.cor-font--theme { --cor-font-display: inherit; }

.cor-scope,
.cor-scope *,
.cor-scope *::before,
.cor-scope *::after { box-sizing: border-box; }

.cor-scope[hidden],
.cor-scope [hidden] { display: none !important; }

.cor-scope button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-transform: none;
    text-shadow: none;
    width: auto;
    height: auto;
    min-height: 0;
    cursor: pointer;
}
.cor-scope h1,
.cor-scope h2,
.cor-scope p,
.cor-scope ol { margin: 0; padding: 0; }
.cor-scope ol { list-style: none; }
.cor-scope a { text-decoration: none; }
.cor-scope svg {
    display: inline-block;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}
.cor-scope .cor-ico { width: 18px; height: 18px; }
.cor-scope .cor-v { white-space: nowrap; }
.cor-scope .cor-v--code { color: var(--cor-ink); font-weight: 800; letter-spacing: .04em; }

/* Stato: mostra solo i pezzi coerenti con data-cor-state (active / soon / off) */
.cor-scope[data-cor-state="active"] [data-cor-when]:not([data-cor-when="active"]),
.cor-scope[data-cor-state="soon"] [data-cor-when]:not([data-cor-when="soon"]),
.cor-scope[data-cor-state="off"] [data-cor-when]:not([data-cor-when="off"]) { display: none !important; }

/* ===================================================================== */
/* Popup                                                                  */
/* ===================================================================== */
.cor-root {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 28px;
    pointer-events: none;
}
.cor-root--left { justify-content: flex-start; }
.cor-root--center { justify-content: center; }

.cor-backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(9, 11, 17, .58);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .35s ease;
}
.cor-root--center.is-open .cor-backdrop { opacity: 1; pointer-events: auto; }

.cor-popup {
    position: relative;
    width: 470px;
    max-width: 100%;
    max-height: calc(100vh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 26px 28px 20px;
    border-radius: var(--cor-radius);
    color: var(--cor-ink);
    background:
        radial-gradient(130% 70% at 110% -10%, rgba(var(--cor-ink-rgb), .07), transparent 60%),
        linear-gradient(180deg, rgba(var(--cor-ink-rgb), .045), rgba(var(--cor-ink-rgb), 0) 45%),
        var(--cor-dark);
    box-shadow:
        0 0 0 3px var(--cor-gold),
        0 0 0 9px rgba(240, 215, 176, .14),
        0 40px 80px -24px rgba(5, 8, 15, .65);
    font-size: 16px;
    line-height: 1.45;
    text-align: left;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(48px) scale(.97);
    transition: opacity .38s ease, transform .6s cubic-bezier(.18, .89, .24, 1.08);
    scrollbar-width: thin;
}
.cor-root--left .cor-popup { transform: translateX(-48px) scale(.97); }
.cor-root--center .cor-popup { transform: translateY(26px) scale(.97); }
.cor-root.is-open .cor-popup { opacity: 1; transform: none; }
.cor-popup:focus { outline: none; }

/* bagliore rosso decorativo dietro la percentuale */
.cor-popup__glow {
    position: absolute;
    left: -80px;
    top: 150px;
    width: 340px;
    height: 240px;
    background: radial-gradient(closest-side, rgba(var(--cor-accent-rgb), .38), transparent);
    background: radial-gradient(closest-side, var(--cor-accent), transparent);
    opacity: .28;
    filter: blur(20px);
    pointer-events: none;
}

.cor-scope .cor-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(var(--cor-ink-rgb), .78);
    color: var(--cor-ink);
    transition: background-color .2s, color .2s, transform .2s;
}
.cor-scope .cor-close svg { width: 20px; height: 20px; stroke-width: 2.2; }
.cor-scope .cor-close:hover,
.cor-scope .cor-close:focus-visible { background: var(--cor-ink); color: var(--cor-dark); transform: rotate(90deg); }

/* --- badge --- */
.cor-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 52px);
    padding: 8px 16px 8px 10px;
    border-radius: 999px;
    background: var(--cor-accent);
    box-shadow: inset 0 0 0 1px rgba(var(--cor-ink-rgb), .22), 0 8px 22px -10px var(--cor-accent);
    color: var(--cor-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.cor-badge .cor-ico { width: 20px; height: 20px; stroke-width: 2.2; }
.cor-badge__dot {
    position: relative;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cor-ink);
}
.cor-badge__dot::after {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(var(--cor-ink-rgb), .7);
    animation: cor-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
[data-cor-state="soon"] .cor-badge__dot::after { animation: none; opacity: 0; }

/* --- titolo + percentuale --- */
.cor-scope .cor-title {
    margin: 18px 0 0;
    color: var(--cor-ink);
    font-family: var(--cor-font-display);
    font-size: 46px;
    font-weight: 800;
    font-style: normal;
    line-height: .96;
    letter-spacing: .004em;
    text-transform: uppercase;
    text-shadow: none;
}
.cor-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin: 8px 0 6px;
}
.cor-hero__percent {
    display: inline-flex;
    align-items: baseline;
    color: var(--cor-accent);
    font-family: var(--cor-font-display);
    font-size: 132px;
    font-weight: 800;
    line-height: .8;
    letter-spacing: -.035em;
    text-shadow: 0 10px 40px rgba(0, 0, 0, .25);
    transform-origin: left 80%;
}
.cor-hero__minus { margin-right: .02em; }
.cor-hero__sign { font-size: .78em; margin-left: .02em; }
.cor-hero__now {
    margin-bottom: 14px;
    color: var(--cor-ink);
    font-family: var(--cor-font-display);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.cor-hero--soon .cor-hero__percent { font-size: 96px; opacity: .92; }
.cor-hero--soon .cor-hero__now { display: flex; flex-direction: column; font-size: 30px; line-height: 1; }
.cor-hero--soon .cor-hero__now small { color: var(--cor-muted); font-size: 13px; font-weight: 600; letter-spacing: .1em; }
.cor-hero--soon .cor-hero__now b { font-variant-numeric: tabular-nums; }

.cor-scope .cor-desc {
    margin: 12px 0 0;
    color: rgba(var(--cor-ink-rgb), .9);
    font-size: 16.5px;
    line-height: 1.5;
}

/* --- codice --- */
.cor-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 18px;
}
.cor-code {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 6px 12px;
    border: 2px dashed rgba(var(--cor-ink-rgb), .78);
    border-radius: 12px;
    background: rgba(var(--cor-ink-rgb), .03);
    color: var(--cor-ink);
    font-family: var(--cor-font-display);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1;
    text-indent: .16em;
    -webkit-user-select: all;
    user-select: all;
}
.cor-scope .cor-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 64px;
    padding: 0 20px;
    border: 1.5px solid rgba(var(--cor-ink-rgb), .85);
    border-radius: 12px;
    color: var(--cor-ink);
    font-size: 15.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s;
}
.cor-scope .cor-copy:hover,
.cor-scope .cor-copy:focus-visible { background: var(--cor-ink); color: var(--cor-dark); }
.cor-scope .cor-copy.is-copied,
.cor-scope [data-cor-copy].is-copied { background: var(--cor-gold); border-color: var(--cor-gold); color: var(--cor-dark); }

/* --- fasce --- */
.cor-how {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 14px;
    color: var(--cor-ink);
    font-size: 15.5px;
    font-weight: 600;
}
.cor-how::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--cor-line);
}
.cor-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.cor-slots--1 { grid-template-columns: minmax(0, 1fr); }
.cor-slots--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cor-slots--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cor-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 82px;
    padding: 14px 6px 10px;
    border: 1.5px solid var(--cor-line);
    border-radius: 12px;
    background: rgba(var(--cor-ink-rgb), .025);
    text-align: center;
    transition: opacity .3s, border-color .3s, background-color .3s;
}
.cor-slot__percent {
    color: var(--cor-ink);
    font-family: var(--cor-font-display);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}
.cor-slot__time {
    color: rgba(var(--cor-ink-rgb), .88);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.cor-slot__flag {
    position: absolute;
    top: -11px;
    left: 50%;
    display: none;
    padding: 3px 11px;
    border-radius: 999px;
    background: var(--cor-gold);
    color: var(--cor-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.3;
    white-space: nowrap;
    transform: translateX(-50%);
}
.cor-slot.is-now {
    border-color: var(--cor-gold);
    background: linear-gradient(180deg, rgba(var(--cor-accent-rgb), .62), rgba(var(--cor-accent-rgb), .32));
    box-shadow: 0 0 0 1px var(--cor-gold), 0 12px 28px -14px rgba(var(--cor-accent-rgb), .9);
}
.cor-slot.is-now .cor-slot__flag--now { display: block; }
.cor-slot.is-next { border-style: dashed; border-color: var(--cor-gold); }
.cor-slot.is-next .cor-slot__flag--next { display: block; background: transparent; color: var(--cor-gold); box-shadow: inset 0 0 0 1px var(--cor-gold); background-color: var(--cor-dark); }
.cor-slot.is-past { opacity: .45; }

.cor-scope .cor-closing {
    margin: 18px 0 14px;
    color: var(--cor-ink);
    font-size: 17px;
    font-weight: 500;
}

/* --- CTA --- */
.cor-scope .cor-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 58px;
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--cor-accent);
    box-shadow: inset 0 0 0 1px rgba(var(--cor-ink-rgb), .16), 0 16px 34px -16px var(--cor-accent);
    color: var(--cor-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    transition: filter .2s, transform .2s;
}
.cor-scope .cor-cta svg { width: 22px; height: 22px; stroke-width: 2.4; transition: transform .25s; }
.cor-scope .cor-cta:hover,
.cor-scope .cor-cta:focus-visible { color: var(--cor-ink); filter: brightness(1.08); transform: translateY(-1px); }
.cor-scope .cor-cta:hover svg { transform: translateX(4px); }
.cor-scope [data-cor-when="soon"] ~ .cor-cta { margin-top: 18px; }

/* --- piede --- */
.cor-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 14px;
    margin-top: 14px;
    color: var(--cor-muted);
    font-size: 12.5px;
}
.cor-foot__count { display: inline-flex; align-items: center; gap: 6px; }
.cor-foot__count .cor-ico { width: 15px; height: 15px; }
.cor-foot__count b { color: var(--cor-ink); font-variant-numeric: tabular-nums; }
.cor-scope .cor-foot__link {
    color: var(--cor-muted);
    font-size: 12.5px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cor-scope .cor-foot__link:hover { color: var(--cor-ink); }
.cor-cond {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(var(--cor-ink-rgb), .06);
    color: rgba(var(--cor-ink-rgb), .82);
    font-size: 12.5px;
    line-height: 1.5;
}
.cor-cond--light { background: rgba(var(--cor-ink-rgb), .07); }

/* --- animazioni --- */
.cor-root.is-open .cor-hero__percent { animation: cor-pop .8s .12s cubic-bezier(.2, .9, .25, 1.2) both; }
.cor-root.is-open .cor-slot.is-now { animation: cor-glow 2.6s 1s ease-in-out infinite; }
@keyframes cor-pop {
    0% { opacity: 0; transform: scale(.55); }
    60% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes cor-ping {
    0% { opacity: .9; transform: scale(.4); }
    80%, 100% { opacity: 0; transform: scale(1.5); }
}
@keyframes cor-glow {
    0%, 100% { box-shadow: 0 0 0 1px var(--cor-gold), 0 12px 28px -14px rgba(var(--cor-accent-rgb), .9); }
    50% { box-shadow: 0 0 0 1px var(--cor-gold), 0 0 26px -2px rgba(240, 215, 176, .45); }
}

/* ===================================================================== */
/* Linguetta di richiamo                                                  */
/* ===================================================================== */
.cor-teaser {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99980;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 6px 6px 6px;
    border-radius: 999px;
    background: var(--cor-dark);
    box-shadow: 0 0 0 2px var(--cor-gold), 0 18px 40px -16px rgba(0, 0, 0, .55);
    color: var(--cor-ink);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .35s ease, transform .5s cubic-bezier(.18, .89, .24, 1.1);
}
.cor-teaser--right { left: auto; right: 20px; }
.cor-teaser.is-visible { opacity: 1; transform: none; }
.cor-scope .cor-teaser__open {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 0 0;
    color: var(--cor-ink);
    text-align: left;
}
.cor-teaser__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--cor-accent);
}
.cor-teaser__ico .cor-ico { width: 20px; height: 20px; }
.cor-teaser__txt { display: flex; flex-direction: column; line-height: 1.05; }
.cor-teaser__txt strong {
    color: var(--cor-ink);
    font-family: var(--cor-font-display);
    font-size: 22px;
    font-weight: 800;
}
.cor-teaser__name { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.cor-teaser__count {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(var(--cor-ink-rgb), .08);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.cor-teaser__count:empty { display: none; }
.cor-scope .cor-teaser__x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: rgba(var(--cor-ink-rgb), .65);
}
.cor-scope .cor-teaser__x svg { width: 15px; height: 15px; }
.cor-scope .cor-teaser__x:hover { color: var(--cor-ink); background: rgba(var(--cor-ink-rgb), .1); }
.cor-teaser.is-visible .cor-teaser__ico { animation: cor-wiggle 4s 1.5s ease-in-out infinite; }
@keyframes cor-wiggle {
    0%, 86%, 100% { transform: rotate(0); }
    89% { transform: rotate(-14deg); }
    92% { transform: rotate(12deg); }
    95% { transform: rotate(-8deg); }
}

/* ===================================================================== */
/* Box scheda prodotto                                                    */
/* ===================================================================== */
.cor-pbox {
    position: relative;
    margin: 16px 0;
    padding: 18px 20px 14px;
    border-radius: 14px;
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(var(--cor-ink-rgb), .06), transparent 55%),
        var(--cor-dark);
    box-shadow: 0 0 0 2px var(--cor-gold), 0 20px 40px -26px rgba(0, 0, 0, .7);
    color: var(--cor-ink);
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
}
.cor-pbox__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--cor-ink);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.cor-pbox__head .cor-ico { width: 22px; height: 22px; color: var(--cor-gold); }
.cor-pbox__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--cor-accent);
    font-size: 10.5px;
    letter-spacing: .12em;
}
.cor-pbox__live i { width: 6px; height: 6px; border-radius: 50%; background: var(--cor-ink); animation: cor-blink 1.4s ease-in-out infinite; }
.cor-pbox__live.is-soon { background: transparent; box-shadow: inset 0 0 0 1px var(--cor-gold); color: var(--cor-gold); }
@keyframes cor-blink { 50% { opacity: .25; } }
.cor-pbox__main {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 12px 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--cor-line);
}
.cor-pbox__percent {
    color: var(--cor-ink);
    font-family: var(--cor-font-display);
    font-size: 70px;
    font-weight: 800;
    line-height: .85;
    letter-spacing: -.03em;
    white-space: nowrap;
}
.cor-pbox__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cor-pbox__time { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cor-pbox__info > span { color: rgba(var(--cor-ink-rgb), .85); font-size: 15px; }
.cor-pbox__code { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.cor-pbox__codebox {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 50px;
    padding: 4px 16px;
    border: 1.5px dashed rgba(var(--cor-ink-rgb), .7);
    border-radius: 10px;
    font-size: 15px;
}
.cor-pbox__codebox span { color: rgba(var(--cor-ink-rgb), .85); }
.cor-pbox__codebox strong {
    font-family: var(--cor-font-display);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .12em;
}
.cor-scope .cor-pbox__copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 18px;
    border: 1.5px solid rgba(var(--cor-ink-rgb), .85);
    border-radius: 10px;
    color: var(--cor-ink);
    font-size: 16px;
    font-weight: 600;
    transition: background-color .2s, color .2s;
}
.cor-scope .cor-pbox__copy:hover { background: var(--cor-ink); color: var(--cor-dark); }
.cor-pbox__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 12px;
    color: rgba(var(--cor-ink-rgb), .78);
    font-size: 13px;
}
.cor-scope .cor-pbox__foot a,
.cor-scope .cor-pbox__foot button {
    color: var(--cor-ink);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cor-pbox__count {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(var(--cor-ink-rgb), .1);
    color: rgba(var(--cor-ink-rgb), .7);
    font-size: 12.5px;
}
.cor-pbox__count b { color: var(--cor-gold); font-variant-numeric: tabular-nums; }

/* ===================================================================== */
/* Banda listing                                                          */
/* ===================================================================== */
.cor-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0 0 18px;
    color: var(--cor-dark);
    font-size: 15px;
    line-height: 1.3;
}
.cor-strip__pill {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--cor-accent);
    box-shadow: 0 10px 24px -14px var(--cor-accent);
    color: var(--cor-ink);
    font-weight: 600;
    letter-spacing: .01em;
}
.cor-strip__pill strong { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cor-strip__pill .cor-ico { width: 20px; height: 20px; }
.cor-strip__sep { opacity: .7; }
.cor-scope .cor-strip__code {
    padding: 1px 8px;
    border: 1px dashed rgba(var(--cor-ink-rgb), .85);
    border-radius: 6px;
    color: var(--cor-ink);
    font-weight: 800;
    letter-spacing: .08em;
}
.cor-scope .cor-strip__code:hover { background: rgba(var(--cor-ink-rgb), .15); }
.cor-strip__count { color: #4a4f5c; font-size: 13.5px; }
.cor-strip__count b { color: var(--cor-dark); font-variant-numeric: tabular-nums; }
.cor-scope .cor-strip__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(var(--cor-accent-rgb), .08);
    color: var(--cor-accent);
    font-weight: 600;
    transition: background-color .2s;
}
.cor-scope .cor-strip__link svg { width: 18px; height: 18px; }
.cor-scope .cor-strip__link:hover { color: var(--cor-accent); background: rgba(var(--cor-accent-rgb), .14); }

/* ===================================================================== */
/* Promemoria carrello                                                    */
/* ===================================================================== */
.cor-cbox {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--cor-dark);
    box-shadow: 0 0 0 2px var(--cor-gold);
    color: var(--cor-ink);
}
.cor-cbox__badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: var(--cor-accent);
    font-family: var(--cor-font-display);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}
.cor-cbox__badge .cor-ico { width: 16px; height: 16px; margin-bottom: 3px; }
.cor-cbox__body { flex: 1; min-width: 0; }
.cor-cbox__title { display: block; margin-bottom: 2px; font-size: 13px; letter-spacing: .16em; }
.cor-cbox__body p { margin: 0; color: rgba(var(--cor-ink-rgb), .88); font-size: 14.5px; }
.cor-scope .cor-cbox__copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px dashed rgba(var(--cor-ink-rgb), .8);
    border-radius: 10px;
    color: var(--cor-ink);
    font-family: var(--cor-font-display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .1em;
    white-space: nowrap;
}
.cor-scope .cor-cbox__copy:hover { background: rgba(var(--cor-ink-rgb), .1); }

/* ===================================================================== */
/* Pagina prodotti selezionati                                            */
/* ===================================================================== */
.cor-hero-page {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 36px;
    margin: 0 0 32px;
    padding: 34px 36px;
    border-radius: var(--cor-radius);
    background:
        radial-gradient(60% 90% at 100% 0%, rgba(var(--cor-accent-rgb), .28), transparent 60%),
        var(--cor-dark);
    box-shadow: 0 0 0 3px var(--cor-gold);
    color: var(--cor-ink);
    overflow: hidden;
}
.cor-scope .cor-hero-page__title { margin-top: 16px; font-size: 52px; }
.cor-hero-page__side { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.cor-hero-page .cor-hero { margin: 0; }
.cor-hero-page .cor-hero__percent { font-size: 110px; }
.cor-products { margin-bottom: 30px; }
.cor-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
    font-weight: 600;
}
.cor-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--cor-dark, #1b202c);
    color: var(--cor-ink) !important;
}

/* ===================================================================== */
/* Responsive                                                             */
/* ===================================================================== */
@media (max-width: 991px) {
    .cor-hero-page { grid-template-columns: minmax(0, 1fr); padding: 26px 22px; gap: 22px; }
    .cor-scope .cor-hero-page__title { font-size: 40px; }
}

@media (max-width: 767px) {
    .cor-root { align-items: flex-end; justify-content: center; padding: 0; }
    .cor-backdrop { pointer-events: none; }
    .cor-root.is-open .cor-backdrop { opacity: 1; pointer-events: auto; }
    .cor-popup,
    .cor-root--left .cor-popup,
    .cor-root--center .cor-popup {
        width: 100%;
        max-height: 90vh;
        padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -2px 0 2px var(--cor-gold), 0 -20px 60px -20px rgba(0, 0, 0, .6);
        transform: translateY(100%);
    }
    .cor-root.is-open .cor-popup { transform: none; }
    .cor-scope .cor-close { top: 12px; right: 12px; width: 36px; height: 36px; }
    .cor-badge { font-size: 11.5px; padding: 7px 12px 7px 8px; }
    .cor-scope .cor-title { margin-top: 14px; font-size: 34px; }
    .cor-hero__percent { font-size: 96px; }
    .cor-hero--soon .cor-hero__percent { font-size: 72px; }
    .cor-hero__now { margin-bottom: 10px; font-size: 20px; }
    .cor-scope .cor-desc { font-size: 15px; }
    .cor-code { min-height: 54px; font-size: 28px; }
    .cor-scope .cor-copy { min-height: 54px; padding: 0 14px; font-size: 14px; }
    .cor-how { margin: 18px 0 12px; font-size: 14px; }
    .cor-slots--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
    .cor-slot { min-height: 70px; padding: 12px 4px 8px; }
    .cor-slot__percent { font-size: 25px; }
    .cor-slot__time { font-size: 12.5px; }
    .cor-scope .cor-closing { margin: 14px 0 12px; font-size: 15.5px; }
    .cor-scope .cor-cta { min-height: 52px; font-size: 16.5px; }
    .cor-teaser { left: 12px; bottom: 12px; }
    .cor-teaser--right { left: auto; right: 12px; }
    .cor-pbox__percent { font-size: 56px; }
    .cor-pbox__time { font-size: 18px; }
    .cor-scope .cor-strip__link { margin-left: 0; }
    .cor-cbox { flex-wrap: wrap; }
    .cor-cbox__badge { width: 60px; height: 60px; font-size: 20px; }
    .cor-hero-page .cor-hero__percent { font-size: 84px; }
}

@media (max-width: 380px) {
    .cor-code-row,
    .cor-pbox__code { grid-template-columns: minmax(0, 1fr); }
    .cor-scope .cor-title { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .cor-popup,
    .cor-teaser,
    .cor-backdrop { transition: none !important; }
    .cor-root.is-open .cor-hero__percent,
    .cor-root.is-open .cor-slot.is-now,
    .cor-badge__dot::after,
    .cor-teaser.is-visible .cor-teaser__ico,
    .cor-pbox__live i { animation: none !important; }
}

/* ===================================================================== */
/* Pagina /happy-hours: marchi e card prodotto (su fondo chiaro del tema) */
/* ===================================================================== */
.cor-scope .cor-section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    color: #1d1e22;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.01em;
    text-transform: none;
}
.cor-section-title::after { content: ""; flex: 1; height: 1px; background: #e6e2dc; }
.cor-section-title small {
    order: 2;
    padding: 2px 10px;
    border-radius: 999px;
    background: #f1efeb;
    color: #5d616c;
    font-size: 13px;
    font-weight: 700;
}
.cor-brands { margin: 0 0 34px; }
.cor-brands__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}
.cor-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 14px 14px;
    border: 1px solid #ebe7e1;
    border-radius: 12px;
    background: #fff;
    color: #1d1e22;
    text-align: center;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cor-brand:hover,
.cor-brand:focus-visible {
    border-color: var(--cor-accent);
    box-shadow: 0 16px 34px -24px rgba(0, 0, 0, .55);
    color: #1d1e22;
    text-decoration: none;
    transform: translateY(-2px);
}
.cor-brand__logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 70px; }
.cor-brand__logo img { width: auto; height: auto; max-width: 140px; max-height: 64px; object-fit: contain; mix-blend-mode: multiply; }
.cor-brand__logo b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.cor-brand__name { font-size: 14px; font-weight: 700; }
.cor-brand__count { color: var(--cor-accent); font-size: 13px; font-weight: 600; }

.cor-pcards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}
.cor-pcard {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 14px 16px;
    border: 1px solid #ebe7e1;
    border-radius: 12px;
    background: #fff;
    color: #1d1e22;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}
.cor-pcard:hover,
.cor-pcard:focus-visible { color: #1d1e22; text-decoration: none; transform: translateY(-3px); box-shadow: 0 20px 40px -26px rgba(0, 0, 0, .5); }
.cor-pcard__flag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--cor-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}
.cor-pcard__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; margin-bottom: 6px; overflow: hidden; }
.cor-pcard__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s; }
.cor-pcard:hover .cor-pcard__img img { transform: scale(1.04); }
.cor-pcard__brand { color: #6b7080; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cor-pcard__name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.cor-pcard__price { margin-top: auto; padding-top: 4px; font-size: 19px; font-weight: 800; }
.cor-pcard__price s { margin-right: 6px; color: #8a8f9c; font-size: 14px; font-weight: 400; }
.cor-pcard__cta { color: var(--cor-accent); font-size: 14px; font-weight: 600; }
@media (max-width: 575px) {
    .cor-brands__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cor-pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cor-pcard { padding: 10px; }
    .cor-pcard__name { font-size: 14px; }
    .cor-pcard__price { font-size: 16px; }
}

/* Anteprima statica nel back office */
.cor-root.cor-root--inline {
    position: relative;
    z-index: auto;
    display: flex;
    justify-content: center;
    padding: 6px;
}
.cor-root--inline .cor-backdrop { display: none; }
.cor-root--inline .cor-popup { max-height: none; opacity: 1; transform: none; width: 100%; }
