/*
 * Акции и новинки (docs/PLAN.md, раздел 23): карточка поста, карусель на странице заведения, список и страница акции.
 * Принципы: текст никогда не лежит на картинке (афиши заведений сами полны текста — поверх них ничего не читается);
 * афиша видна целиком (contain на размытом фоне той же картинки), а не обрезана; цвет значка от заведения —
 * только тон пилюли, текст на нём всегда читаемый. Тёмная тема — css/theme-dark.css.
 */
:root {
  --pc-ink: #1e1b17; --pc-muted: #6a6359; --pc-line: #e8e4dc; --pc-soft: #f5f4f0;
  --pc-green: #2e7d46; --pc-green-dark: #1f5e33; --pc-wash: #e9f4ec; --pc-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ── Карточка ── */
.pc { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 20px; background: #fff; color: var(--pc-ink) !important; text-decoration: none !important; box-shadow: 0 0 0 1px var(--pc-line) inset, 0 6px 18px rgba(30,27,23,.05); transition: transform .2s var(--pc-ease), box-shadow .2s var(--pc-ease); font-family: var(--brand-font, inherit); }
.pc:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--pc-line) inset, 0 16px 34px rgba(30,27,23,.1); }
.pc:focus-visible { outline: 3px solid var(--pc-green); outline-offset: 3px; }
.pc-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--pc-soft); }
.pc-media .pc-bg { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(18px) saturate(1.15); opacity: .55; transform: scale(1.05); }
.pc-media .pc-img { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
.pc-media--empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--pc-wash), #f7f6f1); font-size: 2.6rem; }
.pc-kind { position: absolute; z-index: 1; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.95); color: var(--pc-ink); font-size: .72rem; font-weight: 800; box-shadow: 0 2px 8px rgba(30,27,23,.14); }
.pc-kind i { width: 7px; height: 7px; border-radius: 50%; background: #e2611b; }
.pc-kind.is-news i { background: #2f6fd1; }
.pc-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 12px 14px 14px; }
.pc-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-badge { --badge: #2e7d46; display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; background: color-mix(in srgb, var(--badge) 16%, #fff); color: color-mix(in srgb, var(--badge) 45%, #1e1b17); font-size: .74rem; font-weight: 800; letter-spacing: .01em; box-shadow: 0 0 0 1px color-mix(in srgb, var(--badge) 30%, transparent) inset; }
.pc-app { padding: 3px 9px; border-radius: 8px; background: #eef2fb; color: #2b4a7a; font-size: .72rem; font-weight: 750; }
.pc-title { margin: 0; font-size: 1rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; color: var(--pc-ink) !important; font-family: var(--brand-font, inherit) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-sub { margin: 0; color: var(--pc-muted); font-size: .84rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.pc-timer { display: inline-flex; align-items: center; gap: 5px; color: #9a3412; font-size: .78rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.pc-timer:empty { display: none; }
.pc-timer svg { width: 14px; height: 14px; }
.pc-more { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--pc-green-dark); font-size: .84rem; font-weight: 800; }
.pc-more svg { width: 16px; height: 16px; transition: transform .2s var(--pc-ease); }
.pc:hover .pc-more svg { transform: translateX(3px); }
.pc--pending .pc-media { animation: pc-pulse 1.4s ease-in-out infinite; }
.pc--pending .pc-body { min-height: 92px; }
@keyframes pc-pulse { 50% { opacity: .6; } }

/* ── Карусель на странице заведения ── */
.pc-section { display: flex; flex-direction: column; gap: 12px; }
.pc-section.hidden { display: none !important; }
.pc-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pc-section-head h2 { margin: 0 !important; font-size: clamp(1.2rem, 2.2vw, 1.5rem) !important; font-weight: 800 !important; letter-spacing: -.02em; }
.pc-all { display: inline-flex; align-items: center; gap: 4px; color: var(--pc-green-dark) !important; font-size: .9rem; font-weight: 800; text-decoration: none !important; white-space: nowrap; }
.pc-all svg { width: 16px; height: 16px; }
.pc-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 280px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 10px; }
.pc-rail::-webkit-scrollbar { display: none; }
.pc-rail > .pc { scroll-snap-align: start; }
/* На телефоне акции не должны занимать весь первый экран: видно полторы карточки, а не одну во всю ширину. */
@media (max-width: 640px) { .pc-rail { grid-auto-columns: 60vw; gap: 10px; } .pc-rail .pc-body { gap: 4px; padding: 10px 12px 12px; } .pc-rail .pc-title { font-size: .92rem; } }

/* ── Список акций ── */
.pl { width: min(1180px, 100%); margin: 0 auto; padding: 20px 16px 72px; box-sizing: border-box; font-family: var(--brand-font, inherit); color: var(--pc-ink); }
.pl-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; background: #fff; color: var(--pc-ink) !important; font-weight: 750; font-size: .9rem; text-decoration: none !important; box-shadow: 0 0 0 1px var(--pc-line) inset; }
.pl-back svg { width: 18px; height: 18px; }
.pl-back:hover { box-shadow: 0 0 0 1.5px var(--pc-green) inset; }
.pl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin: 18px 0 18px; }
.pl-head h1 { margin: 0 !important; font-size: clamp(1.7rem, 3.4vw, 2.4rem) !important; font-weight: 800 !important; letter-spacing: -.03em; line-height: 1.1; color: var(--pc-ink) !important; }
.pl-head p { margin: 6px 0 0; color: var(--pc-muted); font-size: .95rem; }
.pl-owner { display: inline-flex; align-items: center; gap: 8px; color: var(--pc-ink) !important; text-decoration: none !important; font-weight: 750; }
.pl-owner img, .pl-owner .pl-owner-mark { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px var(--pc-line); }
.pl-owner .pl-owner-mark { display: inline-grid; place-items: center; font-size: .85rem; color: var(--pc-green-dark); }
.pl-filters { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--pc-line) inset; }
.pl-filters button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--pc-muted); font: inherit; font-size: .88rem; font-weight: 800; cursor: pointer; }
.pl-filters button[aria-pressed='true'] { background: var(--pc-wash); color: var(--pc-green-dark); }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.pl-grid > .pc[hidden] { display: none; }
.pl-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 16px; border-radius: 22px; background: #fff; text-align: center; color: var(--pc-muted); }
.pl-empty img { width: 150px; height: auto; }
.pl-empty b { color: var(--pc-ink); font-size: 1.15rem; }
.pl-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border: 0; border-radius: 16px; background: var(--pc-green); color: #fff !important; font: inherit; font-weight: 800; text-decoration: none !important; cursor: pointer; }
.pl-cta:hover { background: var(--pc-green-dark); }
.pl-cta svg { width: 18px; height: 18px; }

