:root {
  --bg: #eceef3;
  --panel: #ffffff;
  --panel-soft: #f4f5f7;
  --text: #121417;
  --muted: #8e929b;
  --line: #e9ebef;
  --primary: #2f86e7;
  --danger: #f04e4e;
  --shadow: 0 30px 60px rgba(20, 31, 58, 0.12);
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --bottom-safe: calc(env(safe-area-inset-bottom, 0px) + 14px);
  font-family: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 32%),
    linear-gradient(180deg, #f0f2f6 0%, #dde3ee 100%);
  color: var(--text);
}

body {
  min-height: 100svh;
}

#root {
  min-height: 100svh;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.sprite-sheet {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.page-shell {
  display: flex;
  justify-content: center;
  padding: 16px;
  min-height: 100svh;
}

.device-frame {
  width: min(100%, 430px);
  min-height: calc(100svh - 32px);
  border-radius: 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.icon-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.icon-button.accent {
  color: var(--primary);
}

.icon-button svg,
.chip svg,
.search-field svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.miniapp {
  position: relative;
  min-height: calc(100svh - 32px);
  background: var(--panel);
  border-radius: 32px;
  display: flex;
  flex-direction: column;
}

.catalog-top {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 18px 10px;
}

.catalog-top h1 {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.toolbar {
  padding: 4px 18px 0;
}

.catalog-top.hidden,
.toolbar.hidden {
  display: none;
}

.chips-row {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.chips-row::-webkit-scrollbar,
.chip-strip::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  height: 48px;
  border-radius: 24px;
  background: var(--panel-soft);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  font-size: 1rem;
  font-weight: 800;
}

.chip-round {
  width: 48px;
  padding: 0;
}

.chip-wide {
  min-width: 160px;
}

.chip-wide .chevron {
  width: 20px;
  height: 20px;
}

.chip-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-right: 18px;
}

.chip-filter {
  white-space: nowrap;
  color: var(--text);
}

.chip-filter.active {
  background: #eff5ff;
  color: #0e5ec4;
}

.search-panel {
  margin-top: 14px;
}

.search-panel.hidden,
.product-sheet.hidden,
.sheet-backdrop.hidden,
.category-sheet.hidden,
.toast.hidden {
  display: none;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 16px;
  background: var(--panel-soft);
  border-radius: 18px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px calc(118px + var(--bottom-safe));
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 16px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: rise 320ms ease both;
}

.product-image {
  position: relative;
  border-radius: 26px;
  background:
    linear-gradient(180deg, #fcfcfd 0%, #ffffff 70%),
    linear-gradient(180deg, #eff2f6 0%, #f8f9fb 100%);
  border: 1px solid rgba(18, 20, 23, 0.04);
  aspect-ratio: 0.92;
  overflow: hidden;
}

.product-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #c4c7cd;
  z-index: 2;
  box-shadow: 0 10px 20px rgba(17, 20, 27, 0.08);
}

.product-heart.active {
  color: var(--danger);
}

.product-heart svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    fill 160ms ease,
    stroke 160ms ease,
    transform 160ms ease;
}

.product-heart.active svg {
  fill: currentColor;
  stroke: currentColor;
}

.product-media-button {
  width: 100%;
  height: 100%;
  display: block;
}

.product-copy-button {
  text-align: left;
  display: block;
}

.product-photo-frame {
  width: 100%;
  height: 100%;
  padding: 0;
}

.product-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-photo.contain {
  object-fit: contain;
  background: #0f1012;
}

.product-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  display: inline-flex;
  gap: 4px;
  transform: translateX(-50%);
}

.product-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d1d4da;
}

.product-dots span.active {
  background: #7f858f;
}

.product-price {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.product-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
  font-weight: 700;
}

