:root {
  color-scheme: dark;
  --bg-app: #0c0c0f;
  --bg-section: rgba(19, 19, 24, 0.94);
  --bg-card: rgba(24, 24, 30, 0.96);
  --bg-glass: rgba(34, 34, 44, 0.55);
  --bg-glass-hover: rgba(46, 46, 58, 0.72);
  --border-glass: rgba(255, 255, 255, 0.28);
  --border-strong: rgba(255, 255, 255, 0.45);
  --text-main: #f7f7f7;
  --text-muted: rgba(230, 230, 238, 0.72);
  --accent: #ff6b4a;
  --accent-soft: rgba(255, 107, 74, 0.28);
  --shadow-strong: 0 24px 48px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 16px 32px rgba(0, 0, 0, 0.35);
  --radius-md: 16px;
  --radius-full: 999px;
  --transition-fast: 140ms ease;
  --transition-mid: 220ms ease;
  --glass-highlight: linear-gradient(180deg, rgba(255,255,255,0.65) 0%, rgba(255,255,255,0.1) 54%, rgba(255,255,255,0) 100%);
  font-family: "SF Pro Display", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-main);
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overflow-x: hidden;
}

body::-webkit-scrollbar {
  display: none;
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

/* Скроллбар только для страницы оформления - оранжевый */
.cart-sheet {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(34, 34, 40, 0.6);
}

.cart-sheet::-webkit-scrollbar {
  width: 6px;
}

.cart-sheet::-webkit-scrollbar-track {
  background: rgba(34, 34, 40, 0.6);
  border-radius: 999px;
}

.cart-sheet::-webkit-scrollbar-thumb {
  background: linear-gradient(145deg, var(--accent), rgba(255, 140, 100, 0.9));
  border-radius: 999px;
}

/* Browser Banner - Open in Telegram */
.browser-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #1a1a24 0%, #0f0f15 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.browser-banner.hidden {
  display: none;
}

.browser-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.browser-banner-icon {
  font-size: 20px;
}

.browser-banner-text {
  font-size: 14px;
  color: var(--text-muted);
}

.browser-banner-button {
  background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.browser-banner-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
}

.browser-banner-button:active {
  transform: translateY(0);
}

body::-webkit-scrollbar-corner {
  background: var(--bg-app);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

.app {
  min-height: 100vh;
  max-width: 100%;
  margin: 0 auto;
  padding: 14px clamp(2px, 1.4vw, 6px) calc(112px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-x: hidden;
}

body.checkout-open {
  overflow: hidden;
}

body.checkout-open .cart-fab {
  opacity: 0;
  pointer-events: none;
}

body.checkout-open .search-sticky-wrapper {
  display: none;
}

body.preview-open {
  overflow: hidden;
}

body.preview-open .cart-fab {
  opacity: 0;
  pointer-events: none;
}

body.preview-open .search-sticky-wrapper {
  display: none;
}

body.city-picker-open {
  overflow: hidden;
}

.catalog-title-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.catalog-title-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.catalog-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2px, 1vw, 6px);
  padding: clamp(2px, 0.8vw, 4px) 0 clamp(8px, 2vw, 12px);
}

.catalog-hero-brand {
  font-size: clamp(42px, 11vw, 64px);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, 
    rgba(180, 180, 190, 0.95) 0%, 
    rgba(140, 140, 155, 0.85) 50%, 
    rgba(110, 110, 130, 0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin: 0 0 clamp(2px, 0.8vw, 6px) 0;
  padding: clamp(2px, 0.8vw, 6px) 0;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.catalog-hero-cards {
  width: min(540px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1.8vw, 12px);
  padding: 0;
}

.snow-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.9), transparent),
    radial-gradient(2px 2px at 10px 20px, rgba(255,255,255,0.65), transparent),
    radial-gradient(3px 3px at 50px 60px, rgba(255,255,255,0.5), transparent);
  background-size: 140px 200px, 200px 280px, 260px 360px;
  animation:
    snow-fall-1 18s linear infinite,
    snow-fall-2 26s linear infinite reverse,
    snow-fall-3 22s linear infinite;
  opacity: 0.7;
  mix-blend-mode: screen;
}

@keyframes snow-fall-1 {
  from { background-position: 0 -200px, 0 -160px, 0 -120px; }
  to   { background-position: 0 200px, 0 240px, 0 280px; }
}

@keyframes snow-fall-2 {
  from { background-position: 0 -220px, 0 -260px, 0 -180px; }
  to   { background-position: 0 220px, 0 260px, 0 180px; }
}

@keyframes snow-fall-3 {
  from { background-position: 0 -240px, 0 -200px, 0 -260px; }
  to   { background-position: 0 240px, 0 200px, 0 260px; }
}

.catalog-hero-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: clamp(10px, 2.5vw, 12px) clamp(12px, 3vw, 15px);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 18px rgba(0, 0, 0, 0.22);
  color: var(--text-main);
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-mid);
}

.catalog-hero-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  padding: 3px 6px;
  border-radius: 8px;
  line-height: 1;
  transition: color 0.3s, background-color 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-indicator.store-status--closed {
  color: #ff6b4a;
  background: rgba(255, 107, 74, 0.12);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: currentColor;
}

.catalog-hero-card--wide {
  grid-column: 1 / -1;
}

.catalog-hero-card--link {
  background: linear-gradient(140deg, rgba(255, 107, 74, 0.22), rgba(255, 152, 20, 0.18));
  border-color: rgba(255, 153, 85, 0.35);
  cursor: pointer;
}

.catalog-hero-card--link:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 28px rgba(255, 116, 44, 0.32);
}

.catalog-hero-card--link:active {
  transform: translateY(0);
}

.catalog-hero-card-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(230, 230, 238, 0.66);
}

.catalog-hero-card-value {
  font-size: clamp(14px, 3.2vw, 16px);
  font-weight: 700;
  line-height: 1.2;
  user-select: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-hero-card-sub {
  font-size: 11px;
  color: rgba(230, 230, 238, 0.72);
  line-height: 1.3;
}

@media (min-width: 640px) {
  .catalog-hero {
    padding: clamp(22px, 5vw, 34px) 0 clamp(16px, 4vw, 22px);
  }

  .catalog-hero-cards {
    grid-template-columns: 1fr 1fr;
    gap: clamp(12px, 2.5vw, 16px);
  }

  .catalog-hero-card {
    padding: 13px 16px;
  }

  .catalog-hero-card-value {
    font-size: 15px;
  }

  .catalog-hero-card-sub {
    font-size: 12px;
  }
}

@media (min-width: 768px) {
  .catalog-hero-brand {
    font-size: clamp(56px, 14vw, 84px);
  }

  .catalog-hero-cards {
    gap: 14px;
  }
}

@media (max-width: 340px) {
  .catalog-hero-card {
    padding: 12px 14px;
  }

  .catalog-hero-card-value {
    font-size: 15px;
  }
}

.search-sticky-wrapper {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px));
  z-index: 100;
  margin: 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  transition: box-shadow var(--transition-mid), transform var(--transition-fast), background var(--transition-mid);
}

