/* Карточки блюд: общие для публичного меню и превью в админке. Цвета и шрифты: CLAUDE.md, «Стиль». */
:root {
    --linen: #F4EDE0; --card: #FBF7EF; --line: #E0D2BA; --ink: #231F1C; --muted: #5A4E44;
    --red: #9E1B2C; --gold: #E0B45E; --story: #7A3A1E; --dark-muted: #D9CDB8; --night: #1A1714;
    --font-head: "Alegreya SC", Georgia, serif;
    --font-body: "Alegreya Sans", system-ui, sans-serif;
    --font-script: "Pinyon Script", "Marck Script", cursive; /* Marck — для кириллицы, в Pinyon её нет */
    --ease: cubic-bezier(.2,.8,.2,1);
    color-scheme: light;
}
.band { display: block; width: 100%; height: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Crect width='12' height='6' fill='%239E1B2C'/%3E%3Cpolygon points='6,0.5 9,3 6,5.5 3,3' fill='%23E0B45E'/%3E%3C/svg%3E") repeat-x; }

/* Фото: размытое превью фоном, пока грузится картинка */
.ph { display: block; background-color: #EADFCB; background-size: cover; background-position: center; }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }

.card h3, .feat h3 { margin: 0; font: inherit; }
.desc, .story { margin: 0; }
/* Байка свёрнута в «пилюлю» с вышитым ромбиком: её хочется тронуть. Подсказка-анимация — в public.css.
   Нажимается вся строка (summary), а сжимается только пилюля внутри: зона нажатия не меняется под пальцем,
   иначе касание у края пилюли «соскальзывало» и не открывало байку. */
.story summary {
    display: flex; margin: -6px 0 -4px; padding: 6px 0 4px;
    cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.story summary::-webkit-details-marker { display: none; }
/* Подсказка анимирует только transform/opacity (public.css): «волна» — кольцо ::before, расходится и тает.
   Блик через перерисовку фона оставлял в Firefox белые полосы по всей карточке. */
.story .pl {
    position: relative; display: inline-flex; align-items: center; gap: 7px;
    margin-left: -8px; padding: 3px 11px 3px 8px; border-radius: 999px;
    background-color: color-mix(in srgb, currentColor 8%, transparent);
    transition: transform .2s var(--ease), background-color .2s;
}
.story .pl::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: 0 0 0 1.5px var(--gold); opacity: 0;
}
.story summary:active .pl { transform: scale(.95); }
@media (hover: hover) {
    .story summary:hover .pl { background-color: color-mix(in srgb, currentColor 13%, transparent); }
    .story:not([open]) summary:hover .pl::after { transform: translateX(3px); }
}
/* Ромбик с кольцом — картинкой целиком внутри своего квадрата: при повороте и увеличении ничего не обрезается */
.story .sd {
    flex: none; width: 11px; height: 11px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolygon points='6,0.3 11.7,6 6,11.7 0.3,6' fill='%23EBCF95'/%3E%3Cpolygon points='6,2.6 9.4,6 6,9.4 2.6,6' fill='%239E1B2C'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .4s var(--ease);
}
.feat .story .sd { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolygon points='6,0.3 11.7,6 6,11.7 0.3,6' fill='%23A8323F'/%3E%3Cpolygon points='6,2.6 9.4,6 6,9.4 2.6,6' fill='%23E0B45E'/%3E%3C/svg%3E"); }
.story[open] .sd { transform: rotate(180deg); }
.story .pl::after { content: "›"; display: inline-block; font-style: normal; transition: transform .25s var(--ease); }
.story[open] .pl::after { transform: rotate(90deg); }
.story p { margin: 4px 0 0; }

/* Фирменное блюдо */
/* Карточки сами ничего не обрезают: скругляется только фото. Скруглённая обрезка всей карточки
   (overflow: hidden + border-radius) в Firefox давала при анимациях внутри светлые щели-полосы. */
.feat { display: flex; flex-direction: column; background: var(--ink); color: var(--linen); border-radius: 10px; }
/* overflow: hidden — иначе вертикальное фото растягивает блок сверх aspect-ratio */
.feat .pic { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px 10px 0 0; }
.feat .pic .ph { height: 100%; background-color: #3A332D; }
.feat .body { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.feat .body > .band { width: auto; margin: -14px -16px 4px; }
.feat .label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.feat .row { display: flex; gap: 12px; align-items: baseline; }
.feat .name { flex: 1; font-family: var(--font-head); font-weight: 700; font-size: 23px; line-height: 1.1; }
.feat .price { font-weight: 700; font-size: 16px; white-space: nowrap; color: var(--gold); }
.feat .desc { font-size: 14px; color: var(--dark-muted); line-height: 1.4; }
.feat .story { font-size: 13.5px; font-style: italic; color: var(--gold); line-height: 1.4; border-top: 1px dashed var(--muted); padding-top: 8px; margin-top: 2px; }

/* Обычные карточки */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.card .pic { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 9px 9px 0 0; }
.card .pic .ph { height: 100%; }
.card .body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
/* На телефоне название, описание и цена идут столбиком; на компьютере название и цена в одной строке (public.css) */
.card .head { display: contents; }
.card .name { order: 1; font-weight: 700; font-size: 16px; line-height: 1.2; }
.card .desc { order: 2; font-size: 13px; color: var(--muted); line-height: 1.35; flex: 1; }
.card .price { order: 3; font-weight: 700; font-size: 15px; color: var(--red); }
.card .weight { font-weight: 400; color: var(--muted); font-size: 13px; }
.card .story { order: 4; font-size: 12.5px; font-style: italic; color: var(--story); line-height: 1.35; border-top: 1px dashed #D3C3A7; padding-top: 6px; }

/* Стоп-лист: серая карточка и косой штамп */
.off .pic .ph { filter: grayscale(1) opacity(.6); }
.off .name, .off .desc, .off .price { opacity: .55; }
.stamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-12deg); padding: 4px 10px; border: 2px solid var(--red); border-radius: 4px; color: var(--red); background: rgba(251,247,239,.82); font: 700 13px var(--font-body); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.stamp.inline { position: static; order: 3; transform: rotate(-4deg); align-self: flex-start; }

/* Блюдо без фото: вышитый ромб вместо пустоты */
.pic.empty { display: grid; place-items: center; background: #EADFCB; color: #CDBB9C; }

/* ───── Плашка-объявление («Revelion la popas»). Раскладка на компьютере — в public.css ───── */
.revelion article { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 24px 20px 20px; border-radius: 12px; background: var(--banner, var(--ink)); color: var(--linen); }
.revelion .band { position: absolute; left: 0; top: 0; }
.revelion .star { display: none; }
.revelion .rv-text { display: flex; flex-direction: column; gap: 6px; }
.revelion .lbl { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.revelion .ttl { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 27px; line-height: 1.1; }
.revelion .txt { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--dark-muted); }
.revelion .btn { align-self: flex-start; margin-top: 6px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 22px; background: var(--red); color: var(--linen); text-decoration: none; font-weight: 700; font-size: 15px; }

/* ───── Зимняя тема: класс .winter на <html> (или на обёртке превью в админке) ───── */
.winter { --linen: #F2F0EA; --card: #FFFFFF; --line: #DCE2DE; --muted: #4F5B58; --story: #2F5A4A; --dark-muted: #C8D6CE; --pine: #173A2E; --banner: var(--pine); }
.winter .band { height: 8px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8'%3E%3Crect width='16' height='8' fill='%23173A2E'/%3E%3Cpolygon points='4,0.5 7.5,4 4,7.5 0.5,4' fill='%23F2F0EA'/%3E%3Crect x='11' y='3' width='2' height='2' fill='%23E0B45E'/%3E%3C/svg%3E"); }
.winter .feat { background: var(--pine); }
.winter .feat .story { border-top-color: #3F6457; }
.winter .pic.empty { background: #E6ECE8; color: #B9C6C0; }
/* Снежная «шапка» на верхнем краю фото */
.winter .card .pic::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0 0H100V4Q93 9 86 4Q79 10 72 4Q65 8 58 4Q51 10 44 4Q37 8 30 4Q23 10 16 4Q9 8 0 4Z' fill='white'/%3E%3C/svg%3E") top / 100% 100% no-repeat; }
.winter .card .pic.empty { position: relative; }

/* ───── Соусы: список без фото, ромбик цвета соуса ───── */
.sauces { display: grid; grid-template-columns: 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px 6px; }
.sauce { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px dashed #D3C3A7; }
.sauce:last-child { border-bottom: 0; }
.sauce svg { flex: none; margin-top: 3px; }
.sauce .sb { flex: 1; min-width: 0; }
.sauce .top { display: flex; align-items: baseline; gap: 8px; }
.sauce .nm { margin: 0; font: 700 16px var(--font-body); }
.sauce .dots { flex: 1; min-width: 16px; border-bottom: 2px dotted #C9B89C; }
.sauce .pr { font-weight: 700; font-size: 15px; color: var(--red); white-space: nowrap; }
.sauce .ds { margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.sauce .na { margin-top: 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.sauce.off svg, .sauce.off .nm, .sauce.off .ds, .sauce.off .pr { opacity: .5; }
.sauce.off .nm { text-decoration: line-through; text-decoration-color: var(--red); }
/* Категория-список (напитки): те же строки, что у соусов, плюс объём и байка */
.sauce.row svg { margin-top: 5px; }
.sauce .vol { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sauce .st { margin-top: 4px; font-size: 13px; font-style: italic; color: var(--story); line-height: 1.35; }
.sauce.off .vol { opacity: .5; }
