/* Прайс для сайта apmarkt.ru (iframe в Tilda). Светлая тема — как у сайта. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --card: #f5f5f7;
  --line: #e3e3e8;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-text: #ffffff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.embedded body { background: transparent; }
.embedded, .embedded body { background: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 960px; margin: 0 auto; padding: 16px 16px 24px; }
.loading, .muted { color: var(--muted); }
.loading { padding: 40px 0; text-align: center; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.brand { font-weight: 700; font-size: 18px; }
.phone { font-weight: 600; }

.title { font-size: 28px; line-height: 1.2; margin: 12px 0 16px; letter-spacing: -0.01em; }

/* Вкладки устройств: на телефоне листаются вбок */
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-weight: 500; cursor: pointer;
}
.tab:hover { border-color: var(--muted); }
.tab.on { background: var(--text); border-color: var(--text); color: var(--bg); }

.search {
  width: 100%; min-height: 44px; padding: 10px 14px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font: inherit;
}
.search:focus { outline: 2px solid var(--accent); outline-offset: -1px; background: var(--bg); }

/* Сетка моделей */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 14px 10px 16px; border-radius: var(--radius); background: var(--card); color: var(--text);
  transition: transform .15s ease, background .15s ease;
}
.card:hover { text-decoration: none; background: #ececf0; transform: translateY(-2px); }
.card-name { font-weight: 600; font-size: 15px; }
.card-sub { font-size: 14px; color: var(--muted); }
.empty { grid-column: 1 / -1; color: var(--muted); }

.art { width: 100%; height: 110px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.art img, .art svg { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Страница модели */
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.model-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.model-head .art { width: 96px; height: 120px; flex: none; margin: 0; }
.model-head .title { margin: 0 0 4px; }
.model-head p { margin: 0; }

.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin: 16px 0; }
.work { background: var(--card); border-radius: var(--radius); padding: 12px 16px; }
.work-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 4px; }
.work-name { font-weight: 600; }
.work-time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.opt { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; }
.opt + .opt { border-top: 1px solid var(--line); }
.opt-name { font-size: 15px; }
.warranty { color: var(--muted); font-size: 14px; }
.opt-price { font-weight: 600; white-space: nowrap; }
.ask { font-weight: 600; white-space: nowrap; }

.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 24px; border: 1px solid var(--accent); color: var(--accent); font-weight: 600;
}
.btn:hover { text-decoration: none; background: rgba(0, 113, 227, .06); }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: #0077ed; }

.foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot p { margin: 6px 0; }

@media (max-width: 520px) {
  .title { font-size: 24px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .art { height: 90px; }
  .works { grid-template-columns: 1fr; }
  .model-head .art { width: 72px; height: 96px; }
  .btn { flex: 1 1 100%; }
}

/* bare=1: блок цен внутри страницы модели на apmarkt.ru — шрифт сайта, без лишних отступов */
.bare body { font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.bare .wrap { padding-top: 0; }
.bare .works { margin-top: 0; }
.bare-title { font: 600 38px/1.2 "EB Garamond", Georgia, serif; color: #47484a; text-align: center; margin: 24px 0 16px; }
.bare-sub { font: italic 300 20px/1.4 "EB Garamond", Georgia, serif; color: #000; text-align: center; margin: 0 0 40px; }
@media (max-width: 520px) { .bare-title { font-size: 30px; } .bare-sub { font-size: 18px; margin-bottom: 24px; } }
