:root {
  color-scheme: light;
  --navy: #102a4c;
  --ink: #152235;
  --muted: #647084;
  --line: #e4ebf4;
  --soft: #f7faff;
  --accent: #0fb7a2;
  --card: #ffffff;
  --shadow: 0 18px 48px rgba(15, 42, 82, 0.1);
  --shadow-soft: 0 10px 26px rgba(15, 42, 82, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(20, 184, 166, 0.14), transparent 30rem),
    radial-gradient(circle at 92% 10%, rgba(15, 42, 82, 0.1), transparent 24rem),
    linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 32px;
}

.loading-card,
.empty,
.error-card {
  min-height: 72vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.loader {
  width: 34px;
  height: 34px;
  border: 3px solid #d7e3f3;
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -18px -14px 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
  background: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(230, 235, 242, 0.88);
}

.hero-panel {
  border: 1px solid rgba(230, 235, 242, 0.96);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.9));
  box-shadow: var(--shadow-soft);
  padding: 10px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--navy);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(15, 42, 82, 0.18);
  flex: 0 0 auto;
}

.brand-text {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.05;
  color: var(--navy);
}

.subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.store-stats div {
  border: 1px solid rgba(230, 235, 242, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 9px 10px;
}

.store-stats b,
.store-stats span {
  display: block;
}

.store-stats b {
  color: var(--navy);
  font-size: 15px;
  line-height: 1.1;
}

.store-stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  margin-top: 3px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  overflow-x: auto;
  scrollbar-width: none;
}

.hero-actions::-webkit-scrollbar {
  display: none;
}

.hero-action {
  min-height: 34px;
  border: 1px solid rgba(15, 42, 82, 0.1);
  border-radius: 999px;
  background: #ffffff;
  color: var(--navy);
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.nav-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(15, 42, 82, 0.08);
  font-size: 11px;
  line-height: 1;
}

.hero-action.active {
  background: var(--navy);
  color: #ffffff;
}

.hero-action.active .nav-icon {
  background: rgba(255, 255, 255, 0.16);
}

.hero-action.telegram {
  background: rgba(20, 184, 166, 0.11);
  color: #08796d;
}

.search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  margin-top: 9px;
}

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 13px;
  background: white;
  color: var(--ink);
  outline: none;
  box-shadow: var(--shadow-soft);
  min-height: 40px;
}

.search input:focus {
  border-color: rgba(20, 184, 166, 0.75);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.bot-link,
.primary-btn {
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.bot-link {
  background: linear-gradient(135deg, var(--navy), #193a70);
}

.filter-stack {
  margin-bottom: 8px;
}

.shop-promise {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 16px;
}

.shop-promise div {
  border: 1px solid rgba(230, 235, 242, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  padding: 12px;
}

.shop-promise b,
.shop-promise span {
  display: block;
}

.shop-promise b {
  color: var(--navy);
  font-size: 13px;
}

.shop-promise span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  margin-top: 4px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 12px;
  margin: 0 -2px 7px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 9px 12px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

.chip.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.chip small {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 42, 82, 0.07);
  color: inherit;
  font-size: 10px;
}

.chip.active small {
  background: rgba(255, 255, 255, 0.2);
}

.subchips {
  padding-bottom: 10px;
}

.subchip {
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.08);
  color: #08796d;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.subchip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.featured-section {
  margin: 2px -2px 18px;
  padding: 0 2px;
}

.featured-section .section-title {
  padding: 0 2px;
}

.featured-section .count {
  color: #0f766e;
}

.featured-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(172px, 224px);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  padding: 2px 2px 9px;
  scrollbar-width: none;
}

.featured-rail::-webkit-scrollbar {
  display: none;
}

.featured-card {
  position: relative;
  border: 1px solid rgba(230, 235, 242, 0.96);
  border-radius: 20px;
  background: white;
  padding: 8px;
  text-align: left;
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
  overflow: hidden;
}

.featured-card::after {
  content: "Featured";
  position: absolute;
  top: 13px;
  left: 13px;
  border-radius: 999px;
  background: rgba(15, 42, 82, 0.88);
  color: #ffffff;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.featured-card img,
.featured-empty {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ecf4fc, #ffffff);
  color: var(--navy);
  font-weight: 900;
}

.featured-copy {
  display: grid;
  gap: 2px;
  padding: 9px 2px 2px;
}

.featured-copy b {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.featured-copy small {
  color: var(--navy);
  font-weight: 900;
}

.catalog-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 12px;
}

.catalog-toolbar h2,
.catalog-toolbar p {
  margin: 0;
}

.catalog-toolbar h2 {
  color: var(--navy);
  font-size: 20px;
}

.catalog-toolbar p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin-top: 3px;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.sort-control select {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  padding: 9px 10px;
  font-weight: 850;
  outline: none;
  box-shadow: var(--shadow-soft);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin: 8px 0 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
  color: var(--navy);
}

.count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.product-card:active {
  transform: scale(0.99);
}

.photo-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #eaf1fa, #ffffff);
  border: 0;
  padding: 0;
  width: 100%;
  display: block;
  overflow: hidden;
}

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

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #9aa9bc;
  font-weight: 800;
}