/* ── Страница акции ── */
.pd { width: min(1120px, 100%); margin: 0 auto; padding: 20px 16px 96px; box-sizing: border-box; font-family: var(--brand-font, inherit); color: var(--pc-ink); }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 18px; }
.pd-media { position: sticky; top: calc(var(--dl-header-h, 72px) + 16px); overflow: hidden; border-radius: 24px; background: var(--pc-soft); aspect-ratio: 1 / 1; box-shadow: 0 0 0 1px var(--pc-line) inset; }
.pd-media .pc-bg { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(26px) saturate(1.1); opacity: .5; }
.pd-media .pd-img { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
.pd-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pd-meta .pc-kind { position: static; box-shadow: 0 0 0 1px var(--pc-line) inset; }
.pd-ended { padding: 4px 10px; border-radius: 999px; background: #f1efea; color: var(--pc-muted); font-size: .76rem; font-weight: 800; }
.pd-title { margin: 0 !important; font-size: clamp(1.6rem, 3.2vw, 2.3rem) !important; line-height: 1.12 !important; font-weight: 800 !important; letter-spacing: -.03em; color: var(--pc-ink) !important; }
.pd-sub { margin: -6px 0 0; color: var(--pc-muted); font-size: 1rem; line-height: 1.5; }
.pd-when { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--pc-line) inset; font-size: .9rem; }
.pd-when svg { width: 20px; height: 20px; flex: none; color: var(--pc-green-dark); }
.pd-when b { font-weight: 800; }
.pd-when .pc-timer { margin-left: auto; }
.pd-content { color: #3b362f; font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.pd-content p { margin: 0 0 12px; }
.pd-content p:last-child { margin-bottom: 0; }
.pd-content strong, .pd-content b { color: var(--pc-ink); }
.pd-content a { color: var(--pc-green-dark); }
.pd-content img { max-width: 100%; height: auto; border-radius: 14px; }
.pd-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--pc-line) inset; }
.pd-card h2 { margin: 0 !important; font-size: .82rem !important; font-weight: 800 !important; letter-spacing: .03em; text-transform: uppercase; color: var(--pc-muted) !important; }
.pd-code { display: flex; align-items: stretch; gap: 8px; }
.pd-code-value { flex: 1; min-width: 0; display: grid; place-items: center; padding: 10px 14px; border-radius: 14px; background: var(--pc-wash); border: 2px dashed color-mix(in srgb, var(--pc-green) 45%, transparent); color: var(--pc-green-dark); font: 800 1.35rem/1.2 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; letter-spacing: .12em; overflow-wrap: anywhere; text-align: center; }
.pd-copy { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--pc-green); color: #fff; font: inherit; font-weight: 800; cursor: pointer; transition: background .15s ease; }
.pd-copy:hover { background: var(--pc-green-dark); }
.pd-copy svg { width: 18px; height: 18px; }
.pd-copy.is-done { background: #1f7a3f; }
.pd-card-hint { margin: 0; color: var(--pc-muted); font-size: .84rem; line-height: 1.45; }
.pd-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.pd-steps li { counter-increment: s; display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; line-height: 1.45; }
.pd-steps li::before { content: counter(s); flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--pc-wash); color: var(--pc-green-dark); font-size: .78rem; font-weight: 800; }
.pd-dish { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; }
.pd-dish img { width: 88px; height: 88px; border-radius: 16px; object-fit: cover; background: var(--pc-soft); }
.pd-dish-name { font-weight: 800; font-size: 1rem; line-height: 1.3; }
.pd-dish-meta { color: var(--pc-muted); font-size: .84rem; margin-top: 2px; }
.pd-dish-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.pd-dish-row b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.pd-dish .card-quick-add.pd-add { width: auto !important; height: auto !important; min-height: 44px; padding: 0 16px !important; border-radius: 12px !important; display: inline-flex; align-items: center; gap: 6px; background: var(--pc-green) !important; color: #fff !important; font-weight: 800; font-size: .9rem; }
.pd-dish .card-quick-add.pd-add svg { width: 18px; height: 18px; }
.pd-owner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--pc-line) inset; color: var(--pc-ink) !important; text-decoration: none !important; }
.pd-owner:hover { box-shadow: 0 0 0 1.5px var(--pc-green) inset; }
.pd-owner img, .pd-owner .pl-owner-mark { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: contain; padding: 4px; background: #fff; box-shadow: 0 0 0 1px var(--pc-line); display: grid; place-items: center; color: var(--pc-green-dark); font-weight: 800; }
.pd-owner span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pd-owner small { color: var(--pc-muted); font-size: .76rem; font-weight: 700; }
.pd-owner b { font-size: 1rem; }
.pd-owner > svg { width: 20px; height: 20px; color: var(--pc-muted); }
.pd-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-actions .pl-cta { flex: 1 1 220px; }
.pd-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 20px; border-radius: 16px; background: #fff; color: var(--pc-ink) !important; font-weight: 800; text-decoration: none !important; box-shadow: 0 0 0 1px var(--pc-line) inset; }
.pd-ghost:hover { box-shadow: 0 0 0 1.5px var(--pc-green) inset; }
.pd-more { margin-top: 44px; }
.pd-more h2 { margin: 0 0 14px !important; font-size: 1.3rem !important; font-weight: 800 !important; }
@media (max-width: 860px) {
  .pd-grid { grid-template-columns: 1fr; gap: 18px; }
  .pd-media { position: relative; top: auto; aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) { .pc, .pc-more svg { transition: none; } .pc:hover { transform: none; } }
@media (max-width: 1023px) { .header-inner > .oki-navwrap:empty { display: none !important; } }
