/* css/preturi.css - Vânătorul de Mocăieli. Dark by design (slate-900), emerald = real discount,
   amber = warning, cyan = active/interactive. Pattern-matched to emoji.css / editor.css. */

:root {
    --pr-bg: #0f172a;
    --pr-panel: #1e293b;
    --pr-panel-2: #253147;
    --pr-border: #334155;
    --pr-text: #e2e8f0;
    --pr-muted: #94a3b8;
    --pr-emerald: #10b981;
    --pr-emerald-soft: rgba(16, 185, 129, .14);
    --pr-amber: #f59e0b;
    --pr-amber-soft: rgba(245, 158, 11, .14);
    --pr-cyan: #22d3ee;
    --pr-cyan-soft: rgba(34, 211, 238, .14);
    --pr-red: #f43f5e;
    --pr-red-soft: rgba(244, 63, 94, .16);
}

/* clip, not hidden: the site-wide `body { overflow-x: hidden }` makes <body> a scroll container
   that never scrolls and kills position: sticky (the ticker below is sticky). */
.pr-body, body.pr-body#page-top, body.pr-body.dark-theme {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--pr-bg); color: var(--pr-text); min-height: 100vh; overflow-x: clip;
}
.pr-body #mainNav { background: rgba(15, 23, 42, .92); }

.pr-main { flex: 1; padding-top: 96px; padding-bottom: 64px; }
.pr-muted { color: var(--pr-muted); margin: 0; font-size: .85rem; }
.pr-hint { margin: 12px 0 0; color: var(--pr-muted); font-size: .78rem; line-height: 1.5; }

/* ── header ─────────────────────────────────────────────────────────────────────────── */
.pr-header { padding: 18px 0 8px; }
.pr-title-row { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.pr-logo {
    flex: 0 0 auto; width: 56px; height: 56px; display: grid; place-items: center;
    font-size: 1.9rem; line-height: 1; border-radius: 14px;
    border: 1px solid var(--pr-cyan); background: var(--pr-cyan-soft);
    box-shadow: 0 0 24px rgba(34, 211, 238, .25);
}
.pr-header h1 { margin: 2px 0 6px; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.pr-lead { margin: 0; max-width: 720px; color: var(--pr-muted); font-size: .95rem; line-height: 1.55; }

.pr-toolbar { display: grid; gap: 12px; }
.pr-search {
    display: flex; align-items: center; gap: 10px; padding: 0 14px;
    border: 1px solid var(--pr-border); border-radius: 12px; background: var(--pr-panel);
    transition: border-color .16s, box-shadow .16s;
}
.pr-search:focus-within { border-color: var(--pr-cyan); box-shadow: 0 0 0 3px var(--pr-cyan-soft); }
.pr-search > svg, .pr-search > i { color: var(--pr-muted); }
.pr-search input {
    flex: 1; min-width: 0; padding: 12px 0; border: 0; background: transparent;
    color: var(--pr-text); font-size: 1rem; outline: none;
}
.pr-search input::placeholder { color: #64748b; }
.pr-search input::-webkit-search-cancel-button { filter: invert(1); }

.pr-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border: 1px solid var(--pr-border); border-radius: 999px;
    background: var(--pr-panel); color: var(--pr-text); font-size: .84rem; font-weight: 700;
    cursor: pointer; transition: border-color .16s, background .16s, color .16s, transform .16s;
}
.pr-chip:hover { border-color: var(--pr-cyan); transform: translateY(-1px); }
.pr-chip.is-active { border-color: var(--pr-cyan); background: var(--pr-cyan-soft); color: var(--pr-cyan); }
.pr-chip-live.is-active { border-color: var(--pr-red); background: var(--pr-red-soft); color: #fda4af; }
.pr-live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--pr-red);
    box-shadow: 0 0 0 0 rgba(244, 63, 94, .6); animation: pr-pulse 1.6s infinite;
}
@keyframes pr-pulse {
    0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, .6); }
    70% { box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

/* ── sections ───────────────────────────────────────────────────────────────────────── */
.pr-section { padding: 22px 0 8px; }
.pr-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 18px; margin-bottom: 12px; }
.pr-section-head h2 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 800; color: #fff; }
.pr-check { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .82rem; font-weight: 650; color: var(--pr-muted); cursor: pointer; }
.pr-check input { accent-color: var(--pr-cyan); width: 16px; height: 16px; }