.image-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 999px;
  background: rgba(15, 42, 82, 0.84);
  color: white;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

.sale-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  color: #ffffff;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 950;
}

.product-body {
  padding: 11px;
}

.product-name {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 850;
  min-height: 36px;
}

.meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.card-desc {
  margin: 7px 0 0;
  color: #4f5f75;
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 30px;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.price {
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
}

.code {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.old-price {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 850;
  text-decoration: line-through;
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}

.availability {
  color: #08796d;
  font-size: 10px;
  font-weight: 900;
  text-align: right;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.tag {
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 800;
}

.product-action {
  margin-top: 10px;
  width: 100%;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.13), rgba(20, 184, 166, 0.07));
  color: #08796d;
  font-size: 12px;
  font-weight: 900;
  padding: 9px;
  text-align: center;
  text-decoration: none;
  display: block;
}

.detail-page,
.result-page {
  min-height: 100vh;
  margin: -18px -14px -32px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px calc(env(safe-area-inset-bottom, 0px) + 96px);
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.page-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: calc((env(safe-area-inset-top, 0px) + 12px) * -1) -14px 14px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 12px;
  background: rgba(248, 251, 255, 0.94);
  border-bottom: 1px solid rgba(230, 235, 242, 0.9);
  backdrop-filter: blur(18px);
}

.page-topbar h1 {
  font-size: 18px;
}

.back-btn {
  border: 1px solid rgba(15, 42, 82, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: var(--navy);
  padding: 10px 13px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15, 42, 82, 0.08);
}

.detail-hero,
.detail-card,
.result-panel {
  border: 1px solid rgba(230, 235, 242, 0.94);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-card,
.result-panel {
  padding: 18px;
}

.order-card-title {
  margin: 20px 0 0;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 42, 82, 0.06), rgba(20, 184, 166, 0.08));
}

.order-card-title h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}

.order-card-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.detail-gallery {
  background: linear-gradient(135deg, #eef5fc, #ffffff);
  padding: 0 0 12px;
  min-width: 0;
}

.detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #eff4fa;
}

.empty-image {
  display: grid;
  place-items: center;
  color: #9aa9bc;
  font-weight: 900;
}

.thumb-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding: 10px 14px 0;
}

.thumb {
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  background: #e8f0f8;
}

.thumb.active {
  border-color: var(--accent);
}

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

.detail-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-body h2,
.result-panel h2 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.12;
}

.detail-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.detail-price-row div {
  display: grid;
  gap: 3px;
}

.detail-price-row strong {
  color: var(--navy);
  font-size: 20px;
}

.detail-price-row del {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 850;
}

.detail-price-row span {
  color: var(--accent);
  font-weight: 900;
}

.detail-desc {
  color: var(--muted);
  line-height: 1.5;
  margin: 12px 0 0;
}

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

.spec-preview div {
  border: 1px solid rgba(230, 235, 242, 0.96);
  border-radius: 15px;
  background: #fbfdff;
  padding: 10px;
}

.spec-preview span,
.spec-preview b {
  display: block;
  overflow-wrap: anywhere;
}

.spec-preview span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.spec-preview b {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
}

.telegram-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.11), rgba(15, 42, 82, 0.04));
  padding: 12px;
}

.telegram-nudge b,
.telegram-nudge span {
  display: block;
}

.telegram-nudge b {
  color: var(--navy);
  font-size: 13px;
}

.telegram-nudge span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  margin-top: 3px;
}

.telegram-nudge a {
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--navy);
  color: white;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

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

.product-facts div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
  padding: 10px;
  min-width: 0;
}

.product-facts span,
.product-facts b {
  display: block;
  overflow-wrap: anywhere;
}

.product-facts span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-facts b {
  color: var(--navy);
  font-size: 12px;
  margin-top: 4px;
}

.checkout-form {
  display: grid;
  gap: 13px;
  margin-top: 14px;
}

.checkout-form label,
.option-group label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.quantity-control {
  display: grid;
  grid-template-columns: 42px minmax(56px, 1fr) 42px;
  gap: 7px;
}

.quantity-control input {
  text-align: center;
  font-weight: 950;
}

.qty-btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--navy);
  font-size: 18px;
  font-weight: 950;
  min-height: 44px;
  box-shadow: var(--shadow-soft);
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  border-color: rgba(20, 184, 166, 0.75);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.form-grid.two {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr);
  gap: 10px;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: 0;
}

.option-pill span,
.single-option {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fafc;
  color: var(--ink);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
}

.checkout-summary {
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(15, 42, 82, 0.04));
  padding: 13px;
}

.checkout-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkout-summary span,
.checkout-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.checkout-summary b {
  color: var(--navy);
  font-size: 18px;
}

.checkout-summary small {
  display: block;
  margin-top: 5px;
}

