/* Viks SALE v4 — розовый леопард сверху и снизу, светлые читаемые карточки в центре */
:root {
  --hot: #ff1478;
  --hot2: #ff3d92;
  --hotd: #d4005c;
  --bg: #ffe4f0;
  --card: #fff6fa;
  --row: #ffffff;
  --line: #ffc7de;
  --soft: #ffd9ea;
  --ink: #2b0a1a;
  --ink2: #7a3a58;
  --dark: #24121b;
  --dark2: #33202a;
  --leo: url("assets/leopard.jpg?v=4");
  --bowimg: url("assets/bow.svg?v=4");
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 84px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg); min-height: 100vh;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
.hidden { display: none !important; }
#frame { min-height: 100vh; padding-bottom: calc(var(--nav-h) + 18px + var(--safe-b)); }

/* ---------- иконки (линейные SVG через маску, цвет = currentColor) ---------- */
.mi { display: inline-block; flex: 0 0 auto; width: 22px; height: 22px; background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.m-heart { -webkit-mask-image: url("assets/ic/heart.svg?v=4"); mask-image: url("assets/ic/heart.svg?v=4"); }
.m-tshirt { -webkit-mask-image: url("assets/ic/tshirt.svg?v=4"); mask-image: url("assets/ic/tshirt.svg?v=4"); }
.m-shirt { -webkit-mask-image: url("assets/ic/shirt.svg?v=4"); mask-image: url("assets/ic/shirt.svg?v=4"); }
.m-moon { -webkit-mask-image: url("assets/ic/moon.svg?v=4"); mask-image: url("assets/ic/moon.svg?v=4"); }
.m-shorts { -webkit-mask-image: url("assets/ic/shorts.svg?v=4"); mask-image: url("assets/ic/shorts.svg?v=4"); }
.m-sport { -webkit-mask-image: url("assets/ic/sport.svg?v=4"); mask-image: url("assets/ic/sport.svg?v=4"); }
.m-shoe { -webkit-mask-image: url("assets/ic/shoe.svg?v=4"); mask-image: url("assets/ic/shoe.svg?v=4"); }
.m-bag { -webkit-mask-image: url("assets/ic/bag.svg?v=4"); mask-image: url("assets/ic/bag.svg?v=4"); }
.m-dress { -webkit-mask-image: url("assets/ic/dress.svg?v=4"); mask-image: url("assets/ic/dress.svg?v=4"); }
.m-star { -webkit-mask-image: url("assets/ic/star.svg?v=4"); mask-image: url("assets/ic/star.svg?v=4"); }
.m-home { -webkit-mask-image: url("assets/ic/home.svg?v=4"); mask-image: url("assets/ic/home.svg?v=4"); }
.m-user { -webkit-mask-image: url("assets/ic/user.svg?v=4"); mask-image: url("assets/ic/user.svg?v=4"); }
.m-trash { -webkit-mask-image: url("assets/ic/trash.svg?v=4"); mask-image: url("assets/ic/trash.svg?v=4"); }
.m-search { -webkit-mask-image: url("assets/ic/search.svg?v=4"); mask-image: url("assets/ic/search.svg?v=4"); }
.m-chev { -webkit-mask-image: url("assets/ic/chev.svg?v=4"); mask-image: url("assets/ic/chev.svg?v=4"); }
.m-back { -webkit-mask-image: url("assets/ic/back.svg?v=4"); mask-image: url("assets/ic/back.svg?v=4"); }
.m-arrow { -webkit-mask-image: url("assets/ic/arrow.svg?v=4"); mask-image: url("assets/ic/arrow.svg?v=4"); }
.bow { display: inline-block; flex: 0 0 auto; width: 40px; height: 28px; background: var(--bowimg) center / contain no-repeat; }

/* ---------- шапка: леопардовая лента + логотип-«таблетка» ---------- */
#top { position: sticky; top: 0; z-index: 20; }
.hdr {
  position: relative; display: flex; align-items: center; justify-content: center; height: 96px; padding: 0 12px;
  background: var(--hot) var(--leo) center / 300px auto repeat; box-shadow: inset 0 -3px 0 #fff, 0 2px 8px rgba(120, 0, 50, .25);
}
.brand {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 196px; height: 58px; padding: 0 38px 0 26px;
  border-radius: 28px; background: linear-gradient(180deg, #fff 0%, #ffe3f0 100%); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--hot2), 0 4px 10px rgba(90, 0, 40, .35); line-height: 1.05;
}
.brand b { font-size: 22px; font-weight: 900; color: var(--ink); letter-spacing: .3px; }
.brand small { font-size: 11.5px; font-weight: 600; color: var(--ink2); margin-top: 2px; }
.brandbow { position: absolute; right: -14px; top: -10px; width: 50px; height: 34px; transform: rotate(14deg); filter: drop-shadow(0 2px 2px rgba(90, 0, 40, .35)); }
.back {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%); z-index: 2; display: flex; align-items: center; gap: 1px;
  height: 34px; padding: 0 10px 0 4px; border-radius: 18px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 700;
  box-shadow: 0 0 0 2px var(--hot2), 0 2px 6px rgba(90, 0, 40, .3);
}
.back .mi { width: 20px; height: 20px; color: var(--hot); }

#app { padding: 14px 12px 0; }
.view { animation: fade .16s ease-out; }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- карточки и заголовок раздела ---------- */
.card, .sheet { background: var(--card); border-radius: 22px; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line), 0 6px 16px rgba(160, 0, 70, .10); }
.sheet { padding: 4px 10px 12px; }
.card { padding: 14px; margin-bottom: 14px; }
.titlecard {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 14px 8px 16px; margin-bottom: 12px;
  background: var(--card); border-radius: 18px; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line), 0 4px 12px rgba(160, 0, 70, .08);
  font-size: 23px; font-weight: 900; color: var(--ink);
}
.titlecard span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet .titlecard { background: none; border: 0; box-shadow: none; padding: 8px 6px 4px; margin-bottom: 6px; border-bottom: 1.5px solid var(--line); border-radius: 0; }

