/* ===== CSS Variables - Color Palette (ВыгодаМаркет: оранжевый · зелёный · крем) ===== */
:root {
  --color-white: #FFFFFF;
  --color-beige: #F3E8D6;        /* крем из лого — фон страницы и ховеры */
  --color-beige-dark: #E9DCC4;
  --color-beige-light: #FBF6ED;
  --color-orange: #FF9104;       /* основной: действия, цены, числа */
  --color-orange-light: #FFA838;
  --color-orange-dark: #E58200;
  --color-orange-pale: #FFF1DE;
  --color-green: #2BAA1B;        /* подписи, статусы, успех */
  --color-green-light: #249316;
  --color-green-lighter: #52C247;
  --color-green-pale: #E5F8E2;
  --color-text: #2B2418;
  --color-text-muted: #877A66;
  --color-border: #E7DCC6;
  --color-shadow: rgba(91, 44, 14, 0.08);
  --color-shadow-hover: rgba(91, 44, 14, 0.15);
  --color-danger: #E03E3E;
  --color-warning: #FF9104;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container-max: 1280px;
  --header-height: 56px;
  --bottom-nav-height: 72px;
  --category-nav-height: 48px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s ease;

  /* Safe area insets for notches */
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-left: env(safe-area-inset-left, 0);
  --safe-right: env(safe-area-inset-right, 0);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-family);
  background: var(--color-beige);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-height);
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
button { font-family: inherit; cursor: pointer; border: none; background: none; touch-action: manipulation; }
ul { list-style: none; }
input, select { font-family: inherit; border: none; outline: none; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ===== Container ===== */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 16px; width: 100%; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 500; font-size: 15px; border-radius: var(--radius-md);
  padding: 12px 20px; transition: var(--transition);
  min-height: 44px; /* touch target */
}
.btn--primary { background: var(--color-orange); color: var(--color-white); }
.btn--primary:hover, .btn--primary:active { background: var(--color-orange-dark); }
.btn--outline { border: 2px solid var(--color-orange); color: var(--color-orange); background: transparent; }
.btn--outline:hover { background: var(--color-orange-pale); }
.btn--ghost { color: var(--color-text); padding: 8px 12px; border-radius: var(--radius-sm); min-height: 40px; }
.btn--ghost:hover, .btn--ghost:active { background: var(--color-beige); color: var(--color-green); }
.btn--large { padding: 16px 24px; font-size: 16px; }
.btn--small { padding: 8px 14px; font-size: 13px; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--header-height) + var(--safe-top));
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 0 16px;
  padding-top: var(--safe-top);
}
.header__container {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
  max-width: var(--container-max); margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 8px; color: var(--color-text); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; padding: 5px 0; }
.logo__img { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 1px 4px rgba(91, 44, 14, 0.18); }
.logo__text--o { color: var(--color-orange); }
.logo__text--g { color: var(--color-green); }
.logo__text { display: none; } /* hide on mobile, show on desktop */
.header__actions { display: flex; align-items: center; gap: 4px; }
.header__search, .header__cart { position: relative; }
.header__cart .cart__count {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--color-danger); color: var(--color-white);
  font-size: 11px; font-weight: 600; line-height: 18px;
  border-radius: 9px; text-align: center;
}

/* ===== Category Navigation (Sticky) ===== */
.category-nav {
  position: sticky; top: calc(var(--header-height) + var(--safe-top)); z-index: 90;
  background: var(--color-white); border-bottom: 1px solid var(--color-border);
  padding: 8px 0; margin: 0; padding-left: 16px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav__scroller {
  display: flex; gap: 8px; padding-right: 16px; min-height: 32px;
}
.category-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 100px;
  font-size: 14px; font-weight: 500; color: var(--color-text-muted);
  background: var(--color-beige-light); white-space: nowrap;
  border: 1px solid transparent; transition: var(--transition);
  min-height: 40px;
}
.category-chip:hover, .category-chip:active { background: var(--color-beige); }
.category-chip.is-active {
  background: var(--color-orange); color: var(--color-white); border-color: var(--color-orange);
}
.category-chip__icon { width: 16px; height: 16px; flex-shrink: 0; }