.sticky-buy-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px calc(env(safe-area-inset-bottom, 0px) + 10px);
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(230, 235, 242, 0.96);
  box-shadow: 0 -14px 36px rgba(15, 42, 82, 0.1);
  backdrop-filter: blur(18px);
}

.sticky-buy-bar div {
  min-width: 0;
}

.sticky-buy-bar span,
.sticky-buy-bar b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-buy-bar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.sticky-buy-bar b {
  color: var(--navy);
  font-size: 14px;
}

@media (max-width: 759px) {
  .sticky-buy-bar {
    grid-template-columns: 1fr auto;
  }

  .sticky-buy-bar div {
    text-align: center;
    justify-self: center;
  }
}

.option-pill input:checked + span {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.single-option {
  display: inline-flex;
  color: #08796d;
  background: rgba(20, 184, 166, 0.1);
  border-color: rgba(20, 184, 166, 0.24);
}

.full {
  width: 100%;
}

.ghost-btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--navy);
  padding: 12px 14px;
  font-weight: 900;
  min-height: 44px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.result-panel {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.success-mark {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 6px auto 12px;
  background: rgba(20, 184, 166, 0.14);
  color: #08796d;
  font-weight: 950;
  font-size: 12px;
}

.result-lead {
  color: var(--muted);
  margin: 8px 0 16px;
}

.summary-list,
.payment-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  text-align: left;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.summary-list span {
  color: var(--muted);
  font-size: 12px;
}

.summary-list b {
  color: var(--navy);
  text-align: right;
  overflow-wrap: anywhere;
}

.result-panel h3 {
  color: var(--navy);
  margin: 18px 0 8px;
  text-align: left;
}

.payment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fbfdff;
}

.payment-card b,
.payment-card p,
.payment-card code {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
}

.payment-card p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.payment-card code {
  margin-top: 4px;
  color: var(--navy);
  font-weight: 900;
}

.copy-btn {
  border: 0;
  border-radius: 12px;
  background: rgba(20, 184, 166, 0.12);
  color: #08796d;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 900;
}

.notice-box {
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.1);
  color: #8a4b00;
  padding: 12px;
  line-height: 1.45;
  margin-top: 12px;
  text-align: left;
}

.notice-box.success {
  border-color: rgba(20, 184, 166, 0.28);
  background: rgba(20, 184, 166, 0.1);
  color: #08796d;
}

.proof-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  text-align: left;
}

.proof-form label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.proof-form textarea,
.proof-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.proof-form textarea {
  resize: vertical;
}

.result-actions {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.track-page {
  min-height: 100vh;
  margin: -18px -14px -32px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px calc(env(safe-area-inset-bottom, 0px) + 32px);
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.track-panel {
  text-align: left;
}

.track-panel h2,
.track-panel .result-lead {
  text-align: center;
}

.tracking-card {
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 20px;
  background: #fbfdff;
  padding: 14px;
  margin-top: 14px;
  text-align: left;
}

.tracking-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tracking-head span {
  color: var(--accent);
  font-weight: 950;
}

.tracking-head b {
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: #08796d;
  padding: 6px 10px;
  font-size: 12px;
}

.empty-box {
  margin: 30px auto;
  max-width: 320px;
  padding: 24px;
  border: 1px dashed #c9d5e5;
  border-radius: 20px;
  background: white;
  text-align: center;
  color: var(--muted);
}

@media (min-width: 680px) {
  .app-shell {
    padding-inline: 20px;
  }

  .hero {
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-page,
  .result-page,
  .track-page {
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .page-topbar {
    margin-inline: -20px;
    padding-inline: 20px;
  }

}

@media (min-width: 760px) {
  .hero {
    border-radius: 0 0 28px 28px;
  }

  .grid {
    gap: 16px;
  }

  .hero-panel {
    padding: 18px;
  }

  .product-body {
    padding: 13px;
  }
}

@media (min-width: 860px) {
  .detail-gallery {
    min-height: 100%;
  }

  .detail-image {
    height: auto;
    max-height: min(72vh, 680px);
    aspect-ratio: 1 / 1;
  }
}

@media (min-width: 900px) {
  .detail-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.82fr);
    gap: 18px;
    align-items: start;
  }

  .detail-page .page-topbar {
    grid-column: 1 / -1;
  }

  .detail-hero {
    position: sticky;
    top: 86px;
  }

  .detail-card {
    min-width: 0;
  }

  .sticky-buy-bar {
    display: none;
  }

  .detail-page {
    padding-bottom: 34px;
  }
}

@media (min-width: 1040px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero {
    position: relative;
    margin-top: 0;
    border-radius: 30px;
  }
}

@media (max-width: 360px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .store-stats {
    grid-template-columns: 1fr 1fr;
  }

  .store-stats div:last-child {
    grid-column: 1 / -1;
  }

}

@media (max-width: 640px) {
  .app-shell {
    padding: 10px 10px 24px;
  }

  .hero {
    position: relative;
    margin: -10px -10px 8px;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px;
    background: rgba(248, 251, 255, 0.98);
  }

  .hero-panel {
    border-radius: 16px;
    padding: 9px;
  }

  .brand-row {
    align-items: center;
    gap: 9px;
  }

  .logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  h1 {
    font-size: 18px;
    line-height: 1.08;
  }

  .subtitle {
    font-size: 11px;
    line-height: 1.3;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .store-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 9px;
  }

  .store-stats div {
    border-radius: 12px;
    padding: 7px 8px;
  }

  .store-stats b {
    font-size: 13px;
  }

  .store-stats span {
    font-size: 9px;
  }

  .hero-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
  }

  .hero-action {
    min-height: 32px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .search {
    margin-top: 8px;
    gap: 7px;
  }

  .search input,
  .bot-link {
    min-height: 38px;
    border-radius: 999px;
    padding: 10px 12px;
  }

  .shop-promise {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 18px;
  }

  .shop-promise div {
    border-radius: 16px;
    padding: 10px 12px;
  }

  .shop-promise div:nth-child(n+3) {
    display: none;
  }

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

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-control {
    justify-content: space-between;
  }

  .sort-control select {
    flex: 1;
  }

  .spec-preview {
    grid-template-columns: 1fr;
  }

  .telegram-nudge {
    align-items: stretch;
    flex-direction: column;
  }
}

/* V1 storefront polish: compact app header, dense commerce screens, account page. */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -18px -14px 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 9px;
  background: rgba(248, 251, 255, 0.96);
  border-bottom: 1px solid rgba(230, 235, 242, 0.9);
  backdrop-filter: blur(18px);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-button {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}

.mini-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--navy);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  flex: 0 0 auto;
  box-shadow: 0 10px 24px rgba(15, 42, 82, 0.14);
}