.search-sticky-wrapper.search-sticky--floating {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 4px);
  left: 50%;
  transform: translateX(-50%);
  width: min(98%, calc(100vw - 16px));
  margin: 0;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.search-sticky-wrapper.search-sticky--floating .search-bar {
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background var(--transition-mid), border var(--transition-fast), box-shadow var(--transition-mid);
}

.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 14px;
}

.search-sticky-spacer {
  display: none;
  width: 100%;
  height: 0;
  pointer-events: none;
}

.search-sticky-wrapper.search-sticky--floating + .search-sticky-spacer {
  display: none;
}

.search-bar input::placeholder {
  color: rgba(230, 230, 238, 0.6);
}

.search-bar input:focus {
  outline: none;
}

.search-icon {
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.7);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M15.5 14h-.79l-.28-.27a6.471 6.471 0 0 0 1.57-4.23A6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.02 14 5 11.98 5 9.5S7.02 5 9.5 5s4.5 2.02 4.5 4.5S11.98 14 9.5 14z"/></svg>') center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M15.5 14h-.79l-.28-.27a6.471 6.471 0 0 0 1.57-4.23A6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.02 14 5 11.98 5 9.5S7.02 5 9.5 5s4.5 2.02 4.5 4.5S11.98 14 9.5 14z"/></svg>') center/contain no-repeat;
}

.search-bar button {
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.search-bar button.show {
  opacity: 1;
  pointer-events: auto;
}

.categories-bar {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.category-chip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  flex: 0 0 auto;
  cursor: pointer;
  transition: background var(--transition-mid), border var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.category-chip.active {
  background: linear-gradient(145deg, rgba(255, 107, 74, 0.65), rgba(255, 152, 20, 0.55));
  border-color: rgba(255, 152, 20, 0.6);
  color: var(--text-main);
  box-shadow: 0 6px 16px rgba(255, 116, 44, 0.28);
}

.category-chip:active {
  transform: scale(0.97);
}

.glass-button {
  position: relative;
  padding: 14px 20px;
  border-radius: 18px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--shadow-soft);
  transition: background var(--transition-mid), border var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-mid);
}

.glass-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--glass-highlight);
  opacity: 0.78;
  pointer-events: none;
}

.glass-button.primary {
  background: linear-gradient(145deg, rgba(255, 107, 74, 0.65), rgba(255, 152, 20, 0.55));
  border-color: rgba(255, 153, 85, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 18px 36px rgba(255, 116, 44, 0.32);
}

.glass-button.primary:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 22px 44px rgba(255, 116, 44, 0.42);
}

.glass-button.ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.glass-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.cart-fab {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 12px));
  min-width: 0;
  padding: 12px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(26, 26, 32, 0.92);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-mid), border var(--transition-fast), opacity var(--transition-mid);
  z-index: 45;
  overflow: hidden;
  isolation: isolate;
  --cart-progress: 0;
}

.cart-fab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.22) 0%, rgba(255, 152, 20, 0.2) 45%, rgba(255, 187, 100, 0.16) 100%);
  transform-origin: left center;
  transform: scaleX(var(--cart-progress));
  transition: transform var(--transition-mid);
  z-index: 0;
}

.cart-fab::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 0;
}

.cart-fab > * {
  position: relative;
  z-index: 1;
}

.cart-fab.cart-fab-free {
  border-color: rgba(255, 130, 74, 0.55);
  box-shadow: 0 26px 52px rgba(255, 107, 74, 0.3);
}

.cart-fab--pulse {
  animation: cartFabPulse 520ms ease;
}

.cart-fab:active {
  transform: translateX(-50%) scale(0.99);
}

.cart-fab-empty {
  opacity: 0.75;
}

.cart-fab-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.cart-fab-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.cart-fab-title {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cart-fab-count {
  font-size: 14px;
  font-weight: 600;
  color: rgba(230, 230, 238, 0.82);
}

.cart-fab-status {
  display: block;
  font-size: 12px;
  color: rgba(230, 230, 238, 0.6);
  line-height: 1.35;
  max-width: 100%;
  word-break: break-word;
}

.cart-fab-status.success {
  color: var(--accent);
  font-weight: 600;
}

.cart-fab-total {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.cart-fab-action {
  font-size: 13px;
  color: rgba(230, 230, 238, 0.68);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cart-preview {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0;
}

.cart-preview.hidden {
  display: none;
}

.cart-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 12, 0.66);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.cart-preview-content {
  position: relative;
  width: min(100%, 420px);
  max-width: 420px;
  height: calc(100vh - (24px + env(safe-area-inset-top, 0px)));
  background: rgba(22, 22, 30, 0.84);
  border-radius: 24px 24px 0 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  padding: clamp(12px, 2.5vw, 20px) clamp(12px, 3vw, 18px) 0 clamp(12px, 3vw, 18px);
  margin-top: calc(16px + env(safe-area-inset-top, 0px));
  overflow: hidden;
  overflow-x: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cart-preview-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 0 20px;
}

.cart-preview-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.cart-preview-title h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.01em;
}

.cart-preview-count {
  font-size: 13px;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 107, 74, 0.14);
  border: 1px solid rgba(255, 153, 85, 0.35);
}

.cart-preview-close {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast), border var(--transition-fast), transform var(--transition-fast);
}

.cart-preview-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  transform: scale(1.02);
}

.cart-preview-hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
  font-weight: 600;
}

.cart-preview-hint.hint-success {
  color: var(--accent);
}

.cart-preview-scroll {
  flex: 1;
  overflow-y: auto;
  margin: 6px -6px 12px 0;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-preview-scroll::-webkit-scrollbar {
  width: 6px;
}

.cart-preview-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.cart-preview-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(145deg, rgba(255, 107, 74, 0.7), rgba(255, 152, 20, 0.6));
  border-radius: 999px;
}

.cart-preview-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(145deg, rgba(255, 107, 74, 0.85), rgba(255, 152, 20, 0.75));
}

.cart-preview-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
}

.cart-preview-items--pulse {
  animation: cartListPulse 0.6s ease;
}

.cart-preview-suggestions-wrapper {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  margin-top: 4px;
}

