:root {
  --bg: #06090f;
  --surface: #0d131b;
  --surface-2: #121924;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4efe4;
  --muted: #9ca6b7;
  --orange: #ff9d21;
  --yellow: #f3ca44;
  --green: #39c66c;
  --blue: #49a9ff;
  --red: #ff5968;
  --shadow: 0 16px 30px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(255, 157, 33, 0.16), transparent 26%),
    linear-gradient(180deg, #04070c 0%, #080c12 100%);
  color: var(--text);
  font-family: "Barlow", sans-serif;
}

body {
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

.store-app {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.store-shell {
  width: 100%;
  max-width: 430px;
  padding:
    calc(8px + env(safe-area-inset-top))
    8px
    18px;
}

.store-header {
  display: grid;
  gap: 12px;
}

.brand-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.brand-badge,
.mode-pill,
.lang-btn,
.category-pill,
.bottom-btn,
.product-add,
.sheet-btn,
.sheet-close,
.meta-select {
  font: inherit;
  border: none;
  cursor: pointer;
}

.brand-badge {
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffb656, var(--orange));
  color: #181008;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-wordmark {
  display: grid;
  gap: 1px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 28px;
  line-height: 0.9;
  letter-spacing: 0.16em;
}

.header-controls {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.mode-pill,
.lang-switch,
.category-pill,
.meta-chip,
.sheet-kicker {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.mode-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(243, 202, 68, 0.7);
}

.lang-switch {
  display: inline-flex;
  gap: 4px;
  border-radius: 12px;
  padding: 4px;
}

.lang-btn {
  border-radius: 8px;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.lang-btn.active {
  background: var(--orange);
  color: #170f08;
}

.title-row h1 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 28px;
  line-height: 0.98;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-wrap {
  display: block;
}

.store-search,
.meta-select,
.sheet-input,
.sheet-textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 12px 14px;
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 6px;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex: 0 0 auto;
  border-radius: 12px;
  padding: 11px 22px;
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.category-pill.active {
  color: var(--text);
  background: rgba(255, 157, 33, 0.12);
  border-color: rgba(255, 157, 33, 0.32);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 6px;
}

.product-card {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(17, 23, 32, 0.98), rgba(10, 14, 21, 0.98));
  box-shadow: var(--shadow);
  padding: 12px 12px 14px;
  display: grid;
  align-content: space-between;
}

.product-card::before,
.product-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.product-card::before {
  width: 106px;
  height: 106px;
  right: -26px;
  bottom: -18px;
  opacity: 0.16;
}

.product-card::after {
  width: 62px;
  height: 62px;
  right: 18px;
  bottom: 14px;
  opacity: 0.08;
}

.tone-yellow {
  border-color: rgba(243, 202, 68, 0.38);
}

.tone-yellow::before,
.tone-yellow::after {
  background: var(--yellow);
}

.tone-green {
  border-color: rgba(57, 198, 108, 0.38);
}

.tone-green::before,
.tone-green::after {
  background: var(--green);
}

.tone-orange {
  border-color: rgba(255, 157, 33, 0.38);
}

.tone-orange::before,
.tone-orange::after {
  background: var(--orange);
}

.tone-blue {
  border-color: rgba(73, 169, 255, 0.38);
}

.tone-blue::before,
.tone-blue::after {
  background: var(--blue);
}

.tone-red {
  border-color: rgba(255, 89, 104, 0.38);
}

.tone-red::before,
.tone-red::after {
  background: var(--red);
}

.product-top,
.product-info,
.product-footer {
  position: relative;
  z-index: 1;
}

.product-top {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 92px;
}

.product-emoji {
  font-size: 70px;
  line-height: 1;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.34));
}

.product-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 89, 104, 0.96);
  color: #fff7f8;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.product-name {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 22px;
  line-height: 0.96;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-price {
  margin-top: 5px;
  color: #d4dce7;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 24px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.product-meta {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.product-add {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 157, 33, 0.16);
  color: #ffd59d;
  border: 1px solid rgba(255, 157, 33, 0.24);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding:
    10px 16px
    calc(10px + env(safe-area-inset-bottom));
  background: rgba(4, 7, 12, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.bottom-btn {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  background: transparent;
  color: var(--muted);
}

.bottom-btn.active {
  color: var(--orange);
}

.bottom-icon {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.bottom-btn strong {
  position: absolute;
  top: -2px;
  right: 34%;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #130e08;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 30;
}

.store-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 31;
  max-height: 82vh;
  overflow-y: auto;
  background: #0a1018;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -24px 46px rgba(0, 0, 0, 0.42);
  padding:
    18px
    16px
    calc(18px + env(safe-area-inset-bottom));
}

.sheet-head,
.total-row,
.sheet-actions,
.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sheet-kicker {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--orange);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sheet-head h2 {
  margin: 6px 0 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 34px;
  text-transform: uppercase;
}

.sheet-close {
  background: transparent;
  color: var(--muted);
}

.site-panel,
.cart-list,
.cart-totals,
.checkout-form,
.sheet-actions,
.order-history,
.history-list {
  display: grid;
  gap: 12px;
}

.site-panel,
.cart-list,
.cart-totals,
.checkout-form,
.sheet-actions,
.order-history {
  margin-top: 16px;
}

.sheet-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sheet-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.meta-chip {
  border-radius: 14px;
  padding: 10px 12px;
}

.meta-chip span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.meta-chip strong {
  display: block;
  margin-top: 5px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 22px;
}

.cart-item,
.history-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.cart-item-title,
.history-title {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 24px;
  text-transform: uppercase;
}

.cart-item p,
.history-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.cart-totals {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sheet-btn {
  border-radius: 14px;
  padding: 14px 16px;
}

.sheet-btn.primary {
  background: linear-gradient(135deg, #ffb552, var(--orange));
  color: #1a1207;
}

.sheet-btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
}

.store-toast {
  position: fixed;
  left: 50%;
  bottom: calc(94px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 402px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(57, 198, 108, 0.18);
  border: 1px solid rgba(57, 198, 108, 0.24);
  color: #e8ffef;
  z-index: 40;
}

[data-theme="dim"] {
  --bg: #02050a;
  --surface: #070b11;
  --surface-2: #0d1219;
}

@media (min-width: 640px) {
  .store-shell {
    max-width: 980px;
  }

  .title-row h1 {
    font-size: 46px;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