.brand-button span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-button b {
  color: var(--navy);
  font-size: 16px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-button small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(15, 42, 82, 0.1);
  border-radius: 999px;
  background: white;
  color: transparent;
  font-size: 0;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.icon-btn::before {
  color: var(--navy);
  font-size: 15px;
  line-height: 1;
}

.icon-btn[data-toggle-search]::before { content: "⌕"; }
.icon-btn[data-view="account"]::before { content: "👤"; }

.quick-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  margin-top: 8px;
  scrollbar-width: none;
}

.quick-nav::-webkit-scrollbar { display: none; }

.quick-pill {
  border: 1px solid rgba(15, 42, 82, 0.1);
  border-radius: 999px;
  background: white;
  color: var(--navy);
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.quick-pill.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.quick-pill.telegram {
  background: rgba(20, 184, 166, 0.11);
  color: #08796d;
}

.search-drawer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  margin-top: 8px;
}

.search-drawer input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  min-height: 38px;
  padding: 9px 12px;
  outline: none;
  box-shadow: var(--shadow-soft);
}

.screen {
  animation: screenIn 0.16s ease;
}

@keyframes screenIn {
  from { opacity: 0.7; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.catalog-screen .filter-stack {
  margin-bottom: 2px;
}

.catalog-screen .chips {
  padding-bottom: 8px;
  margin-bottom: 3px;
}

.catalog-screen .chip {
  padding: 7px 10px;
  font-size: 12px;
}

.catalog-screen .subchip {
  padding: 7px 10px;
  font-size: 11px;
}

.catalog-toolbar {
  margin: 5px 0 9px;
}

.catalog-toolbar h2 {
  font-size: 17px;
}

.sort-control select {
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.featured-section {
  margin: 0 -1px 12px;
}

.featured-rail {
  grid-auto-columns: minmax(142px, 172px);
  gap: 9px;
  padding-bottom: 6px;
}

.featured-card {
  border-radius: 18px;
  padding: 6px;
}

.featured-card::after {
  top: 10px;
  left: 10px;
  padding: 4px 7px;
  font-size: 9px;
}

.featured-card img,
.featured-empty {
  border-radius: 13px;
}

.grid {
  gap: 10px;
}

.product-card {
  border-radius: 18px;
}

.product-card .product-action {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: white;
  color: inherit;
  display: block;
  margin: 0;
  padding: 10px;
  text-align: left;
}

.product-name {
  min-height: 0;
  font-size: 13px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-row {
  margin-top: 6px;
}

.price {
  font-size: 14px;
}

.image-count {
  right: 7px;
  bottom: 7px;
  padding: 3px 7px;
  font-size: 10px;
}

.detail-screen,
.result-page,
.track-page,
.account-page {
  margin: 0;
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 86px);
  background: transparent;
  min-height: auto;
}

.back-inline {
  border: 0;
  border-radius: 999px;
  background: rgba(15, 42, 82, 0.08);
  color: var(--navy);
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 900;
  margin: 2px 0 9px;
}

.detail-screen {
  display: grid;
  gap: 10px;
}

.detail-hero,
.detail-card,
.result-panel,
.account-card {
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.detail-card,
.result-panel,
.account-card {
  padding: 14px;
}

.detail-image {
  aspect-ratio: 1 / 0.95;
}

.thumb-row {
  padding: 8px 10px 0;
}

.thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
}

.detail-body h2,
.result-panel h2 {
  font-size: 21px;
}

.detail-price-row {
  margin-top: 8px;
}

.product-facts,
.spec-preview {
  margin-top: 10px;
  gap: 7px;
}

.product-facts div,
.spec-preview div {
  border-radius: 13px;
  padding: 8px;
}

.detail-desc {
  margin-top: 9px;
  font-size: 13px;
}

.order-card-title {
  margin-top: 13px;
  padding: 11px;
  border-radius: 14px;
}

.checkout-form {
  gap: 10px;
  margin-top: 11px;
}

.form-alert {
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 14px;
  background: rgba(254, 226, 226, 0.78);
  color: #991b1b;
  padding: 10px 11px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
}

.checkout-form input,
.checkout-form textarea,
.proof-form input,
.proof-form textarea {
  border-radius: 12px;
  padding: 10px 11px;
}

.checkout-form input.field-missing,
.checkout-form textarea.field-missing,
.option-group.field-missing .option-pill span {
  border-color: rgba(220, 38, 38, 0.72);
  background: rgba(254, 242, 242, 0.92);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.option-group.field-missing > label {
  color: #991b1b;
}

.option-row {
  gap: 7px;
}

.option-pill span,
.single-option {
  padding: 8px 10px;
  font-size: 12px;
}

.quantity-control {
  grid-template-columns: 38px minmax(52px, 1fr) 38px;
}

.qty-btn {
  min-height: 40px;
  border-radius: 12px;
}

.checkout-summary {
  border-radius: 14px;
  padding: 11px;
}

.sticky-buy-bar {
  padding-top: 8px;
}

.account-page {
  display: grid;
  gap: 12px;
}

.account-card {
  border: 1px solid rgba(230, 235, 242, 0.94);
  background: white;
}

.account-note {
  border-radius: 14px;
  background: rgba(20, 184, 166, 0.08);
  color: #08796d;
  padding: 10px 11px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
  margin-bottom: 10px;
}

.section-title.compact {
  margin: 0 0 10px;
}

.section-title.compact h2 {
  font-size: 17px;
}

.order-history {
  display: grid;
  gap: 8px;
}

.history-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  text-align: left;
}

.history-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #ecf4fc, #ffffff);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 950;
  flex: 0 0 auto;
}

.history-row span,
.history-row b,
.history-row small {
  min-width: 0;
  display: block;
}

.history-row .history-thumb {
  display: grid;
}

.history-row img.history-thumb {
  display: block;
}

.history-row b {
  color: var(--navy);
  font-size: 13px;
}

.history-row small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.history-row em {
  color: #08796d;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
}

.history-status {
  border-radius: 999px;
  background: rgba(15, 42, 82, 0.07);
  color: var(--navy);
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}

.compact-empty {
  margin: 0;
  max-width: none;
}

@media (min-width: 760px) {
  .app-header {
    border-radius: 0 0 24px 24px;
  }

  .detail-screen {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
    align-items: start;
  }

  .detail-screen .back-inline {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .app-header {
    margin: -10px -10px 9px;
    padding: calc(env(safe-area-inset-top, 0px) + 7px) 10px 8px;
  }

  .brand-button b {
    font-size: 15px;
  }

  .brand-button small {
    max-width: 190px;
  }

  .mini-logo {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .quick-nav {
    margin-top: 7px;
  }

  .quick-pill {
    padding: 6px 10px;
  }

  .catalog-toolbar {
    flex-direction: row;
    align-items: center;
  }

  .sort-control span {
    display: none;
  }

  .sort-control select {
    max-width: 142px;
  }

  .grid {
    gap: 9px;
  }

  .product-card .product-action {
    padding: 9px;
  }

  .detail-card,
  .result-panel,
  .account-card {
    padding: 12px;
  }
}

/* Commerce home redesign */
body {
  background:
    radial-gradient(circle at 20% -10%, rgba(253, 237, 209, 0.72), transparent 24rem),
    linear-gradient(180deg, #fffaf1 0%, #fbf7ec 58%, #f7fbf5 100%);
}

.app-shell {
  width: min(100%, 560px);
  padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 92px);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -16px 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px;
  background: rgba(255, 250, 241, 0.94);
  border-bottom: 1px solid rgba(68, 43, 28, 0.07);
  backdrop-filter: blur(18px);
}

.header-main {
  max-width: 560px;
  margin: 0 auto;
}

.brand-button {
  gap: 10px;
}

.brand-button b {
  color: #20140d;
  font-size: 16px;
  font-weight: 950;
}

.brand-button small {
  color: #7b6d63;
  font-size: 11px;
  font-weight: 750;
}

.mini-logo {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(65, 40, 25, 0.12);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  color: #2b1b12;
  box-shadow: none;
  font-size: 17px;
}

.search-drawer {
  max-width: 560px;
  margin: 8px auto 0;
  grid-template-columns: 1fr auto;
}

.search-drawer.home-drawer {
  margin: 8px 0 4px;
}

.commerce-home {
  padding-bottom: 8px;
}

.commerce-hero {
  padding: 6px 0 2px;
}

.home-brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-greeting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.hero-greeting h1 {
  color: #17110c;
  font-size: clamp(24px, 6.2vw, 31px);
  letter-spacing: 0;
  line-height: 1.05;
}

.hero-greeting p {
  margin: 5px 0 0;
  color: #7e736b;
  font-size: 14px;
  line-height: 1.35;
}

.branch-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: min(42vw, 220px);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #2d5b36;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(45, 91, 54, 0.08);
  white-space: nowrap;
}

.branch-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.branch-chip svg {
  flex: 0 0 auto;
}

.home-search {
  margin-top: 16px;
  min-height: 50px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: #ffffff;
  padding: 0 15px;
  box-shadow: 0 12px 34px rgba(50, 35, 23, 0.08);
  color: #81756d;
}

.home-search input {
  width: 100%;
  border: 0;
  outline: 0;
  min-height: 50px;
  background: transparent;
  color: #20140d;
  font-weight: 750;
}

.home-search button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f8f2e7;
  color: #5f5147;
  font-size: 15px;
}

.telegram-soft {
  display: block;
  margin-top: 10px;
  border-radius: 16px;
  background: rgba(46, 125, 70, 0.08);
  color: #2e7d46;
  padding: 10px 12px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.category-browse {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
}

.category-browse .section-title {
  margin: 0;
}

.category-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 72px;
  gap: 12px;
  overflow-x: auto;
  padding: 16px 0 18px;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-tile {
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #20140d;
  padding: 0;
}

.tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 25px;
  box-shadow: 0 12px 24px rgba(50, 35, 23, 0.08);
  overflow: hidden;
}

.icon-btn svg,
.home-search svg,
.branch-chip svg,
.tile-icon svg,
.promo-icon svg,
.bottom-nav svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn::before {
  content: none !important;
}

.tile-icon svg {
  width: 27px;
  height: 27px;
}

.tile-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.promo-icon svg {
  width: 34px;
  height: 34px;
}

.branch-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 42vw;
  overflow: hidden;
}

.branch-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-tile.active .tile-icon {
  background: #25140b;
  color: #fff;
}

.category-tile b {
  display: block;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 950;
}

.promo-banner {
  width: 100%;
  border: 0;
  border-radius: 23px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.16), transparent 12rem),
    linear-gradient(135deg, #3b1f12, #1f1009);
  color: #fff7ed;
  min-height: 92px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  text-align: left;
  box-shadow: 0 18px 34px rgba(46, 24, 14, 0.18);
  margin-bottom: 18px;
}