.product-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.empty-state,
.cart-panel,
.profile-panel {
  grid-column: 1 / -1;
  border-radius: 24px;
  background: linear-gradient(180deg, #f9fafc 0%, #f3f5f8 100%);
  padding: 20px;
  border: 1px solid rgba(18, 20, 23, 0.06);
}

.tab-screen {
  grid-column: 1 / -1;
  min-height: 100%;
}

.empty-state.favorite-empty {
  min-height: calc(100svh - 170px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px 40px;
  background: linear-gradient(180deg, #f5f6fa 0%, #eef1f6 100%);
  border: 0;
  border-radius: 0;
}

.favorite-empty-art {
  width: 132px;
  height: 132px;
  margin-bottom: 20px;
}

.favorite-empty-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.favorite-empty .primary-action {
  margin-top: 20px;
  max-width: 240px;
  background: #3388dc;
}

.empty-state h2,
.cart-panel h2,
.profile-panel h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.empty-state p,
.cart-panel p,
.profile-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.cart-thumb {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 8px 18px rgba(29, 34, 44, 0.08);
}

.cart-thumb svg {
  width: 100%;
  height: 100%;
}

.cart-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.primary-action {
  width: 100%;
  margin-top: 16px;
  height: 54px;
  border-radius: 18px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
}

.favorites-screen {
  display: flex;
  flex-direction: column;
}

.duck-body {
  fill: #ffcd38;
}

.duck-shade {
  fill: #ffb80a;
}

.duck-beak {
  fill: #ff7b23;
}

.duck-eye {
  fill: #101216;
}

.duck-heart {
  fill: #ff354f;
}

.duck-heart-shine {
  fill: #ffffff;
}

.cart-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 170px);
  margin: -18px;
  background: #f1f3f8;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 12px;
  background: #fff;
}

.cart-header h2 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
}

.cart-clear {
  color: #3388dc;
  font-weight: 700;
  font-size: 0.98rem;
}

.cart-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.cart-items-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item-card,
.cart-totals,
.profile-list {
  background: #fff;
}

.cart-item-card {
  padding: 16px 18px;
}

.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: start;
}

.cart-item-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cart-item-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.cart-size {
  margin-top: 4px;
  font-size: 0.86rem;
  color: #8f95a0;
}

.cart-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
}

.qty-control {
  display: inline-grid;
  grid-template-columns: 36px 36px 36px;
  align-items: center;
  height: 38px;
  border-radius: 14px;
  background: #f1f3f8;
  overflow: hidden;
}

.qty-btn,
.qty-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-weight: 800;
}

.qty-btn {
  color: #30343b;
}

.qty-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.cart-item-price {
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

.cart-totals {
  padding: 18px;
}

.discount-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.discount-input {
  flex: 1 1 auto;
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #dde2ea;
  background: #fff;
  padding: 0 14px;
  outline: none;
  font: inherit;
}

.discount-apply-btn {
  flex: 0 0 auto;
  min-width: 92px;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: #3388dc;
  color: #fff;
  font-weight: 800;
}

.discount-apply-btn:disabled {
  opacity: 0.65;
}

.discount-note {
  margin-bottom: 10px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.discount-note.success {
  color: #177544;
}

.discount-note.error {
  color: #b43636;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.98rem;
  padding: 7px 0;
}

.summary-row.total {
  font-size: 1rem;
  font-weight: 800;
}

.summary-row.discount {
  color: #177544;
}

.summary-row strong {
  font-weight: 800;
}

.cart-footer {
  position: sticky;
  bottom: calc(58px + var(--bottom-safe));
  margin-top: auto;
  padding: 12px 16px 8px;
  background: #f1f3f8;
  z-index: 3;
}

.checkout-btn {
  margin: 0;
  background: #3388dc;
}

.profile-screen {
  min-height: calc(100svh - 170px);
  margin: -18px;
  background: #f1f3f8;
}

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 34px 20px 30px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 18px 30px rgba(28, 34, 44, 0.12);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbe7f7 0%, #8cb0d2 100%);
  color: #1c2734;
  font-size: 1.45rem;
  font-weight: 800;
}

.profile-name {
  margin: 0;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
}

.profile-history-note {
  color: #858c97;
  font-size: 0.95rem;
  font-weight: 700;
}

.profile-card {
  margin: 0 16px 12px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat {
  padding: 12px;
  border-radius: 16px;
  background: #f4f6fa;
  text-align: center;
}

.profile-stat span {
  display: block;
  color: #8b92a0;
  font-size: 0.8rem;
  font-weight: 700;
}

.profile-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 1.18rem;
  font-weight: 800;
}

.profile-section-title {
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 800;
}

.profile-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eceff4;
  color: #6d7480;
}

.profile-detail-row:last-child {
  border-bottom: 0;
}

.profile-detail-row strong {
  color: #171b22;
  font-weight: 800;
}

.profile-link {
  color: #2f86e7;
  font-weight: 800;
  text-decoration: none;
}

