/* Каркас витрины: токены, шапка, подвал. Тёплые нейтрали как у панели импортёра, акцент — цвет бренда
   (var(--brand), задаётся в storefront/base.html). Ширина от 360 px без горизонтальной прокрутки,
   зоны нажатия ≥ 44 px. Компоненты — из common/base.css, здесь только переопределения токенов. */

body.storefront {
  --background: #f1eee9;
  --foreground: #1d1a17;
  --card: #ffffff;
  --popover: #ffffff;
  --secondary: #f5f2ed;
  --surface-muted: #f6f3ee;
  --muted-foreground: #6c645b;
  --accent: #ebe5dc;
  --border: #e2dcd3;
  --input: #d8d1c6;
  --ring: var(--brand);
  --brand-fg: #ffffff;
  --primary: var(--brand);
  --primary-foreground: var(--brand-fg);
  --brand-soft: color-mix(in srgb, var(--brand) 9%, #fff);
  --brand-line: color-mix(in srgb, var(--brand) 32%, transparent);
  --brand-ink: color-mix(in srgb, var(--brand) 82%, #000);
  --radius-cta: 12px;
  --card-border: #e0dad1;
  --card-shadow: 0 1px 2px rgb(40 28 18 / 4%), 0 12px 28px -18px rgb(40 28 18 / 20%);
  --card-shadow-hover: 0 2px 4px rgb(40 28 18 / 5%), 0 24px 44px -22px rgb(40 28 18 / 32%);
  --shadow-lg: 0 28px 70px -28px rgb(40 26 16 / 40%);
  --glass: rgb(255 252 247 / 74%);
  --glass-line: rgb(255 255 255 / 70%);
  --glass-dark: rgb(28 22 18 / 64%);
  --live: #12805a;
  --auction: #9c5a07;
  --sold: #6b6259;
  --fav: #e5484d;
  --wrap: 1240px;
  background:
    radial-gradient(1200px 520px at 100% -120px, color-mix(in srgb, var(--brand) 7%, transparent), transparent 70%),
    var(--background);
}
/* Текст на заливке бренда: светлый бренд — тёмные буквы, тёмный — белые. */
@supports (color: oklch(from red l c h)) {
  body.storefront { --brand-fg: oklch(from var(--brand) clamp(0, (0.72 - l) * 1000, 1) 0 0); }
}

.storefront h1 { font-size: clamp(1.75rem, 1.25rem + 1.7vw, 2.3rem); font-weight: 720; letter-spacing: -.035em; line-height: 1.1; }

/* --- Переход к содержимому --- */
.sf-skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  min-height: var(--tap); padding: 12px 16px; border-radius: 12px; background: var(--foreground); color: var(--background);
  font-weight: 700; text-decoration: none;
}
.sf-skip:focus { top: 12px; }

/* --- Шапка --- */
.sf-header {
  position: relative; z-index: 30;
  background: var(--glass);
  border-bottom: 1px solid rgb(226 220 211 / 80%);
  box-shadow: inset 0 -1px 0 rgb(255 255 255 / 60%);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
}
.sf-header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 8px 16px 10px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo actions" "nav nav";
  align-items: center; gap: 6px 12px;
}
.sf-logo {
  grid-area: logo; display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); min-width: 0;
  color: var(--foreground); text-decoration: none;
}
.sf-logo img { max-height: 40px; width: auto; border-radius: 8px; }
.sf-logo-mark {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px;
  background: var(--brand); color: var(--brand-fg); font-weight: 800; font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%), 0 4px 12px -4px var(--brand-line);
}
.sf-name { font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sf-nav {
  grid-area: nav; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 3px;
  border-radius: 999px; border: 1px solid var(--border); background: rgb(255 255 255 / 55%);
}
.sf-nav a {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: var(--tap); padding: 0 8px;
  border-radius: 999px; color: var(--foreground); text-decoration: none; font-weight: 700; font-size: .84rem; white-space: nowrap;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.sf-nav a .icon { width: 16px; height: 16px; color: var(--muted-foreground); }
.sf-nav a:hover { background: var(--accent); }
.sf-nav a[aria-current="page"] { background: var(--card); box-shadow: 0 1px 2px rgb(40 28 18 / 8%), 0 4px 10px -6px rgb(40 28 18 / 25%); }
.sf-nav a[aria-current="page"] .icon { color: var(--brand); }
.sf-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--brand); color: var(--brand-fg); font-size: .72rem; font-weight: 800; line-height: 1;
}

.sf-header-actions { grid-area: actions; display: flex; align-items: center; gap: 6px; }
.sf-phone, .sf-tg {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: var(--tap); min-height: var(--tap);
  padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card);
  color: var(--foreground); font-weight: 750; font-size: .88rem; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, filter .15s;
}
.sf-phone .icon, .sf-tg .icon { width: 17px; height: 17px; }
.sf-phone:hover { border-color: var(--input); background: var(--secondary); }
.sf-tg { background: var(--brand); border-color: transparent; color: var(--brand-fg); }
.sf-tg:hover { filter: brightness(1.1); }
.sf-phone-text, .sf-tg-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- Основное --- */
.sf-main { max-width: var(--wrap); margin: 0 auto; padding: 18px 16px 56px; min-width: 0; }
.is-embed .sf-main { padding: 12px; }

/* --- Подвал --- */
.sf-footer { background: #221c17; color: rgb(255 246 236 / 66%); font-size: .88rem; }
.sf-footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 32px 16px calc(96px + env(safe-area-inset-bottom));
  display: grid; gap: 22px;
}
.sf-footer p { margin: 0; }
.sf-footer a { color: #fff6ec; text-decoration: none; }
.sf-footer a:hover { text-decoration: underline; }
.sf-footer-brand { display: grid; gap: 8px; }
.sf-footer-name { color: #fff6ec; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.sf-requisites { white-space: pre-line; line-height: 1.6; }
.sf-footer-links, .sf-footer-contacts { display: grid; align-content: start; }
.sf-footer-links a, .sf-footer-contacts a { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); font-weight: 650; }
.sf-footer-contacts .icon { width: 16px; height: 16px; color: rgb(255 246 236 / 60%); }
.sf-footer .badge-demo { --badge: #f0b85a; }
.sf-disclaimer { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid rgb(255 246 236 / 12%); font-size: .8rem; line-height: 1.6; }

@media (max-width: 379px) {
  .sf-nav a .icon { display: none; }
}
@media (min-width: 640px) {
  .sf-nav a { font-size: .88rem; padding: 0 14px; }
  .sf-footer-inner { grid-template-columns: 1.4fr 1fr 1fr; padding-bottom: 40px; }
}
@media (min-width: 900px) {
  .sf-header-inner { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "logo nav actions"; padding: 10px 24px; }
  .sf-header-actions { justify-content: flex-end; }
  .sf-nav { display: inline-flex; }
  .sf-phone { padding: 0 16px; }
  .sf-phone-text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .sf-main { padding: 28px 24px 72px; }
  .sf-footer-inner { padding: 44px 24px 44px; }
}
@media (min-width: 1180px) {
  .sf-tg { padding: 0 16px; }
  .sf-tg-text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