.cart-preview-suggestions {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.cart-preview-suggestions.active {
  display: flex;
}

.cart-preview-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 8px;
  padding: 9px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-preview-thumb {
  width: 60px;
  height: 60px;
  border-radius: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-preview-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-left: 0;
}

.cart-preview-item-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-preview-item-meta {
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  line-height: 1.25;
  overflow: visible;
  text-overflow: initial;
  white-space: normal;
  max-width: 100%;
}

.cart-preview-item-meta-line {
  display: block;
}

.cart-preview-item-meta-line--storage {
  opacity: 0.85;
  font-size: 13px;
}

.cart-preview-item-meta-line + .cart-preview-item-meta-line {
  margin-top: 1px;
}

.cart-preview-item-price {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  column-gap: 10px;
  row-gap: 2px;
  font-size: 12px;
  align-items: baseline;
}

.cart-preview-item-qty {
  color: var(--text-muted);
  font-size: 12px;
}

.cart-preview-item-total {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.cart-preview-item-cash {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

.cart-preview-item-status {
  font-size: 12px;
  color: var(--text-muted);
}

.cart-preview-item-status--warn {
  color: #ff9c69;
}

.cart-preview-remove {
  align-self: flex-start;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(230, 230, 238, 0.78);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: background var(--transition-fast), border var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.cart-preview-remove:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--text-main);
  transform: translateY(-1px);
}

.cart-preview-cta {
  margin-top: auto;
  padding-top: clamp(8px, 2vh, 16px);
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

.cart-preview-cta .glass-button.primary {
  background: linear-gradient(145deg, rgba(255, 107, 74, 1), rgba(255, 145, 80, 0.94));
  border-color: rgba(255, 130, 74, 0.65);
  box-shadow: 0 24px 46px rgba(255, 107, 74, 0.32);
  color: #fff;
  font-size: 16px;
  padding: 14px 20px;
  width: 100%;
}

.cart-preview-cta .glass-button.primary:hover {
  box-shadow: 0 28px 52px rgba(255, 107, 74, 0.4);
}

.cart-preview-cta .glass-button {
  width: 100%;
  justify-content: center;
  padding: 14px clamp(16px, 4.5vw, 24px);
  font-size: 15px;
}

.cart-preview-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: clamp(12px, 3.5vh, 24px);
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

.cart-preview-totals {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 3vw, 16px);
  padding: clamp(12px, 3vw, 18px) clamp(14px, 3.5vw, 22px);
  background: linear-gradient(160deg, rgba(26, 26, 32, 0.88) 0%, rgba(20, 20, 26, 0.74) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  align-self: stretch;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: left;
}

.cart-preview-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: clamp(8px, 3vw, 20px);
  min-width: 0;
  flex-wrap: wrap;
}

.cart-preview-total-row span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(230, 230, 238, 0.65);
  white-space: nowrap;
  flex: 1 1 auto;
}

.cart-preview-total-row strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  white-space: nowrap;
  margin-left: auto;
  text-align: right;
  flex: 0 0 auto;
}

.cart-preview-total-row.accent strong {
  color: var(--accent);
}

.cart-preview-total-row.discount span,
.cart-preview-total-row.discount strong {
  color: #4ade80;
}

.cart-preview-total-row.discount strong {
  font-weight: 700;
}

.cart-preview-footer .glass-button {
  width: 100%;
  justify-content: center;
  padding: 16px clamp(18px, 5vw, 26px);
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(145deg, rgba(255, 107, 74, 1), rgba(255, 145, 80, 0.94));
  border-color: rgba(255, 130, 74, 0.65);
  box-shadow: 0 24px 46px rgba(255, 107, 74, 0.32);
  color: #fff;
}

.cart-preview-footer .glass-button:hover {
  box-shadow: 0 28px 52px rgba(255, 107, 74, 0.4);
  transform: translateY(-1px);
}

@media (max-height: 640px) and (max-width: 1023px) {
  .cart-preview-content {
    height: calc(100vh - (16px + env(safe-area-inset-top, 0px)));
    padding: 16px;
    margin-top: calc(16px + env(safe-area-inset-top, 0px));
    border-radius: 20px 20px 0 0;
  }

  .cart-preview-title h2 {
    font-size: 20px;
  }

  .cart-preview-count {
    font-size: 12px;
    padding: 3px 8px;
  }

  .cart-preview-scroll {
    margin: 12px -4px 26px 0;
    gap: 16px;
  }

  .cart-preview-item {
    grid-template-columns: 60px 1fr auto;
    gap: 8px;
    padding: 9px;
  }

  .cart-preview-thumb {
    width: 60px;
    height: 60px;
  }

  .cart-preview-footer {
    padding-top: 8px;
    gap: 12px;
  }

  .cart-preview-totals {
    gap: 10px;
    padding: 10px 14px;
  }

  .cart-preview-total-row span {
    font-size: 10px;
  }

  .cart-preview-total-row strong {
    font-size: 17px;
  }

  .cart-preview-footer .glass-button {
    padding: 14px;
    font-size: 15px;
  }

  .suggestion-card {
    grid-template-columns: 70px 1fr;
    grid-template-areas:
      "media info"
      "media action";
    gap: 10px 14px;
    padding: 12px 6px 14px;
  }

  .suggestion-card__media {
    width: 70px;
    height: 70px;
  }

  .suggestion-card__title {
    font-size: 13px;
  }

  .suggestion-card__price {
    gap: 8px;
  }
}

@media (max-width: 420px) and (pointer: coarse) {
  .cart-preview-content {
    width: 100vw;
    padding: 14px 18px 0 10px;
  }

  .cart-preview-item {
    grid-template-columns: 60px 1fr auto;
    gap: 8px;
  }

  .cart-preview-remove {
    grid-column: auto;
    justify-self: end;
    margin-top: 0;
  }

  .cart-preview-suggestions {
    padding-top: 12px;
  }

  .suggestion-card {
    grid-template-columns: 66px 1fr;
    grid-template-areas:
      "media info"
      "media action";
    gap: 12px;
    padding: 10px 4px 14px;
  }

  .suggestion-card__media {
    width: 66px;
    height: 66px;
  }

  .suggestion-card__info {
    gap: 5px;
  }

  .suggestion-card__price {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .suggestion-card__price-card {
    font-size: 13px;
  }

  .suggestion-card__price-cash {
    font-size: 11px;
  }

  .suggestion-card__action {
    justify-self: stretch;
    align-self: flex-start;
    width: 100%;
    text-align: center;
    padding: 9px;
  }
}


.cart-suggestions {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.cart-suggestions.active {
  display: flex;
}

.cart-suggestions-title {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(230, 230, 238, 0.6);
  text-align: left;
  margin: 0;
  padding: 8px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-suggestions-title:first-child {
  padding-top: 0;
  border-top: none;
}

.cart-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "media info"
    "media action";
  align-items: start;
  gap: 12px 16px;
  padding: 12px 6px 16px;
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
  flex: 1 1 100%;
}

.suggestion-card:last-child {
  border-bottom: none;
  padding-bottom: 8px;
}

.suggestion-card__media {
  grid-area: media;
  width: 76px;
  height: 76px;
  border-radius: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.suggestion-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.suggestion-card__info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.suggestion-card__title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.24;
}

.suggestion-card__price {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: baseline;
}

.suggestion-card__price-card {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.suggestion-card__price-cash {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.suggestion-card__action {
  grid-area: action;
  justify-self: flex-start;
  align-self: flex-start;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), border var(--transition-fast);
  flex-shrink: 0;
}

.suggestion-card--preview .suggestion-card__media {
  width: 64px;
  height: 64px;
}

.suggestion-card--preview .suggestion-card__title {
  font-size: 13px;
}

.suggestion-card--preview .suggestion-card__action {
  padding: 9px 18px;
  font-size: 12px;
}

.suggestion-card--checkout .suggestion-card__title {
  font-size: 13.5px;
}

.suggestion-card--checkout .suggestion-card__action {
  padding: 9px 18px;
  font-size: 12px;
}

.suggestion-card__action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.cart-suggestions--checkout {
  margin-top: 2px;
}

.cart-suggestions--checkout .suggestion-card {
  flex: 1 1 200px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  gap: 12px 14px;
  border-bottom: none;
}

.cart-suggestions--checkout .suggestion-card:last-child {
  padding-bottom: 14px;
}

.cart-suggestions--checkout .suggestion-card__media {
  width: 70px;
  height: 70px;
  border-radius: 14px;
}

.cart-suggestions--checkout .cart-suggestions-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.cart-preview-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.catalog {
  display: grid;
  gap: 12px;
}

.catalog-empty {
  padding: 24px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.product-card {
  padding: 6px 8px;
  border-radius: 13px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  max-width: 100%;
  width: 100%;
  justify-self: center;
}

.product-media-wrapper {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.product-media-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-media {
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  background: transparent;
  aspect-ratio: 1 / 1;
  max-height: clamp(140px, 32vh, 210px);
  flex: 1;
}

.product-gallery {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-gallery::-webkit-scrollbar {
  display: none;
}

.product-gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  overflow: hidden;
}

.product-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-mid);
}

.product-card--transparent-images .product-gallery-slide img,
.product-card--transparent-images .product-thumb img,
.product-card--transparent-images .suggestion-card__media img {
  background: transparent;
}

.product-gallery-slide--zoomed img {
  transform-origin: center;
}

.product-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 2px 0 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
}

.product-thumbs.hidden {
  display: none;
}

.product-thumbs::-webkit-scrollbar {
  display: none;
}

.product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), border var(--transition-fast);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-thumb.active {
  border-color: rgba(255, 153, 85, 0.85);
  box-shadow: 0 8px 18px rgba(255, 116, 44, 0.28);
}

.product-thumb:active {
  transform: scale(0.96);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  text-align: center;
}

.product-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.01em;
}