/* ── timeline ───────────────────────────────────────────────────────────────────────── */
.pr-timeline {
    display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 14px;
    scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--pr-border) transparent;
    position: relative;
}
.pr-timeline:focus-visible { outline: 2px solid var(--pr-cyan); outline-offset: 4px; border-radius: 8px; }
.pr-event {
    flex: 0 0 264px; scroll-snap-align: start; position: relative;
    display: flex; flex-direction: column; gap: 8px;
    padding: 14px 14px 12px; border: 1px solid var(--pr-border); border-radius: 14px;
    background: var(--pr-panel); transition: transform .16s, border-color .16s, box-shadow .16s;
}
.pr-event:hover { transform: translateY(-3px); border-color: var(--pr-cyan); box-shadow: 0 10px 30px rgba(34, 211, 238, .12); }
.pr-event.is-active { border-color: var(--pr-cyan); box-shadow: 0 0 0 1px var(--pr-cyan), 0 10px 30px rgba(34, 211, 238, .18); }
.pr-event.is-next { border-color: rgba(34, 211, 238, .55); }
.pr-event.is-past { opacity: .55; }
.pr-event[hidden] { display: none; }
.pr-event-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pr-status {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    padding: 4px 9px; border-radius: 999px; background: var(--pr-panel-2); color: var(--pr-muted);
}
.pr-status-activ { background: var(--pr-cyan-soft); color: var(--pr-cyan); }
.pr-status-urmeaza { background: var(--pr-emerald-soft); color: #6ee7b7; }
.pr-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pr-status-activ .pr-status-dot { animation: pr-pulse-cyan 1.4s infinite; }
@keyframes pr-pulse-cyan {
    0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .7); }
    70% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}