/* Категории: невлезшие — в «…» с выпадающим списком (десктоп) */
.category-chip--hidden { display: none; }
.category-more { position: relative; display: none; }
.category-chip--more { font-size: 18px; font-weight: 700; letter-spacing: 3px; padding: 6px 14px; line-height: 1; }
.category-more__list {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  min-width: 240px; max-width: calc(100vw - 32px); max-height: min(420px, 60vh);
  overflow-y: auto; z-index: 95;
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(26, 26, 26, 0.16);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.category-more__item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--color-text-muted); text-align: left;
  white-space: nowrap; transition: var(--transition);
}
.category-more__item:hover { background: var(--color-beige-light); color: var(--color-green); }
.category-more__item.is-active { background: var(--color-orange-pale); color: var(--color-orange-dark); font-weight: 600; }

/* ===== Catalog Section ===== */
.main { flex: 1; overflow: hidden; }

/* ===== Telegram-канал ===== */
.tg-promo { padding: 0 0 24px; }
.tg-promo__card {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #FFF8EE 0%, var(--color-orange-pale) 100%);
  border: 1px solid rgba(255, 145, 4, 0.35);
  border-radius: var(--radius-lg); padding: 15px 16px;
  box-shadow: 0 6px 18px var(--color-shadow); transition: var(--transition);
}
.tg-promo__card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px var(--color-shadow-hover); }
.tg-promo__icon {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-orange); color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
}
.tg-promo__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tg-promo__text b { font-size: 15px; }
.tg-promo__text span { font-size: 13px; color: var(--color-text-muted); }
.tg-promo__btn {
  flex-shrink: 0; background: var(--color-orange); color: var(--color-white);
  font-size: 13.5px; font-weight: 700; padding: 10px 16px; border-radius: 100px;
  white-space: nowrap;
}
.tg-promo__card:hover .tg-promo__btn { background: var(--color-orange-dark); }
@media (max-width: 380px) {
  .tg-promo__text span { display: none; }
  .tg-promo__btn { padding: 9px 12px; font-size: 12.5px; }
}
.header__tg { display: none; }
@media (min-width: 768px) { .header__tg { display: inline-flex; } }

.catalog { padding: 16px 0 100px; }
#catalog { scroll-margin-top: calc(var(--header-height) + 64px); }
.catalog__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.catalog__title { font-size: 22px; font-weight: 700; }
.catalog__controls { display: flex; align-items: center; gap: 8px; }
.select {
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--color-white); border: 1px solid var(--color-border);
  font-size: 14px; color: var(--color-text); min-height: 40px; min-width: 180px;
}
.catalog__view { padding: 8px; border-radius: var(--radius-sm); color: var(--color-text-muted); }
.catalog__view.is-active, .catalog__view:hover { color: var(--color-orange); background: var(--color-orange-pale); }

/* ===== Product Grid ===== */
.catalog__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.catalog__grid.list-view { grid-template-columns: 1fr; }

