/* Tunuk Market — прототип витрины v2.
   Палитра: British Racing Green (CLAUDE.md §3.7), макеты Figma 19-7823 / 53-14341 / 53-14620 / 54-14737 / 54-14773. */

@font-face{
  font-family:"Onest";
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url("fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face{
  font-family:"Onest";
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url("fonts/onest-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;
}

:root{
  --brg-900:#0A1512;
  --brg-700:#162F29;
  --brg-500:#295B4F;
  --brg-300:#569F8C;
  --brg-100:#DCECEA;
  --badge-sale-bg:#a73afd;
  --badge-discount-bg:#ff2d55;
  --ink:#0A1512;
  --title-ink:#162F29;
  --muted:#868695;
  --icon-off:#c8c8d1;
  --dot-off:#c8c8d1;
  --search-ph:#a9a8b0;
  --surface:#fff;
  --star:#fca95d;

  --page-max:430px;
  --menu-h:52px;
}

*{ box-sizing:border-box; }
[hidden]{ display:none !important; }

.viewbar{
  position:sticky;
  top:0;
  z-index:40;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 12px;
  background:var(--brg-900);
  color:#fff;
  font-size:12px;
  font-weight:600;
}
.viewbar button{
  display:flex;
  align-items:center;
  gap:4px;
  border:0;
  border-radius:8px;
  background:rgba(255,255,255,.15);
  color:#fff;
  font:inherit;
  font-size:12px;
  font-weight:600;
  padding:6px 10px;
  cursor:pointer;
  flex-shrink:0;
}
.viewbar button svg{ width:14px; height:14px; }
html{ height:100%; }
body{
  margin:0;
  line-height:normal;
  font-family:"Onest",ui-sans-serif,system-ui,sans-serif;
  background:#e9edec;
  min-height:100%;
}

.page{
  position:relative;
  max-width:var(--page-max);
  margin:0 auto;
  min-height:100vh;
  min-height:100dvh;
  background:var(--surface);
  padding-bottom:calc(var(--menu-h) + env(safe-area-inset-bottom));
}

/* ---------- Хедер ---------- */
.header{
  height:120px;
  border-radius:0 0 24px 24px;
  background:linear-gradient(95.41deg,var(--brg-500),var(--brg-700));
  padding:30px 16px 0;
  position:relative;
}
.brand{
  display:block;
  width:164px;
  height:18px;
  color:#fff;
}
.search-wrap{
  position:absolute;
  top:64px;
  left:16px;
  right:16px;
  height:40px;
  border-radius:12px;
  background:var(--surface);
  overflow:hidden;
  display:flex;
  align-items:center;
  padding-left:12px;
  gap:8px;
}
.search-icon{
  width:20px;
  height:20px;
  flex-shrink:0;
  color:var(--search-ph);
}
.search-input{
  flex:1;
  height:100%;
  border:0;
  outline:none;
  padding:0 12px 0 0;
  font:inherit;
  font-size:16px;
  font-weight:500;
  color:var(--ink);
  background:transparent;
}
.search-input::placeholder{ color:var(--search-ph); }
.search-clear{
  flex-shrink:0;
  width:20px;
  height:20px;
  padding:0;
  border:0;
  background:none;
  color:var(--search-ph);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.search-clear svg,
.searchbar .field .search-clear svg{ width:14px; height:14px; color:inherit; }
/* нативный "x" в type=search браузера — свой крестик уже есть, скрываем дубль */
input[type=search]::-webkit-search-cancel-button{ display:none; }

/* ---------- Слайдер баннеров ---------- */
.promo-zone{
  position:relative;
  margin-top:16px;
}
.promo{
  display:flex;
  gap:8px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
}
.promo::-webkit-scrollbar{ display:none; }
.promo-card{
  position:relative;
  /* карточка уже вьюпорта на 32px: по 8px зазор + 8px выглядывание соседа с каждой стороны */
  flex:0 0 calc(100% - 32px);
  aspect-ratio:358/150;
  border-radius:16px;
  overflow:hidden;
  scroll-snap-align:center;
  background:#ddd center/cover no-repeat;
  color:#fff;
  font-size:22px;
}
.promo-card.ink{ color:var(--brg-900); }
.promo-title{
  position:absolute;
  top:24px;
  left:16px;
  margin:0;
  font-size:inherit;
  line-height:28px;
  font-weight:700;
}
.promo-title.solo{ top:32px; line-height:32px; }
.promo-chip{
  position:absolute;
  top:88px;
  left:16px;
  border-radius:8px;
  padding:4px;
  font-size:12px;
  line-height:12px;
  font-weight:500;
  color:#fff;
}
.promo-chip.raised{ top:72px; }
.promo-chip.green{ background:var(--brg-500); }
.promo-chip.red{ background:var(--badge-discount-bg); }
.promo-chip.dark{ background:var(--brg-900); }
.promo-dots{
  position:absolute;
  bottom:12px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:8px;
  pointer-events:none;
}
.promo-dots i{
  width:6px;
  height:6px;
  border-radius:99px;
  background:rgba(255,255,255,.1);
  transition:background .25s;
}
.promo-dots i.on{ background:rgba(255,255,255,.5); }

/* ---------- Сетка товаров ---------- */
.grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  column-gap:8px;
  row-gap:12px;
  padding:16px 12px 24px;
  margin:0;
  list-style:none;
}
.card{ display:flex; flex-direction:column; }

.card-photo{
  position:relative;
  border-radius:12px;
  overflow:hidden;
}
.photo-strip{
  display:flex;
  aspect-ratio:179/238;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
}
.photo-strip::-webkit-scrollbar{ display:none; }
.photo-strip img, .photo-strip video{
  flex:0 0 100%;
  width:100%;
  height:100%;
  object-fit:cover;
  scroll-snap-align:start;
  display:block;
}
.badges{
  position:absolute;
  bottom:6px;
  left:6px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  pointer-events:none;
}
.badge{
  border-radius:6px;
  padding:1px 4px;
  font-size:11px;
  line-height:14px;
  font-weight:500;
  color:#fff;
}
.badge.tag{ background:var(--brg-500); }
.badge.discount{ background:var(--badge-discount-bg); }
.fav{
  position:absolute;
  top:8px;
  right:8px;
  width:24px;
  height:24px;
  border:0;
  padding:0;
  background:none;
  cursor:pointer;
}
.fav img, .fav svg{ width:100%; height:100%; display:block; }
.fav svg .h-fill{ fill:#fff; fill-opacity:.5; }
.fav svg .h-line{ fill:#000; }
.fav.saved svg .h-fill{ fill:var(--brg-300); fill-opacity:1; }
.fav.saved svg .h-line{ fill:var(--brg-700); }

.card-body{
  display:flex;
  flex-direction:column;
  align-items:center;
  padding-top:4px;
  gap:8px;
  font-size:12px;
  color:var(--title-ink);
}
.photo-dots{
  display:flex;
  align-items:center;
  gap:4px;
  margin-bottom:4px;
}
.photo-dots i{
  width:4px;
  height:4px;
  border-radius:99px;
  background:var(--dot-off);
  transition:background .2s;
}
.photo-dots i.on{ background:var(--brg-300); }
.card-info{
  align-self:stretch;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.price-row{
  align-self:stretch;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:16px;
  color:var(--ink);
}
.price-row b{ line-height:22px; }
.price-old{
  font-size:12px;
  line-height:14px;
  font-weight:500;
  text-decoration:line-through;
  color:var(--muted);
}
.card-title{
  align-self:stretch;
  margin:0;
  font-size:12px;
  line-height:18px;
  font-weight:400;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}
.rating-row{
  height:22px;
  display:flex;
  align-items:center;
  gap:4px;
  font-size:12px;
  font-weight:500;
}
.rating-row img{ width:12px; height:12px; }
.rating-row .sep{
  width:2px;
  height:2px;
  border-radius:99px;
  background:var(--muted);
}
.rating-row .cnt{ color:var(--muted); }
.card-meta{
  height:22px;
  display:flex;
  align-items:center;
  font-size:12px;
  line-height:15px;
  font-weight:500;
  color:var(--muted);
}
/* строка для персонала на плитке: себестоимость + остаток (Chamoisee из палитры) */
.card-staff{
  align-self:stretch;
  margin-top:2px;
  font-size:11px;
  line-height:16px;
  font-weight:600;
  color:#5B513E;
  background:#EAE7E1;
  border-radius:6px;
  padding:2px 6px;
}
.photo-strip video{
  flex:0 0 100%;
  width:100%;
  height:100%;
  object-fit:cover;
  scroll-snap-align:start;
  display:block;
}
.add-btn{
  width:100%;
  border:0;
  border-radius:8px;
  background:linear-gradient(180deg,var(--brg-500),var(--brg-300));
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:6px 0;
  font:inherit;
  font-size:14px;
  line-height:18px;
  font-weight:500;
  cursor:pointer;
}
.add-btn img{ width:16px; height:16px; }
.add-btn:active{ filter:brightness(.92); }

/* ---------- Нижнее меню ---------- */
.mobilemenu{
  position:fixed;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:var(--page-max);
  background:var(--surface);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px calc(env(safe-area-inset-bottom));
  z-index:20;
}
.tab{
  height:var(--menu-h);
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px;
  border-radius:24px;
  color:var(--icon-off);
  text-decoration:none;
}
.tab svg{ width:28px; height:28px; display:block; }
.tab.active{ color:var(--brg-500); }
.tab{ position:relative; }
.nav-badge{
  position:absolute;
  top:6px;
  right:calc(50% - 22px);
  min-width:16px;
  height:16px;
  border-radius:99px;
  background:var(--badge-discount-bg);
  color:#fff;
  font-size:10px;
  line-height:16px;
  font-weight:600;
  text-align:center;
  padding:0 4px;
}

/* ---------- Корзина ---------- */
.cart-list{
  list-style:none;
  margin:0;
  padding:0 16px 16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.cart-item{
  display:flex;
  gap:12px;
  align-items:flex-start;
}
.cart-item img{
  width:72px;
  height:96px;
  object-fit:cover;
  border-radius:8px;
  flex-shrink:0;
}
.cart-item .info{ flex:1; min-width:0; }
.cart-item .name{
  margin:0;
  font-size:13px;
  line-height:18px;
  font-weight:400;
  color:var(--title-ink);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.cart-item .sum{
  margin-top:4px;
  font-size:15px;
  font-weight:700;
  color:var(--ink);
}
.cart-item .controls{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
}
.stepper{
  display:flex;
  align-items:center;
  gap:0;
  border:1px solid #e3e7e5;
  border-radius:8px;
  overflow:hidden;
}
.stepper button{
  width:32px;
  height:32px;
  border:0;
  background:#f6f8f7;
  font-size:18px;
  line-height:1;
  color:var(--brg-500);
  cursor:pointer;
}
.stepper span{
  min-width:32px;
  text-align:center;
  font-size:14px;
  font-weight:600;
  color:var(--ink);
}
.cart-remove{
  border:0;
  background:none;
  padding:4px;
  font-size:12px;
  color:var(--muted);
  cursor:pointer;
  text-decoration:underline;
}
.cart-total{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  padding:16px;
  border-top:8px solid #f2f4f3;
  font-size:14px;
  color:var(--muted);
}
.cart-total b{
  font-size:20px;
  color:var(--ink);
}
.order-form{
  padding:16px 16px;
  display:flex;
  flex-direction:column;
  gap:8px;
  border-top:8px solid #f2f4f3;
}
.order-form h2{
  margin:0 0 4px;
  font-size:16px;
  font-weight:700;
  color:var(--brg-900);
}
.order-form input{
  height:44px;
  border:1px solid #e3e7e5;
  border-radius:12px;
  padding:0 12px;
  font:inherit;
  font-size:15px;
  color:var(--ink);
}
.order-form input:focus-visible{
  outline:2px solid var(--brg-500);
  outline-offset:-1px;
}
.order-form textarea{
  min-height:72px;
  border:1px solid #e3e7e5;
  border-radius:12px;
  padding:10px 12px;
  font:inherit;
  font-size:15px;
  color:var(--ink);
  resize:vertical;
}
.order-form textarea:focus-visible{
  outline:2px solid var(--brg-500);
  outline-offset:-1px;
}
.order-form textarea::placeholder{ color:var(--search-ph); }
.order-form .hint{
  font-size:12px;
  line-height:16px;
  color:var(--muted);
}
.order-form .add-btn{
  padding:12px 0;
  border-radius:12px;
  font-size:16px;
}
.thanks{
  display:none;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:48px 24px;
  gap:8px;
}
.thanks.show{ display:flex; }
.thanks .stub-icon{ margin-bottom:8px; }
.thanks h1{
  margin:0;
  font-size:20px;
  font-weight:700;
  color:var(--brg-900);
}
.thanks p{
  margin:0;
  font-size:14px;
  line-height:20px;
  color:var(--muted);
  max-width:280px;
}

/* ---------- Каталог ---------- */
.cat-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:8px;
  padding:16px;
  margin:0;
  list-style:none;
}
.cat-tile{
  position:relative;
  border-radius:12px;
  overflow:hidden;
  aspect-ratio:179/110;
  background:#ddd center/cover no-repeat;
  cursor:pointer;
  display:block;
  text-decoration:none;
}
.cat-tile span{
  position:absolute;
  left:10px;
  bottom:8px;
  font-size:14px;
  font-weight:700;
  color:#fff;
  text-shadow:0 1px 6px rgba(10,21,18,.55);
}
.cat-tile.all{
  background:var(--brg-100);
}
.cat-tile.all span{
  color:var(--brg-700);
  text-shadow:none;
}
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 16px 0;
}
/* заголовок категории → грид: те же 12px, что у остальных разделов */
#catView .grid{ padding-top:12px; }
.section-head h1{
  margin:0;
  font-size:20px;
  line-height:26px;
  font-weight:700;
  color:var(--brg-900);
}
.section-head a{
  font-size:13px;
  font-weight:600;
  color:var(--brg-500);
  text-decoration:none;
}
.grid-note{
  padding:8px 16px 24px;
  font-size:12px;
  color:var(--muted);
  text-align:center;
}
.add-btn.added{ filter:saturate(.7) brightness(1.05); }

/* ---------- Белый под-хедер (страницы без своего Ozon-хедера) ---------- */
.subheader{
  position:sticky;
  top:0;
  z-index:18;
  display:flex;
  align-items:center;
  height:52px;
  padding:0 8px;
  background:var(--surface);
  border-bottom:1px solid #eef1f0;
}
.subheader .back{
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--brg-900);
  text-decoration:none;
  border:0;
  background:none;
  cursor:pointer;
}
.subheader .back svg{ width:22px; height:22px; }
.subheader h1{
  flex:1;
  margin:0 40px 0 0;
  text-align:center;
  font-size:16px;
  line-height:22px;
  font-weight:700;
  color:var(--brg-900);
}

/* ---------- Ozon-хедер: белый, назад + серое поле поиска ---------- */
.searchbar{
  position:sticky;
  top:0;
  z-index:18;
  display:flex;
  align-items:center;
  gap:4px;
  padding:8px 12px 8px 4px;
  background:var(--surface);
}
.searchbar .back{
  width:40px;
  height:40px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--brg-900);
  text-decoration:none;
}
.searchbar .back svg{ width:22px; height:22px; }
.searchbar.no-back{ padding-left:12px; }
.searchbar .field{
  flex:1;
  display:flex;
  align-items:center;
  gap:8px;
  height:40px;
  border-radius:12px;
  background:#f0f2f1;
  padding:0 12px;
}
.searchbar .field svg{
  width:20px;
  height:20px;
  flex-shrink:0;
  color:var(--search-ph);
}
.searchbar .field input{
  flex:1;
  min-width:0;
  border:0;
  background:transparent;
  outline:none;
  font:inherit;
  font-size:15px;
  color:var(--ink);
}
.searchbar .field input::placeholder{ color:var(--search-ph); }

/* ---------- Строки-ссылки списком (избранное: подборки и т.п.) ---------- */
.rows{
  margin:8px 12px 0;
  padding:0;
  list-style:none;
  border-radius:14px;
  background:#f7f9f8;
  overflow:hidden;
}
.rows a{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  text-decoration:none;
  font-size:15px;
  font-weight:500;
  color:var(--brg-900);
}
.rows li + li a{ border-top:1px solid #eceeed; }
.rows svg{ width:22px; height:22px; color:var(--brg-500); flex-shrink:0; }
.rows .chev{ margin-left:auto; color:var(--icon-off); }
.rows .chev svg{ width:16px; height:16px; transform:rotate(180deg); }

/* ---------- Корзина в стиле Ozon ---------- */
.cart-top{
  display:flex;
  align-items:center;
  gap:6px;
  padding:12px 16px 4px;
  font-size:14px;
  font-weight:600;
  color:var(--brg-900);
}
.cart-top svg{ width:16px; height:16px; color:var(--muted); }
.cart-tools{
  display:flex;
  align-items:center;
  padding:8px 16px;
}
.cart-tools .selall{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  font-weight:500;
  color:var(--brg-900);
  cursor:pointer;
}
.cart-tools .spacer{ flex:1; }
.cart-tools .tool{
  width:36px;
  height:36px;
  border:0;
  border-radius:10px;
  background:#f0f2f1;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--brg-900);
  cursor:pointer;
  margin-left:8px;
}
.cart-tools .tool svg{ width:18px; height:18px; }
.cb{
  appearance:none;
  -webkit-appearance:none;
  width:22px;
  height:22px;
  border:1.5px solid #cfd6d3;
  border-radius:7px;
  background:var(--surface);
  cursor:pointer;
  position:relative;
  flex-shrink:0;
  margin:0;
}
.cb:checked{
  background:var(--brg-500);
  border-color:var(--brg-500);
}
.cb:checked::after{
  content:"";
  position:absolute;
  left:7px;
  top:3px;
  width:5px;
  height:10px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}
.cart-section-title{
  margin:0;
  /* до контента ровно 12px — единый стандарт заголовков разделов */
  padding:16px 16px 12px;
  font-size:18px;
  font-weight:700;
  color:var(--brg-900);
}
/* фото тянется ровно от суммы до конца ряда иконок; фото и название кликабельны */
.cart-item{ align-items:stretch; }
.cart-item > a{
  align-self:stretch;
  flex-shrink:0;
  display:block;
}
.cart-item > a img{
  width:88px;
  height:100%;
  object-fit:cover;
  border-radius:8px;
  display:block;
}
.cart-item .namelink{ text-decoration:none; color:inherit; }
.cart-item .pricebig{
  font-size:17px;
  font-weight:700;
  color:var(--ink);
  display:flex;
  align-items:baseline;
  gap:6px;
}
.cart-item .pricebig .old{
  font-size:12px;
  font-weight:500;
  color:var(--muted);
  text-decoration:line-through;
}
.cart-item .tagrow{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:2px;
}
.cart-item .left-qty{
  font-size:12px;
  font-weight:500;
  color:var(--badge-discount-bg);
}
.cart-item .iconbtn{
  width:32px;
  height:32px;
  border:0;
  border-radius:9px;
  background:#f0f2f1;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--brg-900);
  cursor:pointer;
  padding:0;
}
.cart-item .iconbtn svg{ width:16px; height:16px; }
.cart-item .iconbtn .h-fill{ fill:none; }
.cart-item .iconbtn .h-line{ fill:currentColor; }
.cart-item .iconbtn.saved .h-fill{ fill:var(--brg-300); }
.cart-item .iconbtn.saved .h-line{ fill:var(--brg-700); }
.cart-item .buy1{
  margin-left:auto;
  border:0;
  border-radius:9px;
  background:#f0f2f1;
  padding:0 14px;
  height:32px;
  font:inherit;
  font-size:13px;
  font-weight:600;
  color:var(--brg-700);
  cursor:pointer;
}
.cart-summary{
  padding:16px;
  border-top:8px solid #f2f4f3;
}
.cart-summary h2{
  margin:0 0 12px;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  font-size:18px;
  font-weight:700;
  color:var(--brg-900);
}
.cart-summary h2 .sub{
  font-size:13px;
  font-weight:500;
  color:var(--muted);
}
.cart-summary .row{
  display:flex;
  justify-content:space-between;
  font-size:14px;
  color:var(--title-ink);
  padding:4px 0;
}
.cart-summary .row .neg{ color:var(--badge-discount-bg); font-weight:600; }
.cart-summary .total{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid #eef1f0;
  font-size:18px;
  font-weight:700;
  color:var(--brg-900);
}
.cart-summary .note{
  margin-top:10px;
  font-size:12px;
  line-height:16px;
  color:var(--muted);
  text-align:center;
}
.cart-summary .add-btn{
  margin-top:12px;
  padding:13px 0;
  border-radius:12px;
  font-size:16px;
}

/* ---------- Профиль: шапка как у Ozon ---------- */
.pf-head{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 16px;
}
.pf-head .pf-avatar{ width:48px; height:48px; }
.pf-head .who{
  flex:1;
  min-width:0;
  cursor:pointer;
}
.pf-head .who .n{
  font-size:16px;
  font-weight:700;
  color:var(--brg-900);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pf-head .who .s{
  font-size:12px;
  color:var(--muted);
}
.pf-head .hbtn{
  width:38px;
  height:38px;
  border:0;
  border-radius:10px;
  background:#f0f2f1;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--brg-900);
  cursor:pointer;
  position:relative;
}
.pf-head .hbtn svg{ width:20px; height:20px; }
.pf-edit{
  padding:0 16px 8px;
}
.pf-edit .pf-fields{ gap:8px; }

/* ---------- Каталог: 3 столбца, плашки как у Ozon ---------- */
.cat3-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
  padding:12px 12px 24px;
  margin:0;
  list-style:none;
}
.cat3-tile{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:118px;
  border-radius:14px;
  background:#f4f6f5;
  padding:10px;
  text-decoration:none;
  overflow:hidden;
}
.cat3-tile .name{
  font-size:12px;
  line-height:15px;
  font-weight:600;
  color:var(--brg-900);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.cat3-tile svg{
  align-self:flex-end;
  width:52px;
  height:52px;
  color:var(--brg-300);
}

/* ---------- Профиль ---------- */
.pf-user{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px;
}
.pf-avatar{
  position:relative;
  width:64px;
  height:64px;
  border-radius:99px;
  background:var(--brg-100) center/cover no-repeat;
  flex-shrink:0;
  border:0;
  cursor:pointer;
  color:var(--brg-500);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.pf-avatar svg{ width:26px; height:26px; }
.pf-avatar .cam{
  position:absolute;
  right:0;
  bottom:0;
  width:22px;
  height:22px;
  border-radius:99px;
  background:var(--brg-500);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
}
.pf-avatar .cam svg{ width:13px; height:13px; }
.pf-fields{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.pf-fields input{
  height:38px;
  border:1px solid #e3e7e5;
  border-radius:10px;
  padding:0 10px;
  font:inherit;
  font-size:14px;
  color:var(--ink);
}
.pf-fields input:focus-visible{ outline:2px solid var(--brg-500); outline-offset:-1px; }
.pf-fields input[readonly]{
  background:#f4f6f5;
  color:var(--muted);
  border-color:transparent;
}
.pf-tiles{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
  padding:0 16px 16px;
}
.pf-tile{
  border-radius:14px;
  background:#f4f6f5;
  padding:12px 10px;
  text-decoration:none;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.pf-tile svg{ width:22px; height:22px; color:var(--brg-500); }
.pf-tile .t{
  font-size:13px;
  font-weight:600;
  color:var(--brg-900);
}
.pf-tile .s{
  font-size:11px;
  color:var(--muted);
}
.pf-section{
  padding:16px;
  border-top:8px solid #f2f4f3;
}
.pf-section h2{
  margin:0 0 12px;
  font-size:16px;
  font-weight:700;
  color:var(--brg-900);
}
.viewed-strip{
  display:flex;
  gap:8px;
  overflow-x:auto;
  scrollbar-width:none;
  margin:0 -16px;
  padding:0 16px;
}
.viewed-strip::-webkit-scrollbar{ display:none; }
.viewed-card{
  flex:0 0 96px;
  text-decoration:none;
}
.viewed-card img{
  width:96px;
  height:128px;
  object-fit:cover;
  border-radius:10px;
  display:block;
}
.viewed-card .p{
  margin-top:4px;
  font-size:13px;
  font-weight:700;
  color:var(--ink);
}
.viewed-card .t{
  margin-top:2px;
  font-size:11px;
  line-height:14px;
  font-weight:400;
  color:var(--muted);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.viewed-empty{
  font-size:13px;
  color:var(--muted);
}
.pf-menu{
  margin:0;
  padding:0;
  list-style:none;
}
.pf-menu a{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 0;
  border-bottom:1px solid #f0f2f1;
  text-decoration:none;
  font-size:15px;
  font-weight:600;
  color:var(--brg-900);
}
.pf-menu svg{ width:22px; height:22px; color:var(--brg-500); flex-shrink:0; }
.pf-menu .chev{ margin-left:auto; color:var(--icon-off); }
.pf-menu .chev svg{ width:16px; height:16px; transform:rotate(180deg); }

.toast{
  position:fixed;
  bottom:calc(var(--menu-h) + 76px + env(safe-area-inset-bottom));
  left:50%;
  transform:translateX(-50%);
  background:var(--brg-900);
  color:#fff;
  font-size:13px;
  font-weight:500;
  padding:10px 16px;
  border-radius:12px;
  z-index:30;
  white-space:nowrap;
}

/* ---------- Мои заявки ---------- */
.orders{
  padding:12px 16px 24px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.order{
  border:1px solid #e7ebe9;
  border-radius:14px;
  overflow:hidden;
}
.order summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:12px 14px;
  cursor:pointer;
  list-style:none;
}
.order summary::-webkit-details-marker{ display:none; }
.order .oname{
  font-size:15px;
  font-weight:700;
  color:var(--brg-900);
}
.order .odate{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}
.order .ostatus{
  flex-shrink:0;
  font-size:11px;
  line-height:16px;
  font-weight:600;
  color:#8a5320;
  background:#f8e8d8;
  border-radius:6px;
  padding:2px 8px;
}
.order .obody{
  border-top:1px solid #eef1f0;
  padding:10px 14px 12px;
}
.order .orow{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:4px 0;
  font-size:13px;
  line-height:18px;
  color:var(--title-ink);
}
.order .orow b{ flex-shrink:0; }
.ord-item{
  display:flex;
  gap:10px;
  padding:8px 0;
  text-decoration:none;
  border-bottom:1px solid #eef1f0;
}
.ord-item:last-of-type{ border-bottom:none; }
.ord-item-thumb{
  flex-shrink:0;
  width:56px;
  height:56px;
  border-radius:10px;
  overflow:hidden;
  background:#f2f4f3;
}
.ord-item-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.ord-item-body{ min-width:0; }
.ord-item-title{
  font-size:13px;
  font-weight:600;
  line-height:17px;
  color:var(--title-ink);
}
.ord-item-desc{
  font-size:12px;
  line-height:16px;
  color:var(--muted);
  margin-top:2px;
}
.ord-item-art{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color:var(--muted);
  margin-top:2px;
}
.ord-item-art code{
  font-family:inherit;
  background:#eef1f0;
  border-radius:4px;
  padding:1px 6px;
  color:var(--brg-900);
}
.ord-art-copy{
  border:0;
  background:none;
  padding:2px;
  width:20px;
  height:20px;
  color:var(--muted);
  cursor:pointer;
  flex-shrink:0;
}
.ord-art-copy svg{ width:100%; height:100%; }
.ord-item-price{
  font-size:13px;
  font-weight:700;
  color:var(--brg-900);
  margin-top:4px;
}
.order .ototal{
  margin-top:6px;
  padding-top:8px;
  border-top:1px solid #eef1f0;
  font-weight:600;
  color:var(--brg-900);
}

/* ---------- Вопросы и ответы ---------- */
.faq{
  padding:12px 16px 24px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.qa{
  border:1px solid #e7ebe9;
  border-radius:14px;
  padding:0 14px;
}
.qa summary{
  padding:13px 0;
  font-size:15px;
  font-weight:600;
  color:var(--brg-900);
  cursor:pointer;
  list-style:none;
  position:relative;
}
.qa summary::-webkit-details-marker{ display:none; }
.qa summary::after{
  content:"+";
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
  font-size:18px;
  color:var(--brg-500);
}
.qa[open] summary::after{ content:"−"; }
.qa p{
  margin:0 0 13px;
  font-size:14px;
  line-height:20px;
  color:var(--title-ink);
}
.qa-btns{
  display:flex;
  gap:8px;
  margin-bottom:13px;
}
.qa-btns .add-btn{
  text-decoration:none;
  padding:10px 0;
}
.qa-btns .add-btn.ghost{
  background:#f0f2f1;
  color:var(--brg-700);
}

/* ---------- Сменить язык ---------- */
.langs{
  padding:12px 16px 24px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.lang-row{
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid #e7ebe9;
  border-radius:14px;
  padding:14px;
  cursor:pointer;
}
.lang-row .check{
  width:20px;
  height:20px;
  border-radius:99px;
  border:1.5px solid #cfd6d3;
  flex-shrink:0;
  position:relative;
}
.lang-row.on{ border-color:var(--brg-500); background:#f7faf9; }
.lang-row.on .check{
  border-color:var(--brg-500);
  background:var(--brg-500);
}
.lang-row.on .check::after{
  content:"";
  position:absolute;
  left:6px;
  top:3px;
  width:4px;
  height:9px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}
.lang-row svg{ width:22px; height:22px; color:var(--brg-500); flex-shrink:0; }
.lang-row .ln{
  font-size:15px;
  font-weight:600;
  color:var(--brg-900);
}
.lang-row .ls{
  margin-top:2px;
  font-size:12px;
  color:var(--muted);
}
.pf-menu .cur{
  margin-left:auto;
  font-size:13px;
  font-weight:500;
  color:var(--muted);
}
.pf-menu .cur + .chev{ margin-left:8px; }

/* ---------- Карточка товара ---------- */
.pd-gallery{
  position:relative;
  margin:0;
}
.pd-strip{
  display:flex;
  aspect-ratio:3/4;
  border-radius:0 0 16px 16px;
  overflow:hidden;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
  background:#f2f4f3;
}
.pd-strip::-webkit-scrollbar{ display:none; }
.pd-strip img, .pd-strip video{
  flex:0 0 100%;
  width:100%;
  height:100%;
  object-fit:cover;
  scroll-snap-align:start;
  display:block;
}
.pd-topbar{
  position:absolute;
  top:12px;
  left:12px;
  right:12px;
  display:flex;
  justify-content:space-between;
  pointer-events:none;
}
.pd-round{
  pointer-events:auto;
  width:36px;
  height:36px;
  border:0;
  border-radius:99px;
  background:rgba(255,255,255,.5);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--brg-900);
  cursor:pointer;
  text-decoration:none;
}
.pd-round svg{ width:20px; height:20px; }
.pd-round img{ width:22px; height:22px; }
.pd-dots{
  position:absolute;
  bottom:12px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:4px;
  pointer-events:none;
}
.pd-dots i{
  width:5px;
  height:5px;
  border-radius:99px;
  background:rgba(10,21,18,.2);
  transition:background .2s;
}
.pd-dots i.on{ background:var(--brg-500); }

.pd-main{ padding:16px 16px 8px; }
.pd-price-row{
  display:flex;
  align-items:baseline;
  gap:8px;
}
.pd-price{
  font-size:24px;
  line-height:30px;
  font-weight:700;
  color:var(--ink);
}
.pd-old{
  font-size:14px;
  font-weight:500;
  text-decoration:line-through;
  color:var(--muted);
}
.pd-off{
  font-size:14px;
  font-weight:700;
  color:var(--badge-discount-bg);
}
.pd-title{
  margin:8px 0 0;
  font-size:16px;
  line-height:22px;
  font-weight:500;
  color:var(--title-ink);
}
.pd-badges{
  display:flex;
  gap:4px;
  margin-top:8px;
}
.pd-rating{
  display:flex;
  align-items:center;
  gap:4px;
  margin-top:8px;
  font-size:13px;
  font-weight:500;
  color:var(--title-ink);
}
.pd-rating img{ width:14px; height:14px; }
.pd-rating .cnt{ color:var(--muted); }

.pd-section{
  padding:16px;
  border-top:8px solid #f2f4f3;
}
.pd-section h2{
  margin:0 0 12px;
  font-size:16px;
  line-height:22px;
  font-weight:700;
  color:var(--brg-900);
}
.pd-desc{
  margin:0;
  font-size:14px;
  line-height:20px;
  color:var(--title-ink);
}
.pd-desc.clamped{
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.pd-more{
  margin-top:8px;
  border:0;
  background:none;
  padding:0;
  font:inherit;
  font-size:14px;
  font-weight:600;
  color:var(--brg-500);
  cursor:pointer;
}
.pd-specs{
  margin:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.pd-specs div{
  display:flex;
  justify-content:space-between;
  gap:16px;
  font-size:14px;
  line-height:20px;
}
.pd-specs dt{
  color:var(--muted);
  flex-shrink:0;
}
.pd-specs dd{
  margin:0;
  text-align:right;
  color:var(--title-ink);
}
#pdReviewList{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:12px;
}
#pdReviewForm{ margin-top:8px; }
.pd-review{
  border-radius:12px;
  background:#f6f8f7;
  padding:12px;
}
.pd-review-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:4px;
}
.pd-review-name{
  font-size:14px;
  font-weight:600;
  color:var(--brg-900);
}
.pd-review-date{
  font-size:12px;
  color:var(--muted);
}
.pd-stars{
  display:flex;
  gap:2px;
  margin-bottom:6px;
  color:var(--star);
  font-size:13px;
  letter-spacing:1px;
}
.pd-stars img{ width:12px; height:12px; }
.pd-rate-input{
  display:flex;
  gap:4px;
  margin-bottom:8px;
}
.pd-rate-input button{
  font-size:28px;
  line-height:1;
  color:#d8ddda;
  border:0;
  background:none;
  padding:2px;
  cursor:pointer;
}
.pd-rate-input button.on{ color:var(--star); }
#pdReviewForm textarea{
  width:100%;
  min-height:80px;
  border:1px solid #e3e7e5;
  border-radius:12px;
  padding:10px 12px;
  font:inherit;
  font-size:14px;
  margin-bottom:8px;
  box-sizing:border-box;
}
.pd-review p{
  margin:0;
  font-size:13px;
  line-height:18px;
  color:var(--title-ink);
}
.pd-summary{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:12px;
}
.pd-summary .big{
  font-size:28px;
  line-height:32px;
  font-weight:700;
  color:var(--brg-900);
}
.pd-summary .sub{
  font-size:12px;
  color:var(--muted);
}

.pd-stock{
  margin-top:6px;
  display:flex;
  align-items:center;
  gap:6px;
  font-size:14px;
  line-height:20px;
  font-weight:500;
  color:var(--title-ink);
}
.pd-stock-ico{ display:flex; flex-shrink:0; color:var(--muted); }
.pd-stock-ico svg{ width:18px; height:18px; }
.pd-stock-num{ color:var(--badge-discount-bg); font-weight:700; }
.pd-stock.out{ color:var(--muted); }

/* арт/мин.заказ на карточке товара — размером как описание, но серым */
.pd-meta{
  margin-top:8px;
  font-size:14px;
  line-height:20px;
  font-weight:500;
  color:var(--muted);
}

/* Оптовые цены v3: список диапазонов с ценой за штуку и выгодой; активная строка по степперу */
.tiers2{
  margin-top:14px;
  border:1px solid #e7ebe9;
  border-radius:14px;
  overflow:hidden;
}
.tiers2 h2{
  margin:0;
  padding:10px 14px;
  font-size:13px;
  line-height:18px;
  font-weight:600;
  letter-spacing:.02em;
  color:var(--brg-700);
  background:#f4f8f6;
}
.tiers2 .trow{
  display:flex;
  align-items:center;
  gap:8px;
  padding:11px 14px;
  border-top:1px solid #eef1f0;
}
.tiers2 .trow .check{
  width:18px;
  height:18px;
  border-radius:99px;
  border:1.5px solid #cfd6d3;
  flex-shrink:0;
  position:relative;
}
.tiers2 .trow.on .check{
  border-color:var(--brg-500);
  background:var(--brg-500);
}
.tiers2 .trow.on .check::after{
  content:"";
  position:absolute;
  left:5px;
  top:2px;
  width:4px;
  height:8px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}
.tiers2 .range{
  font-size:14px;
  font-weight:600;
  color:var(--brg-900);
}
.tiers2 .save{
  font-size:11px;
  line-height:16px;
  font-weight:600;
  color:var(--brg-700);
  background:var(--brg-100);
  border-radius:6px;
  padding:0 6px;
}
.tiers2 .pp{
  margin-left:auto;
  font-size:15px;
  font-weight:700;
  color:var(--ink);
}
.tiers2 .pp i{
  font-style:normal;
  font-size:12px;
  font-weight:500;
  color:var(--muted);
}
.tiers2 .trow.on{ background:#f7faf9; }
.tiers2 .trow.on .pp{ color:var(--brg-700); }

.pd-buybar{
  position:fixed;
  bottom:calc(var(--menu-h) + env(safe-area-inset-bottom));
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:var(--page-max);
  background:var(--surface);
  padding:8px 16px;
  box-shadow:0 -4px 16px rgba(10,21,18,.06);
  z-index:15;
  display:flex;
  gap:8px;
  align-items:stretch;
}
.pd-buybar .stepper{
  flex-shrink:0;
  height:46px;
}
.pd-buybar .stepper button{
  width:40px;
  height:44px;
}
.pd-buybar .stepper span{ min-width:40px; }
.pd-buybar .add-btn{
  flex:1;
  padding:12px 0;
  border-radius:12px;
  font-size:16px;
}
.stepper .qty input{
  width:48px;
  height:30px;
  border:0;
  text-align:center;
  font:inherit;
  font-size:14px;
  font-weight:600;
  color:var(--ink);
  outline:none;
  -moz-appearance:textfield;
}
.stepper .qty input::-webkit-outer-spin-button,
.stepper .qty input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.pd-page{ padding-bottom:calc(var(--menu-h) + 72px + env(safe-area-inset-bottom)); }

/* ---------- Селлер-панель (партнёр-склад) ---------- */
.sl-back{
  width:32px;
  height:32px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  text-decoration:none;
}
.sl-back svg{ width:22px; height:22px; display:block; }
.sl-header{
  position:sticky;
  top:0;
  z-index:18;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:12px 16px;
  background:linear-gradient(95.41deg,var(--brg-500),var(--brg-700));
  color:#fff;
}
.sl-header .t{
  font-size:17px;
  font-weight:700;
}
.sl-header .s{
  font-size:12px;
  opacity:.75;
  margin-top:2px;
}
.sl-add{
  border:0;
  border-radius:12px;
  background:rgba(255,255,255,.15);
  color:#fff;
  font:inherit;
  font-size:14px;
  font-weight:600;
  padding:10px 14px;
  cursor:pointer;
  flex-shrink:0;
}
.sl-list{
  list-style:none;
  margin:0;
  padding:12px 16px 32px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.sl-item{
  display:flex;
  gap:12px;
  border:1px solid #e7ebe9;
  border-radius:14px;
  padding:10px;
}
.sl-item img{
  width:64px;
  height:84px;
  object-fit:cover;
  border-radius:8px;
  flex-shrink:0;
  background:#f0f2f1;
}
.sl-item .noimg{
  width:64px;
  height:84px;
  border-radius:8px;
  flex-shrink:0;
  background:#f0f2f1;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--icon-off);
}
.sl-item .info{ flex:1; min-width:0; }
.sl-item .name{
  margin:0;
  font-size:14px;
  line-height:18px;
  font-weight:600;
  color:var(--brg-900);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.sl-item .meta{
  margin-top:4px;
  font-size:12px;
  color:var(--muted);
}
.sl-item .row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
  flex-wrap:wrap;
}
.sl-status{
  font-size:11px;
  line-height:16px;
  font-weight:600;
  border-radius:6px;
  padding:2px 8px;
}
.sl-status.review{ color:#8a5320; background:#f8e8d8; }
.sl-status.published{ color:var(--brg-700); background:var(--brg-100); }
.sl-item .sl-status-row{ margin-bottom:4px; }
.sl-btn{
  border:0;
  border-radius:9px;
  background:#f0f2f1;
  padding:6px 12px;
  font:inherit;
  font-size:12px;
  font-weight:600;
  color:var(--brg-700);
  cursor:pointer;
}
.sl-btn.primary{
  background:var(--brg-500);
  color:#fff;
}
.sl-btn.danger{ color:#b3261e; }
.sl-empty{
  text-align:center;
  padding:48px 24px;
  color:var(--muted);
  font-size:14px;
  line-height:20px;
}
.sl-full{
  width:100%;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid #eef1f0;
}
.sl-photos-view{
  display:flex;
  gap:6px;
  overflow-x:auto;
  margin-bottom:6px;
}
.sl-photos-view img{
  width:56px;
  height:72px;
  object-fit:cover;
  border-radius:8px;
  flex-shrink:0;
  background:#f0f2f1;
}
.kv-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:4px 0;
  font-size:13px;
  line-height:18px;
  color:var(--title-ink);
}
.kv-row span{ color:var(--muted); }
.kv-row b{ flex-shrink:0; text-align:right; }
.kv-label{
  margin-top:8px;
  font-size:12px;
  font-weight:600;
  color:var(--brg-700);
}
.kv-desc{
  font-size:13px;
  line-height:18px;
  color:var(--title-ink);
  margin-top:2px;
}

/* форма товара */
.sl-form{
  padding:12px 16px 32px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.sl-field label{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--brg-900);
  margin-bottom:6px;
}
.sl-field .hint{
  font-size:11px;
  font-weight:400;
  color:var(--muted);
}
.sl-field input[type=text],
.sl-field input[type=number],
.sl-field select,
.sl-field textarea{
  width:100%;
  min-height:46px;
  border:1px solid #e3e7e5;
  border-radius:12px;
  padding:12px;
  font:inherit;
  font-size:15px;
  color:var(--ink);
  background:var(--surface);
}
.sl-field textarea{ min-height:88px; resize:vertical; }
.sl-field input:focus-visible,
.sl-field select:focus-visible,
.sl-field textarea:focus-visible{
  outline:2px solid var(--brg-500);
  outline-offset:-1px;
}
.sl-two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.sl-photos{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.sl-photo{
  position:relative;
  width:72px;
  height:96px;
  border-radius:10px;
  overflow:hidden;
}
.sl-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.sl-photo .rm{
  position:absolute;
  top:4px;
  right:4px;
  width:20px;
  height:20px;
  border:0;
  border-radius:99px;
  background:rgba(10,21,18,.65);
  color:#fff;
  font-size:12px;
  line-height:1;
  cursor:pointer;
}
.sl-addphoto{
  width:72px;
  height:96px;
  border:1.5px dashed #cfd6d3;
  border-radius:10px;
  background:none;
  color:var(--brg-500);
  font-size:24px;
  cursor:pointer;
}
.sl-photo-busy{
  width:72px;
  height:96px;
  border-radius:10px;
  background:#f0f2f1;
  display:flex;
  align-items:center;
  justify-content:center;
}
.sl-video-preview{
  position:relative;
  width:120px;
  height:96px;
  border-radius:10px;
  overflow:hidden;
}
.sl-video-preview video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.sl-video-preview .rm{
  position:absolute;
  top:4px;
  right:4px;
  width:20px;
  height:20px;
  border:0;
  border-radius:99px;
  background:rgba(10,21,18,.65);
  color:#fff;
  font-size:12px;
  line-height:1;
  cursor:pointer;
}
.sl-video-busy{
  display:flex;
  align-items:center;
  gap:8px;
  height:96px;
  padding:0 12px;
  font-size:13px;
  color:var(--muted);
}
.spin{
  width:16px;
  height:16px;
  border-radius:99px;
  border:2px solid #d8ddda;
  border-top-color:var(--brg-500);
  animation:sl-spin .7s linear infinite;
  flex-shrink:0;
}
@keyframes sl-spin{ to{ transform:rotate(360deg); } }
.sl-spec-row{
  display:grid;
  grid-template-columns:1fr 1fr 32px;
  gap:6px;
  margin-bottom:6px;
}
.sl-spec-row input{ min-height:40px !important; padding:8px 10px !important; font-size:14px !important; }
.sl-spec-row .rm{
  border:0;
  background:#f0f2f1;
  border-radius:9px;
  color:#b3261e;
  font-size:16px;
  cursor:pointer;
}
.sl-addspec{
  border:0;
  background:none;
  padding:0;
  font:inherit;
  font-size:13px;
  font-weight:600;
  color:var(--brg-500);
  cursor:pointer;
  text-align:left;
}
.sl-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.sl-tag-chk{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid #e3e7e5;
  background:#f6f8f7;
  border-radius:99px;
  padding:9px 14px;
  font-size:13px;
  font-weight:500;
  color:var(--brg-900);
  cursor:pointer;
  user-select:none;
}
.sl-tag-chk input{ margin:0; width:17px; height:17px; flex-shrink:0; }
.sl-tag-chk:has(input:checked){
  background:var(--brg-500);
  border-color:var(--brg-500);
  color:#fff;
}
.sl-cost{
  border:1px solid #C6B99F;
  background:#EAE7E1;
  border-radius:12px;
  padding:12px;
}
.sl-cost label{ color:#5B513E; }
.sl-cost input{ background:#fff !important; }
.sl-cost .hint{ color:#897A5D; }
.sl-form .add-btn{
  padding:13px 0;
  border-radius:12px;
  font-size:16px;
}
.sl-cancel{
  border:0;
  background:#f0f2f1;
  border-radius:12px;
  padding:13px 0;
  font:inherit;
  font-size:15px;
  font-weight:600;
  color:var(--brg-700);
  cursor:pointer;
}

/* ---------- Админка владельца ---------- */
.ad-tabs{
  position:sticky;
  top:64px;
  z-index:17;
  display:flex;
  gap:6px;
  padding:10px 16px;
  background:var(--surface);
  border-bottom:1px solid #eef1f0;
  overflow-x:auto;
}
.ad-tabs .ad-tab{ flex-shrink:0; }
.ad-tab{
  border:0;
  border-radius:99px;
  background:#f0f2f1;
  padding:8px 14px;
  font:inherit;
  font-size:13px;
  font-weight:600;
  color:var(--brg-700);
  cursor:pointer;
}
.ad-tab.on{
  background:var(--brg-500);
  color:#fff;
}
.ad-tab .n{
  display:inline-block;
  min-width:18px;
  margin-left:4px;
  border-radius:99px;
  background:rgba(255,255,255,.25);
  font-size:11px;
  text-align:center;
}
.ad-tab:not(.on) .n{ background:#dfe4e2; }
.ad-section{ padding:12px 16px 32px; }
.ad-note{
  font-size:12px;
  line-height:16px;
  color:var(--muted);
  margin:0 0 12px;
}
.ad-tag-row{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 0;
  border-bottom:1px solid #eef1f0;
}
.ad-tag-label{
  flex:1;
  font-size:14px;
  font-weight:600;
  color:var(--brg-900);
}
.ad-tag-add{
  display:flex;
  gap:8px;
  margin-top:12px;
}
.ad-tag-add input{
  flex:1;
  border:1px solid #e3e7e5;
  border-radius:10px;
  padding:10px 12px;
  font:inherit;
  font-size:14px;
}
.ad-banner-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid #eef1f0;
}
.ad-banner-thumb{
  flex-shrink:0;
  width:64px;
  height:40px;
  border-radius:8px;
  overflow:hidden;
  background:#f2f4f3;
}
.ad-banner-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.ad-banner-info{ flex:1; min-width:0; }
.ad-banner-title{
  font-size:13px;
  font-weight:600;
  color:var(--brg-900);
  white-space:pre-line;
}
.ad-banner-chip{
  display:inline-block;
  margin-top:2px;
  font-size:11px;
  color:#fff;
  border-radius:6px;
  padding:1px 6px;
}
.ad-banner-chip.green{ background:var(--brg-500); }
.ad-banner-chip.red{ background:var(--badge-discount-bg); }
.ad-banner-chip.dark{ background:var(--brg-900); }
.ad-banner-actions{ display:flex; gap:4px; flex-shrink:0; }
.ad-banner-actions button{
  border:1px solid #e3e7e5;
  background:#fff;
  border-radius:8px;
  width:28px;
  height:28px;
  font-size:14px;
  color:var(--brg-900);
  cursor:pointer;
}
.ad-banner-form{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid #eef1f0;
}
.ad-banner-ink{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  color:var(--title-ink);
  margin-bottom:12px;
}
.ad-review-row{
  border:1px solid #eef1f0;
  border-radius:12px;
  padding:12px;
  margin-bottom:10px;
}
.ad-review-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:2px;
}
.ad-review-head b{ font-size:14px; color:var(--brg-900); }
.ad-review-stars{ color:var(--star); font-size:13px; letter-spacing:1px; }
.ad-review-name{ font-size:12px; color:var(--muted); margin-bottom:6px; }
.ad-review-text{ font-size:13px; color:var(--title-ink); margin:0 0 10px; }
.ad-money{
  display:flex;
  gap:12px;
  margin-top:6px;
  font-size:12px;
  flex-wrap:wrap;
}
.ad-money span{ color:var(--muted); }
.ad-money b{ color:var(--brg-900); }
.ad-money .margin{ color:var(--brg-500); font-weight:700; }
.sl-status.rejected{ color:#b3261e; background:#fbe3e1; }
.sl-status.hidden{ color:var(--muted); background:#eef0ef; }
.ad-order-status{
  margin-left:auto;
  border:1px solid #e3e7e5;
  border-radius:9px;
  padding:6px 8px;
  font:inherit;
  font-size:12px;
  font-weight:600;
  color:var(--brg-700);
  background:var(--surface);
}
.order .contact{
  font-size:13px;
  color:var(--title-ink);
  margin-bottom:6px;
}
.order .contact b{ color:var(--brg-900); }
.order .oart{
  font-size:11px;
  color:var(--muted);
  margin-top:1px;
}
.order .ordercomment{
  font-size:13px;
  line-height:18px;
  color:var(--title-ink);
  background:#f6f8f7;
  border-radius:8px;
  padding:6px 8px;
  margin-bottom:8px;
}

/* ---------- Страницы-заглушки ---------- */
.stub{
  min-height:calc(100vh - 120px - var(--menu-h) - 40px);
  min-height:calc(100dvh - 120px - var(--menu-h) - 40px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:32px 24px;
  gap:8px;
}
.stub-icon{
  width:64px;
  height:64px;
  border-radius:20px;
  background:var(--brg-100);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--brg-500);
  margin-bottom:8px;
}
.stub-icon svg{ width:32px; height:32px; }
.stub h1{
  margin:0;
  font-size:20px;
  line-height:26px;
  font-weight:700;
  color:var(--brg-900);
}
.stub p{
  margin:0;
  font-size:14px;
  line-height:20px;
  color:var(--muted);
  max-width:280px;
}
.stub-plan{
  margin-top:24px;
  width:100%;
  max-width:320px;
  text-align:left;
  background:#f6f8f7;
  border-radius:16px;
  padding:16px;
}
.stub-plan h2{
  margin:0 0 8px;
  font-size:12px;
  line-height:16px;
  font-weight:600;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--brg-500);
}
.stub-plan ul{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.stub-plan li{
  font-size:13px;
  line-height:18px;
  color:var(--title-ink);
  padding-left:20px;
  position:relative;
}
.stub-plan li::before{
  content:"";
  position:absolute;
  left:0;
  top:5px;
  width:8px;
  height:8px;
  border-radius:99px;
  background:var(--brg-300);
}

/* ---------- Строка топ-категорий на главной ---------- */
.catstrip-wrap{
  padding:12px 0 4px;
  overflow-x:auto;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.catstrip-wrap::-webkit-scrollbar{ display:none; }
.catstrip{
  display:flex;
  gap:10px;
  padding:0 12px;
  width:max-content;
}
.catstrip-tile{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  width:64px;
  flex-shrink:0;
  text-decoration:none;
}
.catstrip-tile svg{
  width:28px;
  height:28px;
  padding:12px;
  box-sizing:content-box;
  border-radius:99px;
  background:var(--brg-100);
  color:var(--brg-500);
}
.catstrip-tile span{
  font-size:11px;
  line-height:13px;
  font-weight:600;
  color:var(--title-ink);
  text-align:center;
}
.catstrip-more svg{ background:#f0f2f1; color:var(--brg-700); }

/* ---------- Лента-рилс (каталог по умолчанию) ---------- */
.reels{
  list-style:none;
  margin:0;
  padding:0;
  height:calc(100dvh - var(--menu-h) - env(safe-area-inset-bottom));
  overflow-y:auto;
  scroll-snap-type:y mandatory;
  background:#000;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.reels::-webkit-scrollbar{ display:none; }
.reel{
  position:relative;
  height:100%;
  scroll-snap-align:start;
  scroll-snap-stop:always;
}
.reel video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  background:#000;
}
.reel-mute{
  position:absolute;
  top:12px;
  right:12px;
  width:36px;
  height:36px;
  border:0;
  border-radius:99px;
  background:rgba(10,21,18,.5);
  color:#fff;
  cursor:pointer;
}
.reel-mute svg{ width:18px; height:18px; }
.reel-card{
  position:absolute;
  left:10px;
  right:76px;
  bottom:16px;
  max-width:280px;
  display:flex;
  flex-direction:column;
  gap:8px;
  background:#fff;
  border-radius:16px;
  padding:8px;
  box-shadow:0 8px 24px rgba(10,21,18,.25);
  cursor:pointer;
}
.reel-card-top{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.reel-thumb{
  width:48px;
  height:48px;
  border-radius:10px;
  overflow:hidden;
  flex-shrink:0;
  background:#f0f2f1;
}
.reel-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.reel-info{ flex:1; min-width:0; }
.reel-price{
  display:flex;
  align-items:center;
  gap:6px;
}
.reel-info b{
  display:block;
  font-size:15px;
  color:var(--brg-900);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.reel-info span{
  display:block;
  font-size:12px;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.reel-card .add-btn{
  width:100%;
  border:0;
  border-radius:10px;
  background:var(--brg-500);
  color:#fff;
  font:inherit;
  font-size:13px;
  font-weight:600;
  padding:10px 14px;
  cursor:pointer;
}
.reel-card .add-btn.added{ background:var(--brg-700); }

/* ---------- Столбик лайк/отзывы/поделиться справа ---------- */
.reel-actions{
  position:absolute;
  right:12px;
  bottom:20px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
}
.reel-actions button{
  border:0;
  background:none;
  padding:0;
  color:#fff;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.4));
}
.reel-actions svg{ width:30px; height:30px; }
.reel-like svg .h-fill{ fill:#fff; fill-opacity:.85; }
.reel-like svg .h-line{ fill:#fff; }
.reel-like.saved svg .h-fill{ fill:var(--badge-discount-bg); fill-opacity:1; }
.reel-like.saved svg .h-line{ fill:var(--badge-discount-bg); }
.reel-count{
  font-size:12px;
  font-weight:600;
}