.product-heading .tagline {
  display: none;
}

.variant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

.variant-pill {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), border var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.variant-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.variant-pill.active {
  border-color: rgba(255, 153, 85, 0.95);
  background: rgba(255, 153, 85, 0.18);
  box-shadow: 0 0 0 2px rgba(255, 153, 85, 0.3), 0 12px 26px rgba(255, 107, 74, 0.28);
}

.variant-pill.disabled,
.variant-pill[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.variant-pill.disabled:hover,
.variant-pill[disabled]:hover {
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.28);
}

.variant-label {
  display: none;
}

.product-heading-top {
  display: flex;
  justify-content: center;
  width: 100%;
}

.product-heading-top h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.product-spec-line {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  text-align: center;
  font-weight: 500;
}

.product-config {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  width: 100%;
  overflow: visible;
}

.product-config-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  overflow: visible;
}

.product-config-row--colors {
  justify-content: flex-end;
  justify-self: end;
  max-width: 100%;
  overflow: visible;
}

.product-config-row--colors .variant-pills {
  justify-content: flex-end;
  overflow: visible;
}

.product-config-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 107, 74, 0.18);
  justify-self: center;
  transition: height 0.2s ease;
}

.product-config-row--storage {
  justify-content: flex-start;
  justify-self: start;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
}

.storage-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

@media (min-width: 640px) {
  .product-card {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .product-media {
    aspect-ratio: 10 / 12;
    max-height: 260px;
  }

  .product-thumbs {
    justify-content: center;
    overflow: hidden;
  }
}

@media (max-width: 520px) {
  .product-visual-row {
    gap: 6px;
  }

  .product-config-divider {
    height: 30px;
  }

  .variant-pills {
    gap: 6px;
  }

  .storage-row {
    gap: 6px;
  }
}

.storage-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 12px;
  transition: border var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  line-height: 1.2;
  min-width: 68px;
}

.storage-btn:hover {
  transform: translateY(-1px);
}

.storage-btn.active {
  border-color: rgba(255, 153, 85, 0.9);
  background: rgba(255, 153, 85, 0.15);
  box-shadow: 0 2px 8px rgba(255, 153, 85, 0.25);
}

.storage-btn.unavailable {
  opacity: 0.4;
  border-style: dashed;
  cursor: not-allowed;
}

.storage-btn.unavailable:hover {
  transform: none;
}

.price-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.price-line .price-card {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 8px;
  font-size: 16px;
  line-height: 1.1;
  min-width: 0;
  white-space: nowrap;
}

.price-line .price-cash {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  gap: 8px;
  font-size: 16px;
  line-height: 1.1;
  min-width: 0;
  white-space: nowrap;
}

.price-line .price-card {
  font-weight: 600;
  color: rgba(230, 230, 238, 0.82);
}

.price-line .price-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 107, 74, 0.18);
  justify-self: center;
  transition: height 0.2s ease;
}

.price-line .price-card::before,
.price-line .price-cash::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.price-line .price-card::before {
  content: "Карта";
  color: rgba(230, 230, 238, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.price-line .price-cash {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.price-line .price-cash::before {
  content: "Наличные";
  color: rgba(255, 173, 110, 0.95);
  background: rgba(255, 153, 85, 0.18);
  border: 1px solid rgba(255, 153, 85, 0.38);
  box-shadow: 0 8px 18px rgba(255, 107, 74, 0.2);
}

.price-line .price-card[data-state="empty"]::before,
.price-line .price-cash[data-state="empty"]::before,
.price-line .price-cash[data-state="unavailable"]::before {
  display: none;
}

.price-line .price-cash[data-state="unavailable"] {
  color: rgba(230, 230, 238, 0.6);
  font-weight: 600;
}

.product-actions {
  display: flex;
  gap: 6px;
  align-items: stretch;
  justify-content: space-between;
}

.product-actions .quantity {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  min-height: 34px;
}

.product-actions .glass-button {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  font-size: 13px;
}

.product-actions .quantity.quantity-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.product-actions .quantity button {
  width: 34px;
  height: 36px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 18px;
  cursor: pointer;
}

.product-actions .quantity span {
  min-width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.product-actions .glass-button {
  min-height: 38px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
  z-index: 50;
}

.cart-overlay.hidden {
  display: none;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, 0.75);
  backdrop-filter: blur(14px);
}

.cart-sheet {
  position: relative;
  width: min(820px, 100vw);
  max-width: 100%;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 0;
  background: rgba(16, 16, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: calc(28px + env(safe-area-inset-top, 0px)) clamp(18px, 4vw, 42px) calc(26px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.55);
  animation: slideUp 250ms ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1;
  margin: 0 auto;
  flex: 1 1 auto;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cart-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
}

.cart-back {
  position: sticky;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  z-index: 3;
}

.cart-back-icon {
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.8);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>') center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>') center/contain no-repeat;
}

.cart-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-header-text h2 {
  margin: 0;
  font-size: 22px;
}

.cart-counter {
  font-size: 13px;
  color: var(--text-muted);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  max-height: none;
  overflow-y: visible;
  flex: 0 0 auto;
}

.cart-items:empty {
  display: none;
}

.cart-items::before {
  content: 'Ваш заказ';
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.cart-items .cart-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  grid-template-rows: auto auto auto;
  gap: 12px 16px;
  align-items: start;
  
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  padding: 12px 0;
  box-shadow: none;
}

.cart-items .cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cart-items .cart-item:first-child {
  padding-top: 0;
}

.cart-items .cart-item img {
  grid-row: 1 / 3;
  width: 100px;
  height: 100px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Растягиваем кнопки на всю ширину */
.cart-items .cart-item .product-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.cart-items .cart-item .product-actions .quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.cart-items .cart-item .product-actions .quantity button {
  width: 36px;
  height: 36px;
  font-size: 16px;
  border-radius: 10px;
}

.cart-items .cart-item .product-actions .quantity span {
  min-width: 32px;
  font-size: 15px;
  text-align: center;
}

.cart-items .cart-item .product-actions .glass-button {
  flex: 1;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
}

.cart-items--pulse {
  animation: cartListPulse 0.6s ease;
}

.cart-empty {
  padding: 32px 12px;
  text-align: center;
  color: var(--text-muted);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}


/* Standalone cart items (e.g. in preview) keep the card style */
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-rows: auto auto;
  gap: 10px 14px;
  align-items: start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-mid), border var(--transition-fast), background var(--transition-mid);
}

.cart-item.cart-item--added {
  animation: cartItemAdded 640ms ease;
  border-color: rgba(255, 153, 85, 0.45);
}

@keyframes cartItemAdded {
  0% {
    transform: scale(1);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.05);
  }
  45% {
    transform: scale(1.015);
    box-shadow: 0 22px 48px rgba(255, 107, 74, 0.28);
    background: rgba(255, 107, 74, 0.12);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.05);
  }
}