/* Product Card - Grid */
.product-card { background: var(--color-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 2px 8px var(--color-shadow); transition: var(--transition); display: flex; flex-direction: column; }
.product-card:hover { box-shadow: 0 8px 24px var(--color-shadow-hover); transform: translateY(-2px); }
.product-card__image-wrapper { position: relative; aspect-ratio: 1; background: var(--color-beige); overflow: hidden; }
.product-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.product-card:hover .product-card__image { transform: scale(1.05); }
.product-card__badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  padding: 4px 8px; border-radius: 100px; font-size: 11px; font-weight: 600;
  background: var(--color-green); color: var(--color-white);
}
.product-card__badge--new { background: var(--color-green-lighter); }
.product-card__badge--hit { background: var(--color-warning); color: var(--color-text); }
.product-card__favorite {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted); transition: var(--transition);
}
.product-card__favorite:hover, .product-card__favorite.is-active { color: var(--color-danger); background: var(--color-white); }
.product-card__favorite svg { width: 19px; height: 19px; }
.product-card__content { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.product-card__name { font-size: 14px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.product-card__price { font-size: 16px; font-weight: 700; color: var(--color-orange); }
.product-card__unit { font-size: 13px; color: var(--color-text-muted); }
.product-card__add { margin-top: 12px; width: 100%; padding: 12px; font-size: 14px; }
.product-card__qty { display: none; }

/* Product Card - List View */
.catalog__grid.list-view .product-card { flex-direction: row; }
.catalog__grid.list-view .product-card__image-wrapper { width: 96px; height: 96px; flex-shrink: 0; aspect-ratio: 1; border-radius: 0; }
.catalog__grid.list-view .product-card__content { padding: 12px; justify-content: center; }
.catalog__grid.list-view .product-card__add { width: auto; min-width: 120px; margin-top: 8px; }

/* ===== Empty State ===== */
.catalog__empty { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }
.catalog__empty svg { width: 80px; height: 80px; margin: 0 auto 16px; opacity: 0.4; }
.catalog__empty-title { font-size: 18px; font-weight: 600; color: var(--color-text); margin-bottom: 8px; }

/* ===== Bottom Navigation ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-nav-height); background: var(--color-white);
  border-top: 1px solid var(--color-border);
  display: flex; justify-content: space-around; align-items: center;
  padding-bottom: var(--safe-bottom);
}
.bottom-nav__item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 12px; color: var(--color-text-muted); font-size: 11px; font-weight: 500;
  min-width: 60px; transition: var(--transition);
}
.bottom-nav__item svg { width: 24px; height: 24px; transition: var(--transition); }
.bottom-nav__item span { white-space: nowrap; }
.bottom-nav__item:hover, .bottom-nav__item:active { color: var(--color-orange); }
.bottom-nav__item--active { color: var(--color-orange); }
.bottom-nav__item--active svg { stroke: var(--color-orange); }

/* ===== Cart Sidebar ===== */
.cart-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 420px;
  background: var(--color-white); z-index: 110;
  transform: translateX(100%); transition: transform 0.3s ease;
  display: flex; flex-direction: column; box-shadow: -4px 0 24px var(--color-shadow);
  border-left: 1px solid var(--color-border);
}
.cart-sidebar.is-open { transform: translateX(0); }
.cart-sidebar__header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--color-border); position: sticky; top: 0; background: var(--color-white); z-index: 1; padding-top: calc(16px + var(--safe-top)); }
.cart-sidebar__title { font-size: 18px; font-weight: 600; }
.cart-sidebar__close { width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--color-text-muted); }
.cart-sidebar__close:hover { background: var(--color-beige); color: var(--color-green); }
.cart-sidebar__body { flex: 1; overflow-y: auto; padding: 16px; }
.cart__empty { text-align: center; padding: 40px 20px; color: var(--color-text-muted); }
.cart__empty svg { margin-bottom: 12px; opacity: 0.5; }
.cart__empty-hint { font-size: 14px; display: block; margin-top: 4px; }
.cart__items { display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: flex; gap: 12px; }
.cart-item__image { width: 72px; height: 72px; border-radius: var(--radius-md); object-fit: cover; background: var(--color-beige); flex-shrink: 0; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name { font-weight: 500; font-size: 14px; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item__price { font-size: 14px; color: var(--color-orange); font-weight: 600; margin-bottom: 8px; }
.cart-item__qty { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--color-beige); color: var(--color-text); display: flex; align-items: center; justify-content: center; font-size: 16px; min-height: 44px; }
.qty-btn:hover, .qty-btn:active { background: var(--color-orange); color: var(--color-white); }
.qty-value { min-width: 28px; text-align: center; font-weight: 500; font-size: 15px; }
.cart-item__remove { color: var(--color-text-muted); font-size: 13px; padding: 4px 0; align-self: flex-start; }
.cart-item__remove:hover { color: var(--color-danger); }
.cart-sidebar__footer { padding: 16px; border-top: 1px solid var(--color-border); background: var(--color-white); position: sticky; bottom: 0; z-index: 1; padding-bottom: calc(16px + var(--safe-bottom)); }
.cart__summary { margin-bottom: 16px; }
.cart__row { display: flex; justify-content: space-between; font-size: 15px; padding: 6px 0; }
.cart__row--total { font-size: 18px; font-weight: 700; color: var(--color-orange); border-top: 1px solid var(--color-border); margin-top: 8px; padding-top: 12px; }
.cart__free-hint { font-size: 12px; color: var(--color-text-muted); text-align: center; margin-top: 8px; }
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 105; opacity: 0; visibility: hidden; transition: var(--transition); }
.cart-overlay.is-open { opacity: 1; visibility: visible; }