.promo-icon {
  font-size: 30px;
  opacity: 0.9;
}

.promo-banner small,
.promo-banner em {
  display: block;
  color: rgba(255, 247, 237, 0.68);
  font-style: normal;
  font-weight: 750;
}

.promo-banner b {
  display: block;
  font-size: 24px;
  line-height: 1.05;
}

.promo-banner strong {
  border-radius: 999px;
  background: #2fa84f;
  color: #fff;
  padding: 10px 14px;
  font-size: 12px;
  white-space: nowrap;
}

.subchips {
  margin-bottom: 8px;
}

.commerce-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 8px 0 14px;
}

.commerce-section-title h2 {
  margin: 0;
  color: #17110c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
}

.commerce-section-title button {
  border: 0;
  background: transparent;
  color: #2e7d46;
  font-size: 14px;
  font-weight: 950;
}

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

.compact-product {
  display: block;
  min-height: 0;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

.compact-product .photo-wrap {
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 18px;
  background: #fbf3e9;
}

.compact-product .photo-wrap img {
  object-fit: cover;
}

.compact-product .product-body {
  border: 0;
  background: transparent;
  padding: 9px 6px 8px;
  text-align: left;
  display: grid;
  align-content: start;
}

.compact-product .product-name {
  min-height: auto;
  color: #17110c;
  font-size: 15px;
  font-weight: 950;
}

.compact-product p {
  margin: 5px 0 0;
  color: #8a7d73;
  font-size: 12px;
  line-height: 1.35;
  min-height: 32px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-product .price-row {
  margin-top: 7px;
  align-items: center;
  justify-content: space-between;
}

.compact-product .price {
  color: #20140d;
  font-size: 14px;
}

.add-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e8f8e7;
  color: #2fa84f;
  font-size: 20px;
  line-height: 1;
  font-weight: 950;
}

.compact-product .image-count {
  min-width: 24px;
  height: 24px;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  background: rgba(31, 16, 9, 0.82);
}

.mini-order-card {
  width: 100%;
  margin: 18px 0 4px;
  border: 0;
  border-radius: 22px;
  background: #dff6df;
  color: #174324;
  min-height: 74px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.mini-order-card span {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  display: grid;
  place-items: center;
}

.mini-order-card b,
.mini-order-card small,
.mini-order-card em {
  display: block;
}

.mini-order-card small {
  font-weight: 800;
  color: #477953;
}

.mini-order-card em {
  font-style: normal;
  color: #2e7d46;
  font-size: 12px;
  font-weight: 950;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 30;
  width: min(100%, 560px);
  padding: 8px 18px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: rgba(255, 250, 241, 0.94);
  border-top: 1px solid rgba(68, 43, 28, 0.08);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: #8b7d72;
  display: grid;
  place-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 3px;
}

.bottom-nav button span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 17px;
}

.bottom-nav button.active {
  color: #2e7d46;
}

.bottom-nav button.active span {
  background: #e3f7e2;
}

.in-form-order {
  min-height: 48px;
  font-size: 15px;
}

.detail-image-button {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  display: block;
  cursor: zoom-in;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 15, 26, 0.94);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
}