.cart-item img {
  grid-row: 1 / 3;
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  background: transparent;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  padding: 0;
  align-self: center;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
  text-align: left;
}

.cart-item-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}

.cart-item-meta {
  font-size: 13px;
  color: rgba(230, 230, 238, 0.75);
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.cart-item-meta-line {
  display: block;
}

.cart-item-meta-line--description {
  font-size: 13px;
  color: rgba(230, 230, 238, 0.65);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-meta-line--variant {
  font-weight: 500;
  color: rgba(230, 230, 238, 0.7);
}

.cart-item-meta-line--storage {
  opacity: 1;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(230, 230, 238, 0.85);
}

.cart-item-meta-line + .cart-item-meta-line {
  margin-top: 2px;
}

.cart-item-price {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px 10px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.cart-item-price-qty {
  font-size: 12px;
  color: rgba(230, 230, 238, 0.6);
}

.cart-item-price-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.cart-item-price-total--unavailable {
  color: rgba(230, 230, 238, 0.5);
  font-weight: 600;
}

.cart-item-price-card {
  font-size: 14px;
  font-weight: 700;
}

.cart-item-price-cash {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.cart-item-status {
  font-size: 13px;
  color: #ff9c69;
  margin: 6px 0;
}

.cart-item .product-actions {
  grid-column: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
}

.cart-item .product-actions .quantity {
  min-height: 32px;
}

.cart-item .product-actions .quantity button {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.cart-item .product-actions .quantity span {
  min-width: 28px;
  font-size: 14px;
}

.cart-item .product-actions .glass-button {
  min-height: 32px;
  padding: 0 14px;
  font-size: 12px;
}

.cart-summary {
  margin: 18px 0 8px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  align-items: center;
}

.summary-row span {
  color: var(--text-muted);
}

.summary-row strong {
  font-size: 18px;
}

.summary-row:last-child strong {
  color: var(--accent);
}

.cart-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(18px, 4vw, 26px);
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-soft);
  width: min(600px, 100%);
  margin: 0 auto;
  align-self: center;
}

.cart-form form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.cart-payment h3,
.cart-form h3 {
  margin: 18px 0 12px;
}

.payment-method-section {
  margin: 14px 0 14px;
  border: none;
  padding: 0;
}

.payment-method-section legend {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-main);
}

.payment-method-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 8px;
}

.payment-method-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all var(--transition-mid);
  position: relative;
  min-height: 80px;
}

.payment-method-option .payment-method-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.payment-method-option .payment-method-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.payment-method-option .payment-method-desc {
  font-size: 11px;
  opacity: 0.7;
  line-height: 1.2;
}

.payment-method-option .payment-method-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.payment-method-option input {
  display: none;
}

.payment-method-option.active {
  border-color: rgba(255, 153, 85, 0.75);
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.14), rgba(255, 152, 20, 0.12));
  box-shadow: 0 6px 16px rgba(255, 107, 74, 0.18);
}

.payment-method-option:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.payment-method-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.payment-method-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.payment-method-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.payment-location {
  font-weight: 500;
  color: var(--text-muted);
}

.payment-method-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.payment-method-option.active .payment-method-desc[data-discount-label] {
  color: var(--accent);
  font-weight: 600;
}