/* ===== Toast ===== */
.toast-container { position: fixed; bottom: calc(var(--bottom-nav-height) + 16px); left: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 400px; margin: 0 auto; }
.toast { background: var(--color-text); color: var(--color-white); padding: 14px 16px; border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 12px; animation: slideUp 0.3s ease; pointer-events: auto; min-height: 52px; }
.toast--success { background: var(--color-green); }
.toast--error { background: var(--color-danger); }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Desktop (>= 768px) ===== */
@media (min-width: 768px) {
  :root { --header-height: 64px; }
  body { padding-bottom: 0; }
  .header { height: 64px; padding: 0 32px; }
  .logo__text { display: block; }
  .category-nav { position: static; border: none; background: transparent; padding: 4px 0; margin: 0 0 8px; overflow: visible; }
  .category-nav__scroller { flex-wrap: nowrap; justify-content: center; padding-right: 0; }
  .category-more { display: block; }
  .catalog { padding: 24px 0 80px; }
  .catalog__grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .catalog__grid.list-view { grid-template-columns: 1fr; }
  .catalog__title { font-size: 28px; }
  .bottom-nav { display: none; }
  .cart-sidebar { max-width: 440px; }
}

/* ===== Large Desktop (>= 1024px) ===== */
@media (min-width: 1024px) {
  .header { padding: 0 48px; }
  .catalog__grid { grid-template-columns: repeat(5, 1fr); }
}

/* ===== Small Mobile (<= 375px) ===== */
@media (max-width: 375px) {
  .catalog__grid { grid-template-columns: 1fr; }
  .catalog__controls { width: 100%; justify-content: space-between; }
  .select { flex: 1; min-width: 0; }
}
/* ===== Фото товаров (реальные фото из каталога) ===== */
.product-card__image--photo { position: relative; display: flex; align-items: center; justify-content: center; background: var(--color-beige); }
.product-card__image--photo .product-card__emoji { font-size: 48px; line-height: 1; }
.product-card__image--photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-card__oldprice { font-size: 12px; color: var(--color-text-muted); text-decoration: line-through; }
.cart-item__image--photo { position: relative; display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden; }
.cart-item__image--photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== Поиск ===== */
.search-bar { display: none; align-items: center; gap: 10px; padding: 10px 16px; background: var(--color-white); border-bottom: 1px solid var(--color-border); }
.search-bar.is-open { display: flex; }
.search-bar__icon { color: var(--color-text-muted); flex-shrink: 0; }
.search-bar__input { flex: 1; min-width: 0; font-size: 15px; font-family: inherit; color: var(--color-text); padding: 4px 0; }
.search-bar__input::placeholder { color: var(--color-text-muted); }
.search-bar__close { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: var(--color-text-muted); flex-shrink: 0; }
.search-bar__close:hover { background: var(--color-beige); color: var(--color-text); }

/* ===== Карточка товара (bottom sheet, компактная) ===== */
.sheet-overlay { position: fixed; inset: 0; background: rgba(26, 26, 26, 0.45); opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s; z-index: 150; }
.sheet-overlay.is-open { opacity: 1; visibility: visible; }
.product-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 160;
  background: var(--color-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 85vh;
  max-height: 85dvh;
  transform: translateY(100%); visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease, visibility 0.35s;
  display: flex; flex-direction: column; overflow: hidden;
  padding-bottom: var(--safe-bottom);
}
.product-sheet.is-open { transform: translateY(0); visibility: visible; }
.product-sheet__handle { flex-shrink: 0; display: flex; justify-content: center; padding: 10px 0 4px; }
.product-sheet__handle::before { content: ''; width: 36px; height: 4px; border-radius: 2px; background: var(--color-border); }
.product-sheet__close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-beige-light); color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.product-sheet__close:hover { background: var(--color-beige); color: var(--color-green); }
.product-sheet__content { flex: 1; overflow-y: auto; padding: 0 20px; -webkit-overflow-scrolling: touch; }