.image-viewer-toolbar {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px;
}

.image-viewer-toolbar button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  min-width: 38px;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 950;
}

.image-viewer-toolbar b {
  color: white;
  min-width: 44px;
  text-align: center;
  font-size: 12px;
}

.image-viewer-close {
  justify-self: end;
}

.image-viewer-stage {
  overflow: auto;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  touch-action: pinch-zoom pan-x pan-y;
}

.image-viewer-stage img {
  max-width: none;
  width: min(96vw, 900px);
  height: auto;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.image-viewer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

body.cake-shop {
  --navy: #4a2036;
  --ink: #24151d;
  --muted: #755f68;
  --line: #f1dce4;
  --soft: #fff7f4;
  --accent: #d9487f;
  background:
    radial-gradient(circle at 8% 0%, rgba(217, 72, 127, 0.13), transparent 26rem),
    radial-gradient(circle at 92% 10%, rgba(245, 182, 92, 0.2), transparent 22rem),
    linear-gradient(180deg, #fffaf7 0%, #fff2f5 100%);
}

body.cake-shop .commerce-hero,
body.cake-shop .detail-card,
body.cake-shop .result-panel,
body.cake-shop .featured-card,
body.cake-shop .product-card {
  border-color: rgba(240, 220, 230, 0.96);
  box-shadow: 0 18px 48px rgba(91, 43, 66, 0.1);
}

body.cake-shop .category-tile.active,
body.cake-shop .primary-btn,
body.cake-shop .bot-link,
body.cake-shop .option-pill input:checked + span {
  background: linear-gradient(135deg, #5b2b42, #e25588);
  border-color: transparent;
}

body.cake-shop .cake-featured-section {
  display: grid;
  gap: 12px;
  margin: 10px 0 18px;
}

body.cake-shop .cake-carousel-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.cake-shop .cake-carousel-controls button {
  min-width: 34px;
  min-height: 30px;
  border: 1px solid rgba(240, 220, 230, 0.98);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(91, 43, 66, 0.08);
}

body.cake-shop .cake-featured-carousel {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px 8px;
}

body.cake-shop .cake-featured-carousel::-webkit-scrollbar {
  display: none;
}

body.cake-shop .cake-featured-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(82%, 1fr);
  gap: 14px;
}

body.cake-shop .cake-feature-card {
  position: relative;
  display: grid;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(240, 220, 230, 0.96);
  border-radius: 28px;
  background: #fff;
  color: inherit;
  padding: 0;
  text-align: left;
  box-shadow: 0 22px 56px rgba(91, 43, 66, 0.14);
  scroll-snap-align: center;
}

body.cake-shop .cake-feature-card img,
body.cake-shop .cake-feature-card .featured-empty {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff2f7, #fff9ec);
}

body.cake-shop .cake-feature-card::after {
  content: "";
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(180deg, transparent, rgba(40, 24, 34, 0.78));
  pointer-events: none;
}

body.cake-shop .cake-feature-copy {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  display: grid;
  gap: 4px;
  color: #fff;
}

body.cake-shop .cake-feature-copy small {
  width: max-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
}

body.cake-shop .cake-feature-copy b {
  font-size: 22px;
  line-height: 1.08;
  font-weight: 950;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.26);
}

body.cake-shop .cake-feature-copy em {
  color: #ffe8a9;
  font-style: normal;
  font-size: 15px;
  font-weight: 950;
}

body.cake-shop .cake-feature-hero {
  position: relative;
  min-height: clamp(260px, 58vw, 390px);
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 64px rgba(91, 43, 66, 0.16);
}

body.cake-shop .cake-feature-hero .cake-feature-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: clamp(260px, 58vw, 390px);
  border: 0;
  border-radius: 30px;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.62s ease;
}