.cart-payment {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.payment-options {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  padding: 4px;
  flex-wrap: nowrap;
  width: 100%;
}

.payment-option {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 500;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background var(--transition-fast), color var(--transition-fast);
  line-height: 1.2;
  font-size: 14px;
}

.payment-option.active {
  background: linear-gradient(120deg, rgba(255, 107, 74, 0.65), rgba(255, 152, 20, 0.55));
  color: var(--text-main);
  font-weight: 600;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  align-items: stretch;
}

.form-row.compact {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}

.form-field {
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field--with-hint .input-hint-wrapper {
  position: relative;
  width: 100%;
}

.form-field--with-hint .input-hint-wrapper input {
  width: 100%;
}

.input-hint {
  position: absolute;
  top: 50%;
  left: calc(14px + 3.3ch);
  transform: translateY(-50%);
  color: rgba(230, 230, 238, 0.35);
  pointer-events: none;
  transition: opacity var(--transition-fast);
  font-size: 15px;
}

.input-hint.input-hint--hidden {
  opacity: 0;
}

.form-field.full-width {
  flex: 1 1 100%;
  width: 100%;
}

.form-row.compact .form-field {
  flex: 1 1 120px;
  max-width: 140px;
}

.form-row.compact input {
  text-align: center;
}

@media (max-width: 440px) {
  .cart-form {
    padding: 14px;
    gap: 12px;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-field {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .form-row.compact {
    flex-direction: row;
    gap: 8px;
  }

  .form-row.compact .form-field {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    max-width: none;
  }

  .form-field label,
  .field-label {
    font-size: 12px;
  }

  form input,
  form textarea {
    font-size: 14px;
    padding: 10px 12px;
  }

  .form-comment textarea {
    min-height: 64px;
  }
}

form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

form input,
form textarea {
  width: 100%;
  min-height: 52px;
  background: rgba(10, 10, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

form input::placeholder,
form textarea::placeholder {
  color: rgba(230, 230, 238, 0.55);
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: rgba(255, 153, 85, 0.75);
  box-shadow: 0 0 0 1px rgba(255, 153, 85, 0.45), 0 12px 28px rgba(0, 0, 0, 0.45);
  background: rgba(16, 16, 24, 0.96);
}

form textarea {
  resize: vertical;
  min-height: 92px;
}

form input.field-error,
form textarea.field-error {
  border-color: rgba(255, 107, 74, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 107, 74, 0.35);
  animation: shake 0.3s ease-in-out;
}

form input.field-error-static,
form textarea.field-error-static {
  border-color: rgba(255, 107, 74, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 107, 74, 0.35);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.delivery-toggle {
  margin: 16px 0 12px;
  border: none;
  padding: 0;
  display: flex;
  gap: 8px;
  width: 100%;
}

.delivery-toggle legend {
  display: none;
}

.toggle {
  padding: 10px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  flex: 1;
}

.toggle input {
  display: none;
}

.toggle.active {
  border-color: rgba(255, 153, 85, 0.85);
  background: linear-gradient(140deg, rgba(255, 107, 74, 0.25), rgba(255, 152, 20, 0.2));
}

.pickup-info {
  margin: 16px 0;
}

@media (max-width: 560px) {
  .pickup-info {
    margin: 12px 0;
  }
}

.address-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 16px;
}

.address-block .form-row {
  gap: 10px;
}

.address-block .form-field {
  flex: 1 1 160px;
}

.address-block .full-width {
  flex: 1 1 100%;
}

@media (max-width: 540px) {
  .address-block .form-row.compact input {
    text-align: left;
  }
}

.form-comment {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.form-comment textarea {
  width: 100%;
  min-height: 76px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  resize: vertical;
}

.form-comment textarea:focus {
  outline: none;
  border-color: rgba(255, 153, 85, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 107, 74, 0.25);
}

.cart-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.total-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.total-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.total-amount {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
}

.total-hint {
  font-size: 13px;
  color: rgba(255, 153, 85, 0.85);
  font-weight: 500;
  margin-top: 2px;
}

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.summary-breakdown {
  display: flex;
  gap: 8px;
  align-items: center;
}

.summary-items {
  font-size: 13px;
  color: var(--text-muted);
}

.checkout-button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(145deg, rgba(255, 107, 74, 0.95), rgba(255, 145, 80, 0.9));
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 22px 38px rgba(255, 107, 74, 0.32);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
  line-height: 1.2;
  min-height: 58px;
}

.checkout-button:hover:not(:disabled) {
  box-shadow: 0 26px 46px rgba(255, 107, 74, 0.42);
  transform: translateY(-1px);
}

.checkout-button:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.checkout-button:disabled {
  background: linear-gradient(145deg, rgba(60, 60, 70, 0.98), rgba(50, 50, 60, 0.92));
  color: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.checkout-button--ready {
  background: linear-gradient(145deg, rgba(255, 107, 74, 1), rgba(255, 145, 80, 0.94)) !important;
  border-color: rgba(255, 130, 74, 0.65);
  box-shadow: 0 24px 46px rgba(255, 107, 74, 0.32);
  color: #fff !important;
  font-size: 17px;
  font-weight: 700;
}

.checkout-button--ready:hover:not(:disabled) {
  box-shadow: 0 28px 52px rgba(255, 107, 74, 0.4);
  transform: translateY(-1px);
}

.checkout-button.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.72;
}

.checkout-button.is-loading::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: rgba(255, 255, 255, 0.15);
  margin-left: 8px;
  animation: checkout-spin 0.9s linear infinite;
}

.total span {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}

.total strong {
  font-size: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  padding: 14px 18px;
  border-radius: var(--radius-full);
  background: rgba(26, 26, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms ease;
  z-index: 55;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -8px);
}

.scroll-top-btn {
  position: fixed;
  right: 22px;
  bottom: 136px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 130, 74, 0.55);
  background: linear-gradient(145deg, rgba(255, 107, 74, 0.92), rgba(255, 145, 80, 0.86));
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 22px 44px rgba(255, 107, 74, 0.3);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity var(--transition-mid), transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  z-index: 80;
}

.scroll-top-btn.scroll-top-btn--activated {
  background: linear-gradient(145deg, rgba(255, 107, 74, 0.96), rgba(255, 145, 80, 0.9));
  border-color: rgba(255, 130, 74, 0.7);
  box-shadow: 0 26px 52px rgba(255, 107, 74, 0.38);
}

.scroll-top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-8px);
  visibility: visible;
}

.scroll-top-btn:hover {
  transform: translateY(-4px);
  background: linear-gradient(145deg, rgba(255, 107, 74, 0.96), rgba(255, 145, 80, 0.92));
  border-color: rgba(255, 130, 74, 0.7);
  box-shadow: 0 26px 52px rgba(255, 107, 74, 0.38);
}

.scroll-top-btn.scroll-top-btn--activated:hover {
  background: linear-gradient(145deg, rgba(255, 107, 74, 0.98), rgba(255, 145, 80, 0.94));
  border-color: rgba(255, 130, 74, 0.8);
  box-shadow: 0 30px 58px rgba(255, 107, 74, 0.45);
}

.scroll-top-btn:active {
  transform: scale(0.92);
}

.hidden {
  display: none !important;
}

@keyframes checkout-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cartListPulse {
  0% {
    transform: translateZ(0) scale(1);
    box-shadow: 0 0 0 rgba(255, 153, 85, 0);
  }
  40% {
    transform: translateZ(0) scale(1.01);
    box-shadow: 0 0 0 2px rgba(255, 153, 85, 0.25);
  }
  100% {
    transform: translateZ(0) scale(1);
    box-shadow: 0 0 0 rgba(255, 153, 85, 0);
  }
}

@keyframes cartItemFlash {
  0% {
    background: rgba(255, 153, 85, 0.35);
    border-color: rgba(255, 153, 85, 0.65);
  }
  60% {
    background: rgba(255, 153, 85, 0.16);
    border-color: rgba(255, 153, 85, 0.4);
  }
  100% {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
  }
}

@keyframes cartFabPulse {
  0% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.55);
  }
  45% {
    transform: translateX(-50%) scale(1.02);
    box-shadow: 0 30px 52px rgba(255, 107, 74, 0.45);
  }
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.55);
  }
}