/* Галерея товара */
.product-sheet__gallery {
  position: relative; width: calc(100% + 40px); margin: 0 -20px;
  aspect-ratio: 16 / 9; background: var(--color-beige);
  display: flex; align-items: center; justify-content: center;
  font-size: 96px; overflow: hidden;
}
.product-sheet__gallery > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Заголовок и цена */
.product-sheet__stock {
  position: absolute; top: 12px; left: 16px; z-index: 1;
  font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 100px;
  background: var(--color-green-pale); color: var(--color-green);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.product-sheet__stock.is-preorder { background: var(--color-warning); color: var(--color-text); }
.product-sheet__crumbs { font-size: 12px; color: var(--color-text-muted); margin-top: 12px; }
.product-sheet__title { font-size: 21px; font-weight: 700; line-height: 1.25; margin-top: 4px; }
.product-sheet__price-row { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-sheet__price { font-size: 26px; font-weight: 800; color: var(--color-orange); }
.product-sheet__oldprice { font-size: 16px; color: var(--color-text-muted); text-decoration: line-through; }
.product-sheet__unit { font-size: 14px; color: var(--color-text-muted); }

/* Секции */
.product-sheet__section-title { font-size: 16px; font-weight: 700; margin-top: 18px; margin-bottom: 8px; }
.product-sheet__weights { display: flex; gap: 8px; flex-wrap: wrap; }
.weight-opt {
  padding: 10px 16px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; background: var(--color-white); color: var(--color-text);
  transition: var(--transition); min-height: 42px; text-align: center;
}
.weight-opt.is-active { border-color: var(--color-orange); background: var(--color-orange-pale); color: var(--color-orange-dark); }
.weight-opt__price { display: block; font-size: 11px; font-weight: 500; color: var(--color-text-muted); margin-top: 1px; }
.weight-opt.is-active .weight-opt__price { color: var(--color-orange-dark); }
.product-sheet__desc { font-size: 15px; line-height: 1.65; color: var(--color-text); }
.product-sheet__desc--empty { color: var(--color-text-muted); font-style: italic; }
.product-sheet__specs { margin-top: 4px; border-top: 1px solid var(--color-border); }
.product-sheet__char { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.product-sheet__char dt { color: var(--color-text-muted); flex-shrink: 0; }
.product-sheet__char dd { font-weight: 500; text-align: right; color: var(--color-text); }

/* Липкая панель покупки */
.product-sheet__buy-bar {
  position: sticky; bottom: 0; background: var(--color-white);
  padding: 14px 0 12px; margin-top: 16px; display: flex; gap: 12px; align-items: center;
  border-top: 1px solid var(--color-border);
}
.product-sheet__qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.product-sheet__qty .qty-btn { width: 44px; height: 44px; border: 1px solid var(--color-border); background: var(--color-white); }
.product-sheet__qty .qty-value { min-width: 32px; text-align: center; font-weight: 700; font-size: 16px; }
.product-sheet__buy-bar .btn--primary { flex: 1; min-height: 48px; }

/* Карточка товара — небольшое модальное окно по центру на десктопе */
@media (min-width: 768px) {
  .product-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: min(480px, 92vw);
    border-radius: var(--radius-xl);
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
  }
  .product-sheet.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .product-sheet__handle { display: none; }
  .product-sheet__gallery { font-size: 72px; }
}

/* ===== Аккаунт / вход через Telegram ===== */
.header__account { position: relative; overflow: hidden; }
.header__account svg { transition: opacity 0.2s ease; }
.header__account.is-auth svg { opacity: 0; }
.header__avatar {
  position: absolute; inset: 7px;
  width: calc(100% - 14px); height: calc(100% - 14px);
  border-radius: 50%; object-fit: cover; background: var(--color-beige);
}
.account-menu {
  position: absolute; top: calc(100% + 8px); right: 10px;
  width: min(320px, calc(100vw - 20px));
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(26, 26, 26, 0.14);
  padding: 16px;
  z-index: 130;
  display: none;
}
.account-menu.is-open { display: block; }
.account-menu__title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.account-menu__hint { font-size: 13px; color: var(--color-text-muted); line-height: 1.45; margin-bottom: 12px; }
.account-menu__widget { min-height: 40px; display: flex; justify-content: center; }
.account-menu__note {
  font-size: 12px; color: var(--color-text-muted); line-height: 1.4;
  background: var(--color-beige-light); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 8px 10px; margin-top: 12px;
}
.account-menu__user { display: flex; align-items: center; gap: 12px; }
.account-menu__avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  background: var(--color-beige); flex-shrink: 0;
}
.account-menu__info { flex: 1; min-width: 0; }
.account-menu__name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu__username { font-size: 12px; color: var(--color-text-muted); }
.account-menu__logout { padding: 8px 14px; font-size: 13px; flex-shrink: 0; }
@media (min-width: 768px) {
  .account-menu { right: 12px; }
}

/* ===== Ссылка «Раздача» в шапке (десктоп) ===== */
.header__link { display: none; }
@media (min-width: 768px) {
  .header__link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 600; color: var(--color-text);
    padding: 8px 12px; border-radius: var(--radius-sm); min-height: 40px;
    transition: var(--transition);
  }
  .header__link:hover { color: var(--color-green); background: var(--color-beige-light); }
}