.profile-orders {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card {
  padding: 14px;
  border-radius: 18px;
  background: #f4f6fa;
}

.order-card-top,
.order-card-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-card-title,
.order-card-total {
  font-weight: 800;
}

.order-card-meta,
.order-card-note {
  margin-top: 4px;
  color: #808895;
  font-size: 0.86rem;
}

.order-card-items {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-card-line {
  color: #39404a;
  font-size: 0.92rem;
}

.order-card-line strong {
  color: #171b22;
  font-weight: 800;
  white-space: nowrap;
}

.profile-empty-note {
  color: #808895;
  font-size: 0.95rem;
  line-height: 1.45;
}

.admin-entry-btn,
.admin-primary-btn,
.admin-secondary-btn,
.admin-refresh-btn,
.admin-link-btn {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.admin-entry-btn {
  width: 100%;
  margin-top: 14px;
  height: 44px;
  border-radius: 14px;
  background: #121417;
  color: #fff;
  font-weight: 800;
}

.admin-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-card {
  margin: 0;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
}

.admin-header-row,
.admin-order-top,
.admin-order-line,
.admin-list-card,
.admin-actions-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-header-row h2,
.admin-section-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
}

.admin-header-row p {
  margin: 6px 0 0;
  color: #818997;
  font-size: 0.9rem;
}

.admin-refresh-btn,
.admin-secondary-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: #eef2f8;
  color: #17202b;
  font-weight: 700;
}

.admin-primary-btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: #2f86e7;
  color: #fff;
  font-weight: 800;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.admin-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #69717f;
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea {
  width: 100%;
  border: 1px solid #dfe4ec;
  border-radius: 14px;
  background: #f8f9fb;
  padding: 11px 12px;
  font: inherit;
  color: #17202b;
}

.admin-form-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.admin-form-full {
  grid-column: 1 / -1;
}

.admin-checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
  font-size: 0.95rem !important;
}

.admin-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.admin-actions-row {
  margin-top: 14px;
}

.admin-orders,
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.admin-order-card,
.admin-list-card {
  padding: 14px;
  border-radius: 16px;
  background: #f5f7fb;
}

.admin-order-meta {
  margin-top: 4px;
  color: #7e8694;
  font-size: 0.86rem;
}

.admin-order-total {
  font-weight: 800;
}

.admin-order-lines {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-order-line {
  font-size: 0.9rem;
  color: #2f3741;
}

.admin-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.admin-status.active {
  background: #e8f7ef;
  color: #167a43;
}

.admin-status.hidden {
  background: #f6e7e7;
  color: #9f3131;
}

.admin-link-btn {
  color: #2f86e7;
  background: none;
  padding: 0;
  font-weight: 800;
}

.profile-list {
  border-top: 10px solid #eef1f6;
  border-bottom: 10px solid #eef1f6;
}

.profile-row {
  width: 100%;
  display: grid;
  grid-template-columns: 36px 1fr auto 18px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #eceff4;
  text-align: left;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.profile-row-icon.order {
  background: #ff9c3a;
}

.profile-row-icon.language {
  background: #c64dff;
}

.profile-row-icon.support {
  background: #ffbb0b;
}

.profile-row-icon svg,
.profile-row-chevron svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-row-label {
  font-size: 1rem;
  font-weight: 700;
}

.profile-row-value,
.profile-row-chevron {
  color: #9096a1;
  font-size: 0.98rem;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  align-items: center;
  padding: 10px 12px var(--bottom-safe);
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
  z-index: 5;
}

.bottom-nav.hidden {
  opacity: 0;
  pointer-events: none;
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding-top: 2px;
}

.bottom-nav svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.nav-item.active {
  color: var(--primary);
}

.badge {
  position: absolute;
  top: -2px;
  right: 18px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 2px solid #fff;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 22, 0.36);
  backdrop-filter: blur(6px);
  z-index: 20;
}

.product-sheet,
.category-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100%, 430px);
  transform: translateX(-50%);
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(var(--bottom-safe) + 10px);
  z-index: 21;
  box-shadow: 0 -18px 40px rgba(15, 25, 40, 0.18);
  animation: sheet-up 220ms ease;
}

.product-sheet {
  top: 0;
  bottom: 0;
  padding: 8px 0 calc(124px + var(--bottom-safe));
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  background: #eef1f6;
}

.product-view-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-start;
  padding: 0 16px 6px;
  background: linear-gradient(180deg, #eef1f6 0%, rgba(238, 241, 246, 0.92) 70%, rgba(238, 241, 246, 0) 100%);
}

.product-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #20242b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(32, 38, 46, 0.1);
}

.product-close-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sheet-handle {
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: #d9dde5;
  margin: 2px auto 16px;
}

.sheet-product-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
}

.sheet-product-head.media {
  grid-template-columns: 1fr;
  gap: 14px;
}

.sheet-product-art {
  aspect-ratio: 1;
  padding: 10px;
  background: var(--panel-soft);
  border-radius: 20px;
}

.sheet-product-art svg {
  width: 100%;
  height: 100%;
}

.sheet-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet-gallery-stage {
  position: relative;
  aspect-ratio: 0.86;
  overflow: hidden;
  border-radius: 22px;
  background: #f5f6f8;
}