body.cake-shop .cake-feature-hero .cake-feature-card.active {
  opacity: 1;
  pointer-events: auto;
}

body.cake-shop .cake-feature-hero .cake-feature-card img,
body.cake-shop .cake-feature-hero .cake-feature-card .featured-empty {
  width: 100%;
  height: 100%;
  min-height: clamp(260px, 58vw, 390px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

body.cake-shop .cake-feature-hero .cake-feature-card::after {
  inset: 35% 0 0;
  background: linear-gradient(180deg, transparent, rgba(40, 24, 34, 0.86));
}

body.cake-shop .cake-feature-hero .cake-feature-copy {
  left: 18px;
  right: 18px;
  bottom: 18px;
  gap: 5px;
}

body.cake-shop .cake-feature-hero .cake-feature-copy b {
  max-width: 82%;
  font-size: clamp(23px, 6vw, 34px);
}

body.cake-shop .cake-feature-hero .cake-feature-copy strong {
  width: max-content;
  margin-top: 5px;
  border-radius: 999px;
  background: #ffffff;
  color: #5b2b42;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 950;
}

body.cake-shop .cake-hero-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #5b2b42;
  font-size: 25px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(40, 24, 34, 0.16);
  backdrop-filter: blur(10px);
}

body.cake-shop .cake-hero-nav.prev {
  left: 12px;
}

body.cake-shop .cake-hero-nav.next {
  right: 12px;
}

body.cake-shop .cake-feature-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: -2px;
}