@media (max-width: 560px) {
  .app {
    padding: 16px 6px calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .payment-method-section legend,
  .delivery-toggle legend {
    font-size: 14px;
  }

  .payment-method-options {
    gap: 6px;
    padding: 8px;
  }

  .payment-method-option {
    padding: 12px;
    gap: 10px;
  }

  .payment-method-icon {
    font-size: 20px;
  }

  .payment-method-title {
    font-size: 13px;
  }

  .payment-method-desc {
    font-size: 11.5px;
  }

  .total-block {
    padding: 14px 16px;
  }

  .total-amount {
    font-size: 22px;
  }

  .cart-footer {
    gap: 12px;
  }

  .top-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .cart-item {
    grid-template-columns: 100px 1fr auto;
    gap: 10px;
    padding: 12px;
  }

  .cart-item img {
    width: 100px;
    height: 100px;
    border-radius: 0;
  }

  .cart-item .product-actions {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-end;
    width: auto;
    gap: 6px;
  }

  .cart-item .product-actions .quantity {
    min-height: 38px;
  }

  .cart-item .product-actions .quantity button {
    width: 36px;
    height: 38px;
  }

  .cart-item .product-actions .quantity span {
    min-width: 38px;
  }

  .cart-item .product-actions .glass-button {
    min-height: 38px;
    padding: 0 16px;
  }

  .cart-item-price {
    align-items: flex-start;
  }

  .cart-item-price-cash {
    align-self: flex-start;
  }

  .cart-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .checkout-button {
    width: 100%;
  }

  .cart-fab {
    min-width: calc(100% - 10px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
    padding: 12px 18px;
  }
}

@media (min-width: 768px) {
  .product-card {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

/* Адаптивный дизайн для десктопа */
@media (min-width: 1024px) {
  html {
    scroll-behavior: smooth;
  }

  body {
    background: linear-gradient(135deg, #0a0a0e 0%, #0c0c0f 50%, #0e0e12 100%);
  }

  .app {
    max-width: 960px;
    padding: 24px clamp(16px, 4vw, 48px) calc(126px + env(safe-area-inset-bottom, 0px));
    gap: 28px;
  }

  .catalog {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .product-card {
    max-width: 100%;
    padding: 7px 10px;
    transition: transform var(--transition-mid), box-shadow var(--transition-mid);
  }

  .product-card:hover {
    transform: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  }

  .product-media {
    max-height: 220px;
    aspect-ratio: 10 / 11;
  }

  .product-info {
    gap: 5px;
  }

  .variant-pills {
    margin-bottom: 2px;
    flex-wrap: nowrap;
    gap: 5px;
  }

  .storage-row {
    flex-wrap: nowrap;
    gap: 5px;
  }

  .product-actions {
    gap: 5px;
  }

  .product-actions .glass-button {
    min-height: 38px;
  }

  .catalog-hero-brand {
    font-size: 84px;
    margin-bottom: 20px;
  }

  .catalog-hero-cards {
    max-width: 100%;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
  }

  .catalog-hero-card {
    padding: 14px 18px;
  }

  .catalog-hero-card-value {
    font-size: 16px;
  }

  .catalog-hero-card-sub {
    font-size: 12px;
  }

  .catalog-hero-card--wide {
    grid-column: span 1;
  }

  .categories-bar {
    gap: 12px;
    justify-content: center;
  }

  .category-chip {
    padding: 10px 18px;
    font-size: 15px;
  }

  .search-bar {
    padding: 14px 22px;
    max-width: 100%;
    margin: 0 auto;
  }

  .search-sticky-wrapper.search-sticky--floating {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    width: min(98%, calc(100vw - 32px));
  }

  .cart-preview {
    padding: clamp(20px, 4vw, 48px);
    justify-content: center;
    align-items: center;
  }

  .cart-preview-content {
    width: min(760px, 94vw);
    height: min(86vh, 820px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
  }

  .cart-overlay .cart-sheet {
    width: min(760px, 94vw);
    max-width: 760px;
    border-radius: 24px;
    margin: auto;
    height: auto;
    max-height: 90vh;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  }

  .cart-fab {
    bottom: clamp(20px, 3vh, 32px);
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 24px));
    padding: 16px 24px;
    border-radius: 26px;
  }

  .cart-fab:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 20px 48px rgba(255, 107, 74, 0.45);
  }

  .scroll-top-btn {
    width: 52px;
    height: 52px;
    bottom: 32px;
    right: 32px;
    font-size: 22px;
  }

  .scroll-top-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  }

  .glass-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  }

  .glass-button.primary:hover {
    box-shadow: 0 16px 40px rgba(255, 107, 74, 0.45);
  }

  .category-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
  }

  .category-chip.active:hover {
    transform: translateY(-1px) scale(1.02);
  }

  .delivery-toggle .toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
  }

  .cart-preview-item:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .cart-preview-remove:hover,
  .cart-back:hover {
    transform: translateY(-1px);
  }

  input:focus,
  textarea:focus {
    border-color: rgba(255, 153, 85, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
  }

  .product-thumb:hover {
    border-color: rgba(255, 153, 85, 0.6);
    transform: scale(1.05);
  }

  .storage-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
  }
}

@media (min-width: 1440px) {
  .app {
    max-width: 100%;
    padding: 32px clamp(12px, 3vw, 28px) calc(144px + env(safe-area-inset-bottom, 0px));
  }

  .catalog {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
  }

  .product-card {
    padding: 12px;
  }

  .cart-preview-content {
    width: min(720px, 96vw);
  }

  .cart-overlay .cart-sheet {
    width: min(720px, 96vw);
    max-width: 100%;
    border-radius: 28px;
    max-height: 92vh;
  }
}

.cart-preview-item.cart-item--added {
  animation: cartItemFlash 0.55s ease;
}

/* Terms Consent Block */
.terms-consent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

.terms-consent-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.terms-consent-text {
  font-size: 13px;
  color: var(--text-muted);
  user-select: none;
}

.terms-consent-link {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  flex-shrink: 0;
}

.terms-consent-link:hover {
  opacity: 0.8;
}

.terms-consent.is-error {
  border-color: rgba(255, 107, 74, 0.45);
  box-shadow: 0 0 0 2px rgba(255, 107, 74, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* City picker — компактный bottom-sheet */
.city-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.city-picker-modal.hidden {
  display: none;
}

.city-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.city-picker-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  background: var(--bg-section);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
  padding: 10px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slide-up 0.25s ease-out;
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.city-picker-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 auto 4px;
}

.city-picker-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.city-picker-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.city-picker-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border-glass);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  color: var(--text-main);
  border-radius: 16px;
  min-height: 56px;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.city-picker-btn-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.city-picker-btn-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.city-picker-btn-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}

.city-picker-btn-icon {
  font-size: 18px;
}

.city-picker-btn-arrow {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.city-picker-btn:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 153, 85, 0.35);
}

.city-picker-btn:active {
  transform: scale(0.98);
}

/* Hero info strip (компактная полоска) */
.hero-info-strip {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 6px 0 2px;
  width: min(100%, 560px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 2px;
}

.hero-info-sep {
  opacity: 0.3;
  font-size: 12px;
  flex: 0 0 auto;
}

.hero-info-address-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
  min-width: 0;
  flex: 0 1 auto;
}

.hero-info-address-btn:hover { opacity: 0.8; }
.hero-info-address-btn:active { opacity: 0.5; }

.hero-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.hero-info-strip::-webkit-scrollbar {
  display: none;
}

.hero-info-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 2px;
  text-decoration: none;
  color: var(--text-main);
  background: none;
  border: none;
  font: inherit;
  cursor: default;
  transition: opacity 0.15s;
  flex: 0 0 auto;
  min-width: 0;
}

.hero-info-pin {
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
  opacity: 0.7;
}

.hero-info-icon-bubble {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
}

.hero-info-icon-bubble--chat {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.12);
}