.pr-event h3 { margin: 0; font-size: 1rem; font-weight: 800; color: #fff; line-height: 1.3; }
.pr-event-store { color: var(--pr-cyan); font-size: .8rem; font-weight: 700; }
.pr-event-when { color: var(--pr-text); font-size: .84rem; font-variant-numeric: tabular-nums; }
.pr-event-note { color: var(--pr-muted); font-size: .76rem; line-height: 1.45; margin: 0; flex: 1; }
.pr-event-cats { display: flex; flex-wrap: wrap; gap: 4px; }
.pr-pill {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: .68rem; font-weight: 700; background: var(--pr-panel-2); color: var(--pr-muted);
}
.pr-pill-est { background: var(--pr-amber-soft); color: #fcd34d; }
.pr-event-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.pr-alert-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border: 1px solid var(--pr-cyan); border-radius: 9px;
    background: transparent; color: var(--pr-cyan); font-size: .78rem; font-weight: 800; cursor: pointer;
    transition: background .16s, color .16s;
}
.pr-alert-btn:hover { background: var(--pr-cyan); color: #0f172a; }
.pr-alert-btn.is-set { border-color: var(--pr-emerald); color: #6ee7b7; }
.pr-alert-btn.is-set:hover { background: var(--pr-emerald); color: #052e16; }
.pr-event-actions .pr-event-src { flex: 0 0 auto; }
.pr-event-src { color: var(--pr-muted); font-size: .72rem; text-decoration: none; }
.pr-event-src:hover { color: var(--pr-cyan); }

/* ── ticker ─────────────────────────────────────────────────────────────────────────── */
.pr-ticker {
    position: sticky; top: 64px; z-index: 6;
    display: flex; align-items: stretch; margin: 10px 0 6px;
    border-top: 1px solid rgba(244, 63, 94, .45); border-bottom: 1px solid rgba(244, 63, 94, .45);
    background: linear-gradient(90deg, rgba(244, 63, 94, .18), rgba(15, 23, 42, .96) 30%, rgba(15, 23, 42, .96));
    backdrop-filter: blur(6px);
}
.pr-ticker[hidden] { display: none; }
.pr-ticker-label {
    flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; font-size: .78rem; font-weight: 900; letter-spacing: .08em;
    color: #fecdd3; background: rgba(244, 63, 94, .22); border-right: 1px solid rgba(244, 63, 94, .45);
}
.pr-ticker-flash { animation: pr-flash 1s steps(2, end) infinite; }
@keyframes pr-flash { to { opacity: .25; } }
.pr-ticker-viewport { flex: 1; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.pr-ticker-track { display: flex; gap: 36px; padding-left: 100%; white-space: nowrap; animation: pr-scroll 45s linear infinite; will-change: transform; }
.pr-ticker:hover .pr-ticker-track { animation-play-state: paused; }
@keyframes pr-scroll { to { transform: translateX(-100%); } }
.pr-ticker-item { display: inline-flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--pr-text); text-decoration: none; }
.pr-ticker-item:hover { color: #fff; }
.pr-ticker-item .pr-ticker-store { color: var(--pr-cyan); font-weight: 800; }
.pr-ticker-item .pr-ticker-price { color: var(--pr-emerald); font-weight: 900; }
.pr-ticker-item .pr-ticker-old { color: var(--pr-muted); text-decoration: line-through; font-size: .78rem; }
.pr-ticker-item .pr-badge-off { font-size: .72rem; padding: 2px 7px; }

/* ── product grid ───────────────────────────────────────────────────────────────────── */
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pr-card {
    position: relative; display: flex; flex-direction: column; gap: 8px;
    padding: 14px; border: 1px solid var(--pr-border); border-radius: 14px; background: var(--pr-panel);
    transition: transform .16s, border-color .16s, box-shadow .16s;
}
.pr-card:hover { transform: translateY(-3px); border-color: var(--pr-cyan); box-shadow: 0 12px 34px rgba(34, 211, 238, .12); }
.pr-card[hidden] { display: none; }
.pr-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pr-store {
    display: inline-block; padding: 3px 9px; border-radius: 6px;
    font-size: .72rem; font-weight: 800; letter-spacing: .02em;
    background: var(--pr-panel-2); color: var(--pr-text); border: 1px solid var(--pr-border);
}
.pr-badge-off {
    display: inline-block; padding: 4px 9px; border-radius: 8px;
    font-size: .82rem; font-weight: 900; background: var(--pr-emerald); color: #052e16;
}
.pr-badge-off.is-error { background: var(--pr-red); color: #fff; }
.pr-thumb {
    display: grid; place-items: center; height: 120px; border-radius: 10px;
    background: linear-gradient(135deg, var(--pr-panel-2), #17223a);
    border: 1px dashed var(--pr-border); color: #64748b; font-size: 2.2rem; font-weight: 900;
}
.pr-card h3 { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.35; color: #fff; min-height: 2.6em; }
.pr-prices { display: flex; align-items: baseline; gap: 10px; }
.pr-price { font-size: 1.4rem; font-weight: 900; color: var(--pr-emerald); font-variant-numeric: tabular-nums; }
.pr-price-old { color: var(--pr-muted); text-decoration: line-through; font-size: .86rem; font-variant-numeric: tabular-nums; }
.pr-history {
    display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
    padding: 5px 9px; border-radius: 8px; font-size: .74rem; font-weight: 700;
    background: var(--pr-panel-2); color: var(--pr-muted);
}
.pr-history-minim90 { background: var(--pr-emerald-soft); color: #6ee7b7; }
.pr-history-crescut { background: var(--pr-amber-soft); color: #fcd34d; }
.pr-flags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.pr-pill-stock { background: var(--pr-red-soft); color: #fda4af; }
.pr-pill-err { background: var(--pr-red); color: #fff; }
.pr-go {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto;
    padding: 10px 12px; border-radius: 10px; border: 1px solid var(--pr-cyan);
    background: var(--pr-cyan-soft); color: var(--pr-cyan); font-weight: 800; font-size: .88rem;
    text-decoration: none; transition: background .16s, color .16s;
}
.pr-go:hover { background: var(--pr-cyan); color: #0f172a; }
.pr-demo-note { margin: 0; color: var(--pr-amber); font-size: .78rem; font-weight: 600; }
.pr-empty { margin: 30px 0; text-align: center; color: var(--pr-muted); }
.pr-empty[hidden] { display: none; }

.pr-powered { margin: 36px 0 0; text-align: center; color: var(--pr-muted); font-size: .78rem; font-weight: 600; }
.pr-powered a { color: var(--pr-cyan); text-decoration: none; font-weight: 800; }
.pr-powered a:hover { text-decoration: underline; }

/* ── toast ──────────────────────────────────────────────────────────────────────────── */
.pr-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 1060;
    padding: 10px 16px; border-radius: 999px; border: 1px solid var(--pr-cyan);
    background: #0b1224; color: #fff; font-size: .9rem; font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5); pointer-events: none;
}
.pr-toast[hidden] { display: none; }

/* ── footer on dark ─────────────────────────────────────────────────────────────────── */
.pr-body .footer { background: #0b1224; }

@media (prefers-reduced-motion: reduce) {
    .pr-ticker-track { animation: none; padding-left: 0; flex-wrap: wrap; white-space: normal; gap: 12px 24px; padding: 8px 12px; }
    .pr-live-dot, .pr-status-dot, .pr-ticker-flash { animation: none; }
    .pr-card, .pr-event, .pr-chip { transition: none; }
}

@media (max-width: 720px) {
    .pr-main { padding-top: 84px; }
    .pr-header h1 { font-size: 1.55rem; }
    .pr-logo { width: 46px; height: 46px; font-size: 1.5rem; }
    .pr-chip { padding: 7px 11px; font-size: .78rem; }
    .pr-event { flex-basis: 236px; }
    .pr-ticker { top: 56px; }
    .pr-ticker-label { padding: 8px 10px; font-size: .7rem; }
    .pr-ticker-item { font-size: .8rem; }
    .pr-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .pr-thumb { height: 90px; font-size: 1.6rem; }
    .pr-price { font-size: 1.2rem; }
}