body.cake-shop .cake-feature-dots button {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(91, 43, 66, 0.22);
  padding: 0;
}

body.cake-shop .cake-feature-dots button.active {
  width: 22px;
  background: #e25588;
}

body.cake-shop .category-browse {
  margin: 18px 0 22px;
}

body.cake-shop .category-browse .section-title h2 {
  font-size: 21px;
}

body.cake-shop .category-strip {
  grid-auto-columns: 94px;
  gap: 16px;
  padding: 8px 0 14px;
}

body.cake-shop .tile-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(74, 32, 54, 0.13);
}

body.cake-shop .tile-icon svg {
  width: 34px;
  height: 34px;
}

body.cake-shop .category-tile b {
  max-width: 94px;
  font-size: 12px;
}

body.cake-shop .grid {
  grid-template-columns: 1fr;
  gap: 34px;
}

body.cake-shop .product-card.cake-product-card {
  border-radius: 28px;
  box-shadow: 0 20px 54px rgba(91, 43, 66, 0.12);
  margin-bottom: 4px;
}

body.cake-shop .product-card.cake-product-card .photo-wrap {
  aspect-ratio: 1 / 1;
}

body.cake-shop .product-card.cake-product-card .product-action {
  padding: 15px 16px 16px;
}

body.cake-shop .product-card.cake-product-card .product-name {
  font-size: 18px;
  line-height: 1.18;
  min-height: 0;
}

body.cake-shop .product-card.cake-product-card .card-desc {
  min-height: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  -webkit-line-clamp: 3;
}

body.cake-shop .product-card.cake-product-card .price {
  font-size: 18px;
}

.cake-order-box {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(226, 85, 136, 0.22);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(226, 85, 136, 0.08), rgba(248, 196, 105, 0.08));
  padding: 14px;
}

.cake-order-box h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.cake-order-box small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 759px) {
  .detail-screen {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  }

  .sticky-buy-bar {
    display: none;
  }

  body.cake-shop .cake-featured-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    gap: 10px;
  }

  body.cake-shop .cake-featured-section > .section-title,
  body.cake-shop .cake-feature-dots {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }

  body.cake-shop .cake-feature-hero {
    min-height: min(68vh, 540px);
    border-radius: 0;
    box-shadow: none;
  }

  body.cake-shop .cake-feature-hero .cake-feature-card,
  body.cake-shop .cake-feature-hero .cake-feature-card img,
  body.cake-shop .cake-feature-hero .cake-feature-card .featured-empty {
    min-height: min(68vh, 540px);
    border-radius: 0;
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-header {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .grid {
    gap: 10px;
  }

  .compact-product {
    min-height: 0;
  }

  .compact-product .photo-wrap {
    height: auto;
  }

  .compact-product .product-name {
    font-size: 13px;
  }

  .compact-product p {
    font-size: 11px;
    min-height: 29px;
  }

  .compact-product .price {
    font-size: 12px;
  }

  body.cake-shop .grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  body.cake-shop .cake-featured-section {
    gap: 10px;
  }

  body.cake-shop .cake-featured-section > .section-title {
    padding: 0 12px;
  }

  body.cake-shop .cake-feature-hero {
    min-height: min(68vh, 540px);
    border-radius: 0;
    box-shadow: none;
  }

  body.cake-shop .cake-feature-hero .cake-feature-card,
  body.cake-shop .cake-feature-hero .cake-feature-card img,
  body.cake-shop .cake-feature-hero .cake-feature-card .featured-empty {
    min-height: min(68vh, 540px);
    border-radius: 0;
  }

  body.cake-shop .cake-feature-card,
  body.cake-shop .cake-feature-card img,
  body.cake-shop .cake-feature-card .featured-empty {
    min-height: 215px;
  }

  body.cake-shop .cake-featured-track {
    grid-auto-columns: 88%;
  }

  body.cake-shop .product-card.cake-product-card .product-action {
    padding: 14px;
  }

  body.cake-shop .product-card.cake-product-card .product-name {
    font-size: 17px;
  }

  body.cake-shop .product-card.cake-product-card .card-desc {
    font-size: 12px;
    min-height: 0;
  }

  body.cake-shop .product-card.cake-product-card .price {
    font-size: 17px;
  }
}