.hero-info-item--link {
  cursor: pointer;
}

.hero-info-item--link:hover {
  opacity: 0.75;
}

.hero-info-item--link:active {
  opacity: 0.55;
}

.hero-info-item--city {
  font-weight: 700;
  font-size: 12px;
  flex: 1 1 auto;
  overflow: hidden;
  gap: 8px;
}

.hero-info-city-label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.75;
  flex: 0 1 auto;
  min-width: 0;
  letter-spacing: 0.01em;
}

.hero-info-item--status {
  min-width: 0;
  flex: 0 0 auto;
  font-size: 12px;
  opacity: 0.7;
}

.hero-info-item--consult {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.hero-info-item--consult:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-info-item--consult:active {
  opacity: 0.6;
}

.hero-info-consult-text {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.hero-info-go {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.95;
}

.hero-info-icon {
  font-size: 15px;
  line-height: 1;
}

.hero-info-icon--status {
  font-size: 12px;
  color: #4ade80;
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-info-icon--status.closed {
  color: #ff6b4a;
  animation: none;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hero-info-text {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-main);
}

.hero-info-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.16);
  margin: 0 3px;
}

/* Pickup panel (оформление заказа) */
.pickup-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.pickup-panel__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.pickup-panel__link {
  width: 100%;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.pickup-panel__link:hover {
  background: rgba(255, 107, 74, 0.1);
  color: #ffd7c8;
}

.pickup-panel__icon {
  font-size: 18px;
  flex-shrink: 0;
}

.pickup-panel__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pickup-panel__title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pickup-panel__sub {
  font-size: 12px;
  color: rgba(230, 230, 238, 0.6);
}

.pickup-panel__go {
  margin-left: auto;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.pickup-panel__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 14px;
}

/* Terms Modal */
.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.terms-modal.hidden {
  display: none;
}

.terms-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
}

.terms-modal-content {
  position: relative;
  width: min(100%, 560px);
  max-width: 560px;
  max-height: calc(100vh - (24px + env(safe-area-inset-top, 0px)));
  background: var(--bg-section);
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  box-shadow: var(--shadow-strong);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: calc(16px + env(safe-area-inset-top, 0px));
}

.terms-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-modal-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.terms-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  color: var(--text-main);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast), border var(--transition-fast), transform var(--transition-fast);
}

.terms-modal-close:hover {
  background: var(--bg-glass-hover);
}

.terms-modal-close:active {
  transform: scale(0.96);
}

.terms-modal-body {
  padding: 0 18px 14px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.terms-modal-body h3 {
  margin: 14px 0 6px;
  font-size: 14px;
}

.terms-modal-body p,
.terms-modal-body li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.terms-modal-body ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.terms-modal-footer {
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
}

/* Cart Summary Final */
.cart-summary-final {
  padding-bottom: 12px;
}

.cart-footer .cart-summary {
  margin: 0;
  padding: 0 0 10px;
  background: transparent;
  border-radius: 0;
}

.cart-preview-totals--checkout {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(160deg, rgba(26, 26, 32, 0.88) 0%, rgba(20, 20, 26, 0.74) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cart-preview-totals--checkout .cart-preview-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.cart-preview-totals--checkout .cart-preview-total-row.accent {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.cart-summary-status {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.cart-preview-totals--checkout .cart-preview-total-row.discount strong {
  color: #4ade80;
}

/* ======================== */
/* Улучшенный дизайн оформления */
/* ======================== */

/* Секция товаров */
.cart-items-section {
  padding: 0 16px 16px;
}

.cart-items-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Улучшенные кнопки оплаты */
.payment-method-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.payment-method-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.payment-method-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.payment-method-option.active {
  background: rgba(255, 107, 74, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.payment-method-option input[type="radio"] {
  display: none;
}

.payment-method-icon {
  font-size: 20px;
  line-height: 1;
}

.payment-method-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-method-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.payment-method-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.payment-method-option.active .payment-method-desc {
  color: var(--accent);
}

/* Адаптив для узких экранов */
@media (max-width: 360px) {
  .payment-method-options {
    grid-template-columns: 1fr 1fr;
  }
  
  .payment-method-option {
    padding: 10px 6px;
  }
  
  .payment-method-title {
    font-size: 11px;
  }
  
  .payment-method-desc {
    font-size: 9px;
  }
}

/* Улучшенные цены в корзине */
.cart-preview-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
}

.cart-preview-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
}

.cart-preview-total-row strong {
  color: var(--text-main);
  font-weight: 600;
}

.cart-preview-total-row.accent {
  font-size: 16px;
  color: var(--accent);
}

.cart-preview-total-row.accent strong {
  color: var(--accent);
  font-weight: 700;
}

/* Делаем форму более компактной на узких экранах */
@media (max-width: 400px) {
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .form-row.compact {
    flex-direction: row;
    gap: 8px;
  }
  
  .cart-form h3 {
    font-size: 14px;
  }
  
  .form-field label {
    font-size: 12px;
  }
  
  .form-field input,
  .form-field textarea {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .delivery-toggle {
    flex-wrap: wrap;
  }
  
  .delivery-toggle .toggle {
    flex: 1 1 45%;
    min-width: 0;
    font-size: 13px;
    padding: 10px;
  }
  
  .cart-preview-content,
  .cart-sheet {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  .cart-header {
    padding: 12px;
  }
  
  .cart-footer {
    padding: 12px;
  }
}

/* Улучшенный вид товаров в корзине */
.cart-item,
.cart-preview-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-item + .cart-item,
.cart-preview-item + .cart-preview-item {
  margin-top: 8px;
}

.cart-item__image,
.cart-preview-item-image {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.cart-item__image img,
.cart-preview-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item__info,
.cart-preview-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item__title,
.cart-preview-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item__variant,
.cart-preview-item-variant {
  font-size: 12px;
  color: var(--text-muted);
}

.cart-item__price,
.cart-preview-item-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
/* Промокоды */
.promo-section {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.promo-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: all var(--transition-fast);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.promo-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.promo-input::placeholder {
  color: var(--text-muted);
  text-transform: none;
}

.promo-button {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.promo-button:hover {
  background: #ff8066;
  transform: translateY(-1px);
}

.promo-button:active {
  transform: translateY(0);
}

.promo-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.promo-message {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}

.promo-message.success {
  display: block;
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.promo-message.error {
  display: block;
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.promo-details {
  margin-top: 8px;
  padding: 12px;
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.2);
  border-radius: 12px;
  display: none;
}

.promo-details.active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.promo-details-content {
  flex: 1;
  min-width: 0;
}

.promo-details-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-details-desc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-details .promo-remove {
  margin-top: 0;
  flex: 0 0 auto;
  padding: 8px 10px;
  line-height: 1;
}

.promo-details-title {
  font-size: 13px;
  font-weight: 600;
  color: #34c759;
  margin-bottom: 4px;
}

.promo-details-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.promo-remove {
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(255, 59, 48, 0.15);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 8px;
  color: #ff3b30;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.promo-remove:hover {
  background: rgba(255, 59, 48, 0.25);
}