/* ---------- главная: список категорий ---------- */
.catlist { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.catbtn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 12px 8px 8px; text-align: left;
  border-radius: 16px; background: var(--row); border: 1.5px solid var(--line); color: var(--ink); transition: transform .08s;
}
.catbtn:active { transform: scale(.98); }
.catbtn .ico { flex: 0 0 38px; height: 38px; border-radius: 11px; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--hotd); }
.catbtn .ico .mi { width: 22px; height: 22px; }
.catbtn .nm { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.catbtn .cnt { min-width: 26px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--soft); color: var(--hotd); font-size: 12.5px; font-weight: 800; line-height: 22px; text-align: center; }
.catbtn > .m-chev { width: 18px; height: 18px; color: #c2789b; }
.catbtn.all { background: linear-gradient(180deg, var(--hot2), var(--hot)); border-color: var(--hot); color: #fff; box-shadow: 0 4px 10px rgba(255, 20, 120, .35); }
.catbtn.all .ico { background: rgba(255, 255, 255, .22); color: #fff; }
.catbtn.all .cnt { background: #fff; color: var(--hotd); }
.catbtn.all > .m-chev { color: #fff; }

/* ---------- вкладки-«таблетки» ---------- */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: 18px; background: #fff; color: var(--ink); font-weight: 700; font-size: 14px;
  border: 1.5px solid var(--line); white-space: nowrap;
}
.pill small { font-weight: 800; color: var(--hotd); background: var(--soft); border-radius: 9px; padding: 1px 6px; margin-left: 6px; font-size: 11px; }
.pill.on { background: var(--hot); border-color: var(--hot); color: #fff; box-shadow: 0 3px 8px rgba(255, 20, 120, .35); }
.pill.on small { background: #fff; }

/* ---------- поиск ---------- */
.search {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; margin-bottom: 14px; border-radius: 16px;
  background: #fff; border: 1.5px solid var(--line);
}
.search .mi { color: var(--hot); width: 20px; height: 20px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.search input::placeholder { color: #a8738d; }
.search:focus-within { border-color: var(--hot2); box-shadow: 0 0 0 3px rgba(255, 61, 146, .18); }

/* ---------- сетка товаров ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile {
  position: relative; display: block; text-align: left; border-radius: 18px; overflow: hidden; background: #fff;
  border: 1.5px solid var(--line); box-shadow: 0 4px 12px rgba(160, 0, 70, .08); content-visibility: auto; contain-intrinsic-size: 160px 240px;
}
.tile .ph { position: relative; aspect-ratio: 1 / 1; background: var(--soft); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .cap { padding: 8px 10px 10px; }
.tile .nm { display: block; color: var(--ink); font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .pr { display: block; color: var(--hotd); font-weight: 900; font-size: 15px; }
.tile .pr span { color: var(--ink2); font-weight: 600; font-size: 12px; }
.tile.booked .ph img { filter: grayscale(.7) brightness(.85); }
.tile.booked .nm, .tile.booked .pr { opacity: .6; }
.tagb { position: absolute; left: 8px; bottom: 8px; background: rgba(36, 18, 27, .88); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 10px; }
.incart { position: absolute; right: 7px; top: 7px; width: 30px; height: 30px; border-radius: 50%; background: var(--hot); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(90, 0, 40, .3); }
.incart::after { content: ""; position: absolute; inset: 5px; background: #fff; -webkit-mask: url("assets/ic/bag.svg?v=4") center / contain no-repeat; mask: url("assets/ic/bag.svg?v=4") center / contain no-repeat; }
.favdot { position: absolute; left: 7px; top: 7px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(90, 0, 40, .25); }
.favdot::after { content: ""; position: absolute; inset: 6px; background: var(--hot); -webkit-mask: url("assets/ic/heart.svg?v=4") center / contain no-repeat; mask: url("assets/ic/heart.svg?v=4") center / contain no-repeat; }
.emptynote { text-align: center; padding: 28px 12px; color: var(--ink2); font-weight: 600; background: var(--card); border-radius: 18px; border: 1.5px dashed var(--line); }

/* ---------- кнопки ---------- */
.pbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 18px;
  background: linear-gradient(180deg, var(--hot2), var(--hot)); color: #fff; font-size: 17px; font-weight: 800;
  border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--hot), 0 6px 14px rgba(255, 20, 120, .35);
}
.pbtn .mi { width: 22px; height: 22px; }
.pbtn.wide { display: flex; width: 100%; margin: 4px 0 12px; }
.pbtn.big { min-height: 58px; font-size: 18px; }
.pbtn:active { transform: translateY(1px); }
.pbtn:disabled { opacity: .5; box-shadow: none; }
.pbtn.ghost { background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px var(--line); }
.pbtn.remove { background: var(--dark); box-shadow: 0 0 0 1.5px var(--dark), 0 6px 14px rgba(36, 18, 27, .3); }
.btnbow { position: absolute; left: 10px; top: 50%; transform: translateY(-50%) rotate(-10deg); width: 46px; height: 32px; background-image: url("assets/bow-white.svg?v=4"); filter: drop-shadow(0 1px 2px rgba(120, 0, 50, .45)); }
.hint { margin: 0 8px 10px; font-size: 13px; color: var(--ink2); text-align: center; }

/* ---------- корзина ---------- */
#c-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.cline { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 18px; padding: 10px; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line), 0 4px 12px rgba(160, 0, 70, .08); }
.cline img, .cline .noph { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: var(--soft); }
.cline .t { flex: 1; min-width: 0; }
.cline b { display: block; color: var(--ink); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cline .p { display: block; color: var(--ink); font-weight: 900; font-size: 16px; margin-top: 2px; }
.cline .s { display: block; color: var(--ink2); font-size: 12.5px; margin-top: 2px; }
.cline.off { opacity: .55; }
.cline.off .p { color: var(--hotd); font-weight: 700; font-size: 14px; }
.trash { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--hotd); display: flex; align-items: center; justify-content: center; }
.totalrow {
  display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 56px; margin-bottom: 12px; border-radius: 18px;
  background: var(--card); border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line); color: var(--ink); font-size: 18px; font-weight: 800;
}
.totalrow span { flex: 1; }
.totalrow b { font-size: 20px; font-weight: 900; }
.totalrow .mi { color: var(--hot2); width: 22px; height: 22px; }
.emptycart { text-align: center; padding: 34px 18px 22px; display: flex; flex-direction: column; align-items: center; }
.bigbow { display: block; width: 110px; height: 76px; background: var(--bowimg) center / contain no-repeat; margin: 0 auto 10px; filter: drop-shadow(0 3px 4px rgba(160, 0, 70, .25)); }
.emptycart h3 { margin: 4px 0 6px; color: var(--ink); font-size: 24px; font-weight: 900; }
.emptycart p { margin: 0 0 20px; color: var(--ink2); }
.emptycart .pbtn { width: 100%; }

/* ---------- карточка товара ---------- */
.photoframe { position: relative; border-radius: 22px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line), 0 6px 16px rgba(160, 0, 70, .12); margin-bottom: 12px; background: #fff; }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel img { flex: 0 0 100%; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; scroll-snap-align: center; background: var(--soft); }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px rgba(90, 0, 40, .25); }
.dots i.on { background: var(--hot); box-shadow: 0 0 0 2px #fff; }
.darkcard, .d-body { background: var(--card); color: var(--ink); border-radius: 20px; padding: 14px 16px; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line); }
.d-body { margin-bottom: 14px; }
.d-body h2 { margin: 0 0 4px; font-size: 21px; font-weight: 900; }
.price { color: var(--hotd); font-size: 23px; font-weight: 900; }
.meta { color: var(--ink2); font-size: 13px; margin-top: 4px; }
.d-body p { margin: 10px 0 0; padding-top: 10px; border-top: 1.5px solid var(--line); white-space: pre-line; color: var(--ink); }
.d-body p:empty { display: none; }
.actions { display: flex; gap: 12px; align-items: center; }
.actions .pbtn { flex: 1; }
.favbtn { flex: 0 0 56px; height: 56px; border-radius: 18px; background: #fff; color: var(--hot); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1.5px var(--line), 0 4px 10px rgba(160, 0, 70, .1); }
.favbtn .mi { width: 26px; height: 26px; }
.favbtn.on { background: var(--hot); color: #fff; box-shadow: 0 0 0 1.5px var(--hot), 0 4px 10px rgba(255, 20, 120, .35); }

/* ---------- бронь оформлена ---------- */
.donecard { padding: 22px 16px 16px; }
.r-list div { padding: 4px 0; color: var(--ink); }
.r-list div + div { border-top: 1px solid var(--line); }
.r-list .muted, .muted { color: var(--ink2); }
.warn { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: #fff3d6; color: #6b4a00; }
.r-hint { margin: 12px 0 0; color: var(--ink2); font-size: 14px; }
.r-hint b { color: var(--ink); }

/* ---------- профиль ---------- */
.me { display: flex; align-items: center; gap: 14px; }
.me .who { flex: 1; min-width: 0; }
.me b { display: block; font-size: 18px; font-weight: 900; color: var(--ink); }
.me small { display: block; color: var(--ink2); font-size: 13.5px; }
.me > .m-chev { width: 20px; height: 20px; color: #c2789b; }
.ava { flex: 0 0 56px; height: 56px; border-radius: 50%; background: var(--hot) center / cover no-repeat; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--hot2); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; color: #fff; }
.subhead { margin: 4px 6px 10px; font-size: 18px; font-weight: 900; color: var(--ink); }
#p-orders { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.order { background: var(--dark); color: #fff; border-radius: 18px; padding: 12px; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--hot2), 0 6px 14px rgba(36, 18, 27, .25); }
.order > small { color: #f3d6e4; }
.order .oh { display: flex; align-items: center; gap: 12px; }
.order .op { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: #4a2c3b; }
.order .oht { flex: 1; min-width: 0; }
.order .oh b { font-size: 16px; }
.order .oh small { color: #e9c3d6; font-size: 12.5px; }
.st { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 11px; white-space: nowrap; align-self: flex-start; color: #fff; }
.st.booked { background: var(--hot); }
.st.sold { background: #22b35e; }
.st.released { background: #7b6570; }
.oi { display: flex; gap: 10px; align-items: center; padding: 7px 0 0; margin-top: 8px; border-top: 1px solid rgba(255, 160, 205, .2); }
.oi img, .oi .noph { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; background: #4a2c3b; flex: 0 0 36px; }
.oi .t { flex: 1; min-width: 0; font-size: 14px; color: #fff; }
.oi .t span { display: block; color: #ffb3d4; font-size: 12.5px; }
.oi.released .t { opacity: .55; text-decoration: line-through; }
#p-orders .emptynote { color: var(--ink2); }

/* ---------- нижнее меню на леопардовой ленте ---------- */
#bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 8px; padding: 12px 10px calc(10px + var(--safe-b));
  background: var(--hot) var(--leo) center / 300px auto repeat; box-shadow: inset 0 3px 0 #fff, 0 -2px 10px rgba(120, 0, 50, .2);
}
#bottom button { flex: 1; display: flex; padding: 0; }
#bottom .nb {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 60px;
  border-radius: 16px; background: rgba(255, 246, 250, .94); color: var(--ink); font-size: 11.5px; font-weight: 800;
  box-shadow: 0 0 0 1.5px #fff, 0 2px 6px rgba(90, 0, 40, .25); transition: transform .12s, background .12s;
}
#bottom .nb .mi { width: 24px; height: 24px; color: var(--hotd); }
#bottom button.on .nb { background: linear-gradient(180deg, var(--hot2), var(--hot)); color: #fff; transform: translateY(-6px); box-shadow: 0 0 0 2px #fff, 0 8px 14px rgba(90, 0, 40, .45); }
#bottom button.on .nb .mi { color: #fff; }
.badge { position: absolute; top: 4px; right: calc(50% - 24px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--dark); color: #fff; font-size: 11px; line-height: 16px; text-align: center; border: 1.5px solid #fff; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 22px + var(--safe-b)); transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 8px;
  background: #fff; color: var(--ink); font-weight: 700; padding: 10px 16px; border-radius: 16px; font-size: 14px; width: max-content; max-width: 90vw; text-align: center;
  box-shadow: 0 0 0 2px var(--hot2), 0 6px 16px rgba(90, 0, 40, .3);
}
#toast::before { content: ""; flex: 0 0 26px; height: 18px; background: var(--bowimg) center / contain no-repeat; }
#loading { margin-top: 10px; }
