/* ================= Korea Shop: шрифт названия, заставка, розовая шапка ================= */
@font-face { font-family: "Korea Serif"; font-weight: 600; src: url(fonts/cormorant-garamond-latin-600-normal.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; font-display: swap; }
@font-face { font-family: "Korea Serif"; font-weight: 600; src: url(fonts/cormorant-garamond-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }
@font-face { font-family: "Korea Serif"; font-weight: 500; src: url(fonts/cormorant-garamond-latin-500-normal.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; font-display: swap; }
@font-face { font-family: "Korea Serif"; font-weight: 500; src: url(fonts/cormorant-garamond-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }

/* Название магазина — как на логотипе: KOREA SHOP с разрядкой */
.brand { font-family: "Korea Serif", "Palatino Linotype", Georgia, serif; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: 24px; line-height: 1.15; padding: 0 .05em;
  background: linear-gradient(180deg, var(--accent2), var(--accent) 55%, var(--accent3)); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.brand.mid { font-size: 34px; }
.brand.big { font-size: 44px; }
.drawer-head .brand { font-size: 26px; }
.watermark { font-family: "Korea Serif", Georgia, serif; font-weight: 600; text-transform: uppercase; letter-spacing: .2em; font-size: 16px; }

/* Тема «Korea Shop»: розовая шапка и меню, белое название */
[data-theme="korea"] .topbar { background: linear-gradient(180deg, #ee6a95, #d23c6e); border-bottom-color: #ffd1dc; box-shadow: 0 2px 0 rgba(255, 209, 220, .5), 0 8px 24px rgba(210, 60, 110, .18); }
[data-theme="korea"] .topbar .brand, [data-theme="korea"] .drawer-head .brand { background-image: linear-gradient(180deg, #ffffff, #ffe6ee); }
[data-theme="korea"] .topbar .burger span { background: #fff; }
[data-theme="korea"] .topbar .burger:hover { background: rgba(255, 255, 255, .14); }
[data-theme="korea"] .topbar .crumb { color: #fff2f6; }
[data-theme="korea"] .topbar .crumb::before { background: rgba(255, 255, 255, .45); }
[data-theme="korea"] .topbar .clock { color: #ffe3ec; }
[data-theme="korea"] .topbar .clock b { color: #fff; }
[data-theme="korea"] .topbar .sync-badge { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .35); color: #fff; }
[data-theme="korea"] .drawer-head { background: linear-gradient(180deg, #ee6a95, #d23c6e); border-bottom: 2px solid #ffd1dc; }
[data-theme="korea"] .btn.primary { background: linear-gradient(180deg, #ee6a95, #d23c6e); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 14px rgba(210, 60, 110, .25); }
[data-theme="korea"] .login { background: radial-gradient(900px 520px at 50% 0%, rgba(244, 143, 177, .22), transparent 65%), radial-gradient(700px 420px at 50% 110%, rgba(255, 209, 220, .35), transparent 70%), var(--bg); }

/* ================= Заставка при открытии: лепестки сакуры и логотип ================= */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(70vmax 70vmax at 50% 45%, #ffffff 0%, #fde4ec 50%, #f6b9cd 100%); transition: opacity .6s ease, visibility .6s; }
#splash[hidden] { display: none; }
#splash.out { opacity: 0; visibility: hidden; }
#splash.out .sp-logo { transform: scale(1.08); transition: transform .6s ease; }
body.splashing #login { display: none; }
.sp-glow { position: absolute; inset: 0; pointer-events: none; }
.sp-glow i { position: absolute; top: -8%; width: 16px; height: 13px; border-radius: 80% 0 80% 0; opacity: .85;
  background: linear-gradient(135deg, #ffd1dc, #f48fb1); animation: spPetal linear infinite; }
.sp-logo { position: relative; width: min(340px, 72vw); aspect-ratio: 1; border-radius: 50%;
  animation: spIn 1.1s cubic-bezier(.2, .9, .25, 1.15) both; filter: drop-shadow(0 22px 40px rgba(142, 31, 71, .28)); }
.sp-logo img { width: 100%; height: 100%; display: block; user-select: none; }
.sp-shine { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; }
.sp-shine::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 34%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); animation: spShine 1.3s .9s ease-in-out both; }
.sp-line { position: absolute; left: 50%; top: calc(45% + min(170px, 36vw) + 46px); width: 0; height: 2px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #d23c6e, transparent); animation: spLine 1.4s 1s ease forwards; }
@keyframes spIn { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes spShine { from { left: -60%; } to { left: 130%; } }
@keyframes spLine { to { width: min(320px, 70vw); } }
@keyframes spPetal { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(-60px, 115vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .sp-logo, .sp-glow i, .sp-shine::after, .sp-line { animation-duration: .01s; } }

/* ================= Остатки на телефоне: простой список ================= */
.ps-head { margin-bottom: 12px; }
.ps-search .inp { height: 50px; font-size: 16px; border-radius: 14px; }
.ps-search svg { top: 16px; }
.ps-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; margin: 0 -2px; scrollbar-width: none; }
.ps-chips::-webkit-scrollbar { display: none; }
.ps-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border2); font-weight: 600; font-size: 14px; color: var(--text); }
.ps-chip small { font-size: 12px; color: var(--muted); font-weight: 600; }
.ps-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ps-chip.on small { color: var(--on-accent); opacity: .85; }
.ps-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); padding: 8px 2px 10px; }
.ps-sum b { color: var(--text); }
.ps-list { display: flex; flex-direction: column; gap: 8px; }
.ps-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; min-height: 62px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); color: var(--text); }
.ps-item:active { transform: scale(.99); background: var(--hover); }
.ps-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ps-name b { font-size: 15.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ps-name small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-price { font-size: 14px; font-weight: 600; color: var(--accent3); white-space: nowrap; }
.ps-qty { min-width: 54px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ps-qty b { font-size: 18px; font-weight: 700; color: var(--accent); }
.ps-qty small { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.ps-item.low .ps-qty { background: rgba(234, 88, 12, .12); } .ps-item.low .ps-qty b { color: var(--warn); }
.ps-item.empty .ps-qty { background: var(--red-soft); } .ps-item.empty .ps-qty b { color: var(--red); }
.ps-item.empty .ps-name b { color: var(--muted); }
.ps-full { width: 100%; margin: 16px 0 90px; }
.ps-add { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; display: inline-flex; align-items: center; gap: 8px;
  height: 54px; padding: 0 22px 0 18px; border-radius: 27px; background: linear-gradient(180deg, var(--accent2), var(--accent)); color: var(--on-accent);
  font-weight: 700; font-size: 15.5px; box-shadow: 0 8px 22px var(--glow-strong); }
.ps-add svg { width: 22px; height: 22px; }
.ps-back { margin-bottom: 12px; }
body.menu-open .ps-add { display: none; }

/* окошко товара на телефоне */
.pi-sheet .modal-head h3 { overflow-wrap: anywhere; }
.pi-cat { color: var(--muted); font-size: 13.5px; margin: -4px 0 14px !important; }
.pi-vars { display: flex; flex-direction: column; gap: 8px; }
.pi-var { display: grid; grid-template-columns: 1fr 48px 76px 48px; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.pi-var.hl { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pi-vl { font-weight: 600; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.pi-btn { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 26px; font-weight: 600; line-height: 1; }
.pi-btn:active { background: var(--accent); color: var(--on-accent); }
.pi-q { height: 48px; text-align: center; font-size: 19px; font-weight: 700; padding: 0 4px; }
.pi-total { margin: 12px 2px 4px; color: var(--muted); font-size: 14px; }
.pi-total b { color: var(--text); }
.pi-more { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.pi-more summary { cursor: pointer; color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 8px; padding: 6px 0; list-style: none; }
.pi-more summary::-webkit-details-marker { display: none; }
.pi-more summary svg { width: 18px; height: 18px; }
.pi-more[open] summary { margin-bottom: 8px; }
.pi-more .field { margin-bottom: 10px; }
.pi-more .field label, .pi-sheet .field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.pi-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pi-sheet .field { margin-bottom: 12px; }
.pi-sheet .inp { width: 100%; }
.pi-foot { margin-top: 16px; }
.pi-foot .btn { min-height: 46px; flex: 1; justify-content: center; }
.pi-choice { display: flex; flex-direction: column; gap: 10px; }
.pi-choice .btn { min-height: 48px; justify-content: center; }
.pk-list { margin-top: 12px; max-height: 55vh; overflow-y: auto; }

@media (max-width: 760px) {
  /* окошки на телефоне — во всю ширину, снизу */
  .modal-bg:has(.pi-sheet) { place-items: end center; }
  .modal:has(.pi-sheet) { width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; overflow-y: auto; animation: piUp .22s ease; }
  .topbar .brand { font-size: 18px; letter-spacing: .1em; }
  .brand.big { font-size: 34px; }
}
@keyframes piUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
