/* Offers module - /offers and /offers/{id}-{title}.
   Class names deliberately avoid the suffixes -card, -box, -result, -output and -summary, because a
   catch-all rule in style.css adds padding to those on phones. */

/* ---- category chips ---------------------------------------------------------- */
.of-filters { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 2px 0 12px; margin: 0 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.of-filters::-webkit-scrollbar { display: none; }
.of-chip { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1.5px solid #DCE3EB; background: #fff; color: #334155; font-size: .84rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.of-chip small { color: #8A96A6; font-weight: 600; margin-left: 2px; }
.of-chip.on { background: #0F1B2D; border-color: #0F1B2D; color: #fff; }
.of-chip.on small { color: #B9C6D6; }

/* ---- offer tiles (list page) ------------------------------------------------- */
.of-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-top: 8px; }
.of-item { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line, #E3E8EF); border-radius: 20px; overflow: hidden;
    box-shadow: 0 1px 6px rgba(15, 27, 45, .06); transition: transform .18s ease, box-shadow .18s ease; content-visibility: auto; contain-intrinsic-size: auto 340px; }
.of-item:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -12px rgba(15, 27, 45, .28); }
.of-stretch { position: absolute; inset: 0; z-index: 3; border-radius: 20px; }
.of-stretch:focus-visible { outline: 3px solid #2DD4A7; outline-offset: -3px; }

.of-media { position: relative; }
.of-img { width: 100%; height: 150px; object-fit: cover; display: block; background: #F1F5F9; }
.of-badge { position: absolute; left: 12px; bottom: 12px; background: #fff; color: #9A5A00; border-radius: 999px; padding: 5px 13px; font-size: .82rem; font-weight: 800; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.of-banner { position: relative; height: 132px; display: flex; align-items: center; justify-content: center; padding: 0 18px; overflow: hidden; color: #fff; text-align: center; }
.of-banner::before { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; right: -60px; top: -80px; background: rgba(255, 255, 255, .13); }
.of-banner::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; left: -40px; bottom: -60px; background: rgba(255, 255, 255, .10); }
.of-big { position: relative; z-index: 1; font-size: clamp(1.35rem, 5vw, 1.75rem); font-weight: 900; line-height: 1.15; letter-spacing: -.01em; text-shadow: 0 2px 10px rgba(0, 0, 0, .18);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.of-mark { position: absolute; z-index: 1; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; }
.of-ribbon { position: absolute; z-index: 2; right: 12px; top: 12px; background: #FDE68A; color: #7C3F00; border-radius: 999px; padding: 4px 11px; font-size: .74rem; font-weight: 800; box-shadow: 0 3px 10px rgba(0, 0, 0, .16); }
.of-ribbon.inline { position: static; box-shadow: none; }

/* six colour families, picked from the offer number so neighbours look different */
.of-item.v0 .of-banner, .of-hero.v0 { background: linear-gradient(135deg, #14B8A6, #0F766E); }
.of-item.v1 .of-banner, .of-hero.v1 { background: linear-gradient(135deg, #F59E0B, #C2410C); }
.of-item.v2 .of-banner, .of-hero.v2 { background: linear-gradient(135deg, #6366F1, #4338CA); }
.of-item.v3 .of-banner, .of-hero.v3 { background: linear-gradient(135deg, #EC4899, #BE185D); }
.of-item.v4 .of-banner, .of-hero.v4 { background: linear-gradient(135deg, #0EA5E9, #0369A1); }
.of-item.v5 .of-banner, .of-hero.v5 { background: linear-gradient(135deg, #22C55E, #15803D); }

.of-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.of-adv { margin: 0; color: #1B7F72; font-size: .82rem; font-weight: 800; letter-spacing: .01em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.of-title { font-size: 1.05rem; line-height: 1.3; margin: 0; color: #0F1B2D; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.of-desc { margin: 0; color: #475569; font-size: .87rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.of-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.of-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: #E2F4F0; color: #0F6B5C; font-size: .74rem; font-weight: 700; }
.of-tag.plain { background: #F1F5F9; color: #64748B; }
.of-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid #EEF2F7; }
.of-when { color: #64748B; font-size: .8rem; }
.of-when.soon { color: #B45309; font-weight: 800; }
.of-when.big { font-size: .95rem; margin: 0 0 12px; }
.of-view { display: inline-flex; align-items: center; gap: 6px; background: #0F1B2D; color: #fff; border-radius: 999px; padding: 7px 14px; font-size: .8rem; font-weight: 700; white-space: nowrap; transition: background .15s ease; }
.of-item:hover .of-view { background: #0F8F6B; }

/* ---- details page ------------------------------------------------------------ */
.of-wrap { max-width: 860px; }
.of-preview { background: #FFF8EC; border: 1px solid #F5DDB0; color: #6B4A00; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: .88rem; }
.of-page { background: #fff; border: 1px solid var(--line, #E3E8EF); border-radius: 22px; overflow: hidden; box-shadow: 0 8px 30px -14px rgba(15, 27, 45, .22); }
.of-hero { position: relative; min-height: 130px; display: flex; align-items: flex-end; }
.of-hero-img { width: 100%; height: 260px; object-fit: cover; display: block; }
.of-hero-over { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 16px 20px; background: linear-gradient(to top, rgba(15, 27, 45, .45), rgba(15, 27, 45, 0) 60%); }
.of-hero-tag { background: #fff; color: #9A5A00; border-radius: 999px; padding: 7px 18px; font-size: 1.1rem; font-weight: 900; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.of-page-body { padding: 20px 22px 22px; }
.of-page-title { font-size: clamp(1.4rem, 5vw, 1.9rem); line-height: 1.2; margin: 6px 0 8px; color: #0F1B2D; }
.of-page-desc { margin: 0 0 16px; color: #334155; line-height: 1.65; font-size: 1rem; }

.of-panel { background: #F6FAF9; border: 1.5px solid #CFE8E3; border-radius: 18px; padding: 16px; margin-top: 6px; }
.of-panel h2 { font-size: 1.05rem; margin: 0 0 12px; color: #0F1B2D; }
.of-codeline { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1.5px dashed #2A9D8F; background: #fff; border-radius: 14px; padding: 10px 14px; }
.of-codeline small { display: block; color: #64748B; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.of-codeline code { font-size: 1.25rem; font-weight: 900; letter-spacing: .08em; color: #0F1B2D; word-break: break-all; }
.of-copy { border: 0; background: #0F8F6B; color: #fff; border-radius: 999px; padding: 10px 18px; font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.of-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, #2DD4A7, #0F8F6B); color: #fff !important; font-weight: 800; font-size: 1rem; text-decoration: none; box-shadow: 0 10px 22px -10px rgba(15, 143, 107, .7); }
.of-btn:active { transform: scale(.985); }
.of-plain { margin: 0; color: #334155; line-height: 1.55; }
.of-steps { margin: 14px 0 0; padding-left: 20px; color: #475569; font-size: .9rem; line-height: 1.7; }
.of-terms-full { margin-top: 18px; padding-top: 16px; border-top: 1px solid #EEF2F7; }
.of-terms-full h2 { font-size: 1rem; margin: 0 0 6px; }
.of-terms-full p { margin: 0; color: #64748B; font-size: .88rem; line-height: 1.65; }
.of-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #EEF2F7; }
.of-share span { color: #64748B; font-size: .85rem; font-weight: 700; margin-right: 4px; }
.of-share-btn { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid #DCE3EB; background: #fff; color: #334155; border-radius: 999px; padding: 8px 15px; font: inherit; font-size: .83rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.of-share-btn.wa { background: #25D366; border-color: #25D366; color: #052E16; }
.of-related-title { font-size: 1.15rem; margin: 30px 0 4px; }

/* ---- shared ------------------------------------------------------------------ */
.of-empty { text-align: center; padding: 40px 16px; border: 1px dashed #CBD5E1; border-radius: 18px; background: #fff; margin-top: 10px; }
.of-empty h1, .of-empty h2 { margin: 0 0 6px; font-size: 1.25rem; }
.of-empty p { margin: 0 auto 14px; max-width: 460px; color: #64748B; }
.of-note { margin: 22px 0 0; color: #8A96A6; font-size: .78rem; text-align: center; }
.of-note.left { text-align: left; margin-top: 14px; }

@media (max-width: 640px) {
    .of-grid { grid-template-columns: 1fr; gap: 14px; }
    .of-banner { height: 118px; }
    .of-page-body { padding: 16px 16px 18px; }
    .of-hero-img { height: 200px; }
    .of-codeline code { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { .of-item { transition: none; } .of-item:hover { transform: none; } }
