/* Самоцвет 6.0.7 — читаемость, спокойная типографика и управление на iPhone.
   Финальный слой оформления: существующие экраны и обработчики сохраняются. */
:root {
  --bg: #f8f6f2;
  --paper: #fffefa;
  --ink: #34291f;
  --muted: #75695e;
  --gold: #987044;
  --gold2: #b48e62;
  --line: #e8dfd3;
  --v607-header-height: 76px;
  --v607-nav-height: 80px;
  --v607-soft: #eee4d6;
}

html, body { -webkit-text-size-adjust: 100%; }
.shell { isolation: isolate; }
.top {
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
  background: rgba(248, 246, 242, .96);
  border-bottom: 1px solid #e9e1d660;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.header { height: 60px; gap: 4px; }
.header-logo {
  display: block;
  width: clamp(104px, calc(100vw - 224px), 142px);
  max-width: 42%;
  height: 58px;
  object-fit: contain;
  flex-shrink: 1;
}
.header-actions { gap: 0; flex-shrink: 0; }
.header-actions:first-child { flex: 0 0 44px; }
.header-actions:first-child > span { width: 44px !important; }
.header-actions:first-child:has(> span) { display: none; }
.header-actions:first-child:has(> span) + .header-logo { width: 142px; max-width: 46%; }
.iconbtn, .iconbtn.back {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  flex-shrink: 0;
}
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn:active { background: #e9dfd080; }
.scroller {
  top: calc(var(--v607-header-height) + env(safe-area-inset-top, 0px));
  bottom: calc(var(--v607-nav-height) + env(safe-area-inset-bottom, 0px));
  scroll-padding: 20px 0 24px;
}
.scroller > .content {
  padding: 22px 20px 36px;
  min-width: 0;
  overflow-x: clip;
}
.nav {
  height: calc(var(--v607-nav-height) + env(safe-area-inset-bottom, 0px));
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  gap: 3px;
  background: rgba(255, 254, 250, .97);
  border-top: 1px solid #e4d8c8;
  box-shadow: 0 -6px 24px #59412b05;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.nav-item {
  min-height: 56px;
  max-width: 80px;
  min-width: 0;
  padding: 7px 2px;
  gap: 5px;
  border-radius: 17px;
  font-size: 10.5px;
  line-height: 1.2;
  color: #807365;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item.active {
  color: #805a32;
  background: #eee3d4;
  font-weight: 650;
}
.nav-item svg { width: 22px; height: 22px; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid #805b36;
  outline-offset: 3px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea, select { font-size: 16px !important; }
.field label { font-size: 13px; line-height: 1.4; }
.field input, .field textarea, .field select {
  min-height: 48px;
  border-color: #dfd1bf;
  border-radius: 13px;
}
.sub { font-size: 14px; line-height: 1.6; }
.small, .tiny { font-size: 12px; line-height: 1.5; }
.eyebrow { font-size: 10px; line-height: 1.5; letter-spacing: .18em; }
.page-title { font-size: 35px; line-height: 1.12; margin: 8px 0; }
.sectionhead { margin: 28px 0 14px; gap: 10px; }
.sectionhead h2 { font-size: 27px; line-height: 1.15; }
.textlink { min-height: 44px; font-size: 14px; }
.primary, .secondary { min-height: 50px; font-size: 15px; line-height: 1.4; }
.primary { background: linear-gradient(115deg, #8e683e, #a17a4e); }
.secondary { border-color: #b79771; color: #815b35; }
.chip, .filterbtn { min-height: 44px; font-size: 13px; }
.chiprow { gap: 8px; margin-left: -20px; margin-right: -20px; padding: 2px 20px 8px; }
.searchbar { min-height: 52px; border-radius: 16px; padding: 12px 14px; }
.searchbar svg { flex-shrink: 0; }
.searchbar input { min-width: 0; }
.searchbar:focus-within { border-color: #a67f54; box-shadow: 0 0 0 3px #b7936720; }
.count { line-height: 1.45; }
.size, .photo-arrow, .lightbox-close { min-width: 44px; min-height: 44px; }
.photo-arrow { width: 44px; height: 44px; }
.fav {
  width: 44px;
  height: 44px;
  top: 6px;
  right: 6px;
  border: 1px solid #eadfce70;
  background: #fffefaeb;
  color: #89613d;
  font-size: 25px;
}
.bag {
  width: 44px;
  height: 44px;
  right: 9px;
  bottom: 10px;
  background: #967047;
  box-shadow: 0 3px 9px #89603e12;
}
.bag svg { width: 19px; height: 19px; }
.product { border: 1px solid #eee5d8; border-radius: 18px; box-shadow: 0 3px 16px #5e462709; }
.product-photo { background: #eee7dc; }
.product-body { padding: 12px 11px 14px; }
.product-title, .catalog .product-title { font-size: 16px; line-height: 1.24; }
.product-desc { font-size: 12px; line-height: 1.45; }
.product-price {
  font-size: 17px;
  line-height: 1.3;
  padding-right: 40px;
  min-height: 40px;
  display: flex;
  align-items: flex-end;
  overflow-wrap: anywhere;
}
.catalog { gap: 12px; }
.rowcards { gap: 12px; margin-right: -20px; padding-right: 20px; scroll-snap-type: x proximity; }
.rowcards .product { width: 168px; min-width: 168px; scroll-snap-align: start; }
.qty { gap: 9px; }
.qty button { width: 44px; height: 44px; min-width: 44px; font-size: 20px; }
.basketrow img { width: 76px; height: 76px; }
.basketrow { gap: 10px; }
.basketrow > div { min-width: 0; }
.basket-right { white-space: normal; text-align: right; }
.basket-right > button { min-width: 44px; min-height: 44px; }
.menurow { min-height: 64px; padding: 15px; border: 1px solid #eee4d7; }
.menurow .m-main small { font-size: 12px; line-height: 1.45; }
.info { font-size: 13px; line-height: 1.55; padding: 15px; }
.toast {
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 32px);
  width: max-content;
  white-space: normal;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
}
.modalcard { max-height: calc(100dvh - 48px); overflow-y: auto; }
.photo-lightbox { padding: max(20px, env(safe-area-inset-top, 0px)) 20px max(20px, env(safe-area-inset-bottom, 0px)); }

/* Главная: быстрый поиск и два понятных входа в сервисы. */
#app[data-screen="home"] .content { padding-top: 22px; }
.v607-intro { margin: 0 0 16px; }
.v607-intro .eyebrow { display: block; margin-bottom: 6px; }
.v607-intro h1 { margin: 0; font: 400 29px/1.17 Georgia, 'Times New Roman', serif; letter-spacing: -.025em; }
#app[data-screen="home"] .greeting { font-size: 25px; line-height: 1.25; margin: 0 0 16px; }
.v607-search {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #e6dccd;
  border-radius: 16px;
  padding: 13px 15px;
  margin: 14px 0 20px;
  background: #fffdfa;
  color: #7c6d5e;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  box-shadow: 0 2px 8px #6a4a2503;
}
.v607-search > svg { width: 21px; height: 21px; flex-shrink: 0; stroke: #96714a; }
.v607-search > span { flex: 1; min-width: 0; }
.v607-search > span:last-child[aria-hidden="true"] { flex: 0 0 auto; font-size: 18px; color: #9b856d; }
.v607-search > span:last-child svg { width: 18px; height: 18px; display: block; }
.v607-search > kbd { font: 18px/1 system-ui, sans-serif; color: #9b856d; background: none; }
#app[data-screen="home"] .hero { height: 260px; border-radius: 24px; box-shadow: 0 10px 26px #7a543b0a; }
#app[data-screen="home"] .hero-content { left: 20px; top: 25px; width: 66%; }
#app[data-screen="home"] .hero-title { font-size: 31px; line-height: 1.1; margin: 13px 0 18px; }
#app[data-screen="home"] .hero .outline { min-height: 44px; padding: 11px 14px; font-size: 13px; background: #fffaf0b8; }
#app[data-screen="home"] .hero:after { background: linear-gradient(90deg, #efe5d8ed, #efe5d8b8 45%, #efe5d800 90%); }
.cats { gap: 12px; margin: 20px -20px 0; padding: 0 20px 8px; }
.cat { min-width: 64px; min-height: 90px; }
.cat img { width: 62px; height: 62px; border: 1px solid #d9c5aa; padding: 3px; background: #f5efe5; }
.cat span { font-size: 13px; margin-top: 8px; line-height: 1.25; }
.cat.active img { border: 2px solid #987044; padding: 2px; }
.v607-quicklinks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0 24px; }
.v607-quicklink {
  min-width: 0;
  min-height: 135px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 11px;
  position: relative;
  text-align: left;
  border: 1px solid #e4d5c1;
  border-radius: 19px;
  background: #eee2d1;
  color: #59412d;
}
.v607-quicklink:nth-child(2) { background: #f4eee5; }
.v607-quick-icon { width: 30px; height: 30px; display: grid; place-items: center; font-size: 24px; color: #947048; }
.v607-quick-icon svg { width: 23px; height: 23px; }
.v607-quicklink strong { display: block; font: 400 19px/1.15 Georgia, 'Times New Roman', serif; }
.v607-quicklink small { display: block; font-size: 12px; line-height: 1.45; color: #7b6651; margin-top: 5px; }
.v607-quicklink .v607-arrow,
.v607-quicklink > span:last-child[aria-hidden="true"] { position: absolute; top: 16px; right: 15px; color: #8f6b44; font-size: 18px; }
.v607-quicklink > span:last-child svg { width: 18px; height: 18px; display: block; transform: rotate(-40deg); }
.v51-home-feature { margin: 24px 0; padding: 24px 21px; border-radius: 24px; background: linear-gradient(118deg, #efe2d1, #dcc1a2); }
.v51-home-feature h2 { font-size: 31px; line-height: 1.1; }
.v51-home-feature p { font-size: 14px; line-height: 1.6; max-width: 260px; }
.v51-feature-buttons button { min-height: 46px; font-size: 14px; padding: 12px 17px; }
.v50-home-banner p { font-size: 14px; line-height: 1.6; }
.v50-home-banner button { font-size: 14px; }
.v607-products-empty {
  flex: 1 0 calc(100% - 20px);
  min-width: 0;
  margin-right: 0;
  padding: 24px 19px;
  background: #fffdfa;
  border: 1px dashed #d7c4a9;
  border-radius: 18px;
  text-align: center;
  color: #7a6755;
  font-size: 14px;
  line-height: 1.55;
}
.v607-products-empty strong { display: block; font: 400 21px/1.2 Georgia, serif; margin: 0 0 8px; color: #4d3a29; }
.v607-products-empty p { margin: 7px 0 0; }
.v607-products-empty button { min-height: 44px; margin-top: 12px; }
.v607-skeleton {
  position: relative;
  flex: 0 0 168px;
  height: 236px;
  border: 1px solid #ebe1d4;
  border-radius: 18px;
  background: #efe7dc;
  overflow: hidden;
}
.v607-skeleton:after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, #fffaf580, transparent);
  animation: v607-shimmer 1.7s ease-in-out infinite;
}
@keyframes v607-shimmer { to { transform: translateX(100%); } }

@media (max-width: 360px) {
  .top { padding-left: 12px; padding-right: 12px; }
  .scroller > .content { padding-left: 16px; padding-right: 16px; }
  .nav { padding-left: 5px; padding-right: 5px; gap: 1px; }
  .nav-item { font-size: 10px; border-radius: 15px; }
  .sectionhead h2 { font-size: 25px; }
  .sectionhead .textlink { font-size: 13px; }
  .page-title { font-size: 32px; }
  .cats { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; gap: 10px; }
  .chiprow { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .rowcards { margin-right: -16px; padding-right: 16px; }
  #app[data-screen="home"] .hero-title { font-size: 29px; }
  #app[data-screen="home"] .hero-content { width: 76%; left: 17px; }
  #app[data-screen="home"] .hero .outline { font-size: 12px; padding-left: 12px; padding-right: 12px; }
  .v607-intro h1 { font-size: 27px; }
  .v607-quicklinks { gap: 10px; }
  .v607-quicklink { padding: 14px 12px; min-height: 140px; }
  .v607-quicklink strong { font-size: 18px; }
  .v607-quicklink .v607-arrow,
  .v607-quicklink > span:last-child[aria-hidden="true"] { top: 14px; right: 12px; }
  .v607-quicklink small { font-size: 12px; }
  .catalog { gap: 10px; }
  .product-body { padding-left: 9px; padding-right: 9px; }
  .product-title, .catalog .product-title { font-size: 15px; }
  .product-price { font-size: 16px; padding-right: 40px; }
  .bag { right: 6px; }
  .basketrow { flex-wrap: wrap; }
  .basketrow > img { width: 70px; height: 70px; }
  .basketrow .basket-right { flex: 1; margin-left: 80px; flex-direction: row; align-items: center; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .v607-skeleton:after { animation: none; display: none; }
  .nav-item { transition: none; }
}
@media print {
  .top, .nav { display: none !important; }
}