/* ===== Оформление заказа ===== */
.checkout-overlay {
  position: fixed; inset: 0; background: rgba(26, 26, 26, 0.45);
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s;
  z-index: 170;
}
.checkout-overlay.is-open { opacity: 1; visibility: visible; }
.checkout {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 175;
  background: var(--color-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 92vh; overflow-y: auto;
  max-height: 92dvh;
  transform: translateY(100%); visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
  padding: 10px 16px calc(20px + var(--safe-bottom));
  box-shadow: 0 -10px 40px rgba(26, 26, 26, 0.18);
}
.checkout.is-open { transform: translateY(0); visibility: visible; }
.checkout__handle { width: 40px; height: 4px; border-radius: 2px; background: var(--color-border); margin: 0 auto 14px; }
.checkout__close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted); background: var(--color-beige-light);
  transition: var(--transition);
}
.checkout__close:hover { background: var(--color-beige); color: var(--color-green); }
.checkout__title { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.checkout__summary {
  background: var(--color-beige-light); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 12px;
}
.checkout__pickup {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13px; line-height: 1.45;
  background: var(--color-green-pale); border-radius: var(--radius-md);
  padding: 10px 12px; margin-bottom: 14px; color: var(--color-green);
}
.checkout__pickup strong { font-weight: 700; }
.checkout__form { display: flex; flex-direction: column; gap: 12px; }
.checkout__form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.checkout__form input, .checkout__form textarea {
  width: 100%; border: 1px solid var(--color-border); background: var(--color-white);
  border-radius: var(--radius-md); padding: 12px 14px;
  font-size: 15px; font-weight: 400; font-family: inherit; min-height: 46px;
  transition: border-color var(--transition); resize: none;
}
.checkout__form input:focus, .checkout__form textarea:focus { border-color: var(--color-orange); }
.checkout__hint { font-size: 12px; color: var(--color-text-muted); text-align: center; }

/* Экран успеха: номер заказа */
.checkout.is-success .checkout__title,
.checkout.is-success .checkout__summary,
.checkout.is-success .checkout__pickup,
.checkout.is-success .checkout__form { display: none; }
.checkout__success { text-align: center; padding: 4px 0 2px; }
.checkout__success-icon { display: block; font-size: 42px; line-height: 1; margin-bottom: 8px; }
.checkout__success-label { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.checkout__success-number {
  background: var(--color-orange-pale);
  border: 1.5px dashed var(--color-orange);
  border-radius: var(--radius-lg);
  padding: 14px 16px 16px; margin-bottom: 12px;
}
.checkout__success-number span {
  display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--color-text-muted); margin-bottom: 2px;
}
.checkout__success-number b {
  display: block; font-size: 54px; font-weight: 800; line-height: 1;
  color: var(--color-orange); letter-spacing: -0.02em;
}
.checkout__success-text { font-size: 14.5px; line-height: 1.5; color: var(--color-text); opacity: 0.8; margin-bottom: 10px; }
.checkout__success-tg { font-size: 13.5px; font-weight: 600; color: var(--color-green); margin-bottom: 16px; }
@media (min-width: 768px) {
  .checkout {
    left: 50%; right: auto; bottom: auto; top: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: 460px; border-radius: var(--radius-xl);
    padding: 28px; opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }
  .checkout.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .checkout__handle { display: none; }
}