.sheet-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sheet-product-image.contain {
  object-fit: contain;
  background: #0f1012;
}

.sheet-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #1b2027;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 8px 18px rgba(27, 32, 39, 0.12);
}

.sheet-nav.prev {
  left: 10px;
}

.sheet-nav.next {
  right: 10px;
}

.sheet-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}

.sheet-gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d2d6de;
}

.sheet-gallery-dot.active {
  background: #7d838d;
}

.sheet-product-copy {
  display: flex;
  flex-direction: column;
}

.sheet-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sheet-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.sheet-product-title {
  margin: 6px 0 10px;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.2;
}

.sheet-price {
  font-size: 1.25rem;
  font-weight: 800;
}

.sheet-description {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.product-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-view-media,
.product-view-section {
  background: #fff;
}

.product-view-media {
  position: relative;
  background: linear-gradient(180deg, #edf0f5 0%, #f6f7fa 100%);
  min-height: 420px;
}

.product-view-progress {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.product-view-progress-bar {
  height: 3px;
  flex: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.product-view-progress-bar.active {
  background: rgba(255, 255, 255, 0.95);
}

.product-view-fabs {
  position: absolute;
  top: 28px;
  right: 10px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.product-view-fab {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #b7b7c0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(32, 38, 46, 0.1);
}

.product-view-fab svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-view-fab.active {
  color: #ff5567;
}

.product-view-fab.active svg {
  fill: currentColor;
  stroke: currentColor;
}

.product-view-image-shell {
  position: relative;
  min-height: 420px;
}

.product-view-hotspot {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  z-index: 2;
}

.product-view-hotspot.prev {
  left: 0;
}

.product-view-hotspot.next {
  right: 0;
}

.sheet-product-image {
  width: 100%;
  min-height: 420px;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sheet-product-image.contain {
  background: #eef1f6;
}

.product-view-section {
  padding: 16px 18px;
}

.product-view-section.size {
  padding-top: 14px;
}

.product-view-section-label {
  color: #8d93a0;
  font-size: 0.96rem;
}

.product-view-section-label strong {
  color: #20242b;
  font-weight: 800;
}

.product-view-sizes {
  margin-top: 12px;
  padding-bottom: 0;
  gap: 10px;
}

.product-view-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.25;
}

.product-view-price {
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 800;
}

.product-view-subtitle {
  margin-top: 16px;
  font-size: 0.98rem;
  font-weight: 800;
}

.product-view-copy {
  margin-top: 10px;
  color: #171b21;
  line-height: 1.45;
}

.product-view-copy p {
  margin: 0 0 4px;
}

.product-view-readmore {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6c727d;
  font-size: 0.98rem;
}

.product-view-readmore svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.product-view-contact {
  width: 100%;
  height: 46px;
  margin-top: 14px;
  border-radius: 14px;
  background: #f4f5f8;
  color: #161a20;
  font-weight: 700;
}

.product-view-contact:disabled {
  opacity: 0.48;
  cursor: default;
}

.product-view-bottom {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 16px calc(var(--bottom-safe) + 12px);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #dfe4ec;
  box-shadow: 0 -10px 24px rgba(23, 30, 39, 0.08);
  z-index: 24;
}

.product-view-qty {
  height: 48px;
  grid-template-columns: 48px 52px 48px;
  border-radius: 16px;
  background: #fff;
}

.product-view-cart-btn {
  margin: 0;
  background: #3388dc;
}

.size-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.size-chip {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--panel-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.size-chip.active {
  background: var(--text);
  color: #fff;
}

.category-sheet-grid {
  display: grid;
  gap: 10px;
}

.category-option {
  height: 52px;
  border-radius: 18px;
  background: var(--panel-soft);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
}

.category-option.active {
  background: #eff5ff;
  color: #0e5ec4;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-safe) + 98px);
  transform: translateX(-50%);
  min-width: 220px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(18, 20, 23, 0.92);
  color: #fff;
  font-weight: 700;
  z-index: 30;
  text-align: center;
}

.app-loading {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.product-shadow {
  filter: drop-shadow(0 18px 26px rgba(12, 14, 18, 0.14));
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translate(-50%, 18px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 480px) {
  .page-shell {
    padding: 0;
  }

  .device-frame {
    width: 100%;
    min-height: 100svh;
    border-radius: 0;
  }

  .miniapp {
    min-height: 100svh;
  }

  .cart-screen,
  .profile-screen {
    min-height: calc(100svh - 138px);
  }

  .product-sheet,
  .category-sheet {
    width: 100%;
  }

  .product-view-bottom {
    bottom: 0;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}
