/* @req FR-HOME-001, AR-WEB-001
   Ядро дизайн-системы Yumshoq: токены + база + кнопки + шапка + футер.
   Источник токенов — макет «YumshoqBags Redesign v2». */

:root {
  /* ===== Бренд ===== */
  --brand:        #6A71DE;
  --brand-deep:   #5158CC;
  --brand-soft:   #EEEDFF;
  --brand-tint:   #F6F4FF;

  /* ===== Поверхности ===== */
  --page-bg:      #FFFFFF;
  --paper:        #F5F3FA;
  --header-bg:    #EEEDFF;
  --soft-cream:   #EEEDFF;
  --dark:         #18132A;
  --dark-2:       #221C38;

  /* ===== Текст ===== */
  --ink:          #1A1626;
  --ink-soft:     #6B6380;
  --ink-faint:    #9994A6;
  --line:         rgba(106, 113, 222, 0.12);
  --line-soft:    rgba(106, 113, 222, 0.08);

  /* ===== Акценты ===== */
  --gold:         #C9A961;
  --gold-soft:    #F0E5C8;
  --good:         #2FB97A;
  --sale:         #E5263B;   /* акцент скидки */
  --sale-soft:    #FDECEE;
  --telegram:     #229ED9;   /* вместо WhatsApp */
  --telegram-deep:#1B8BC0;

  /* ===== Цвета категорий ===== */
  --cat-1: #7B6FD4; --cat-2: #B0A6E8; --cat-3: #5E55A8; --cat-4: #2D2666; --cat-5: #4A52A8;
  --cat-6: #9488CC; --cat-7: #6A71DE; --cat-8: #8B7EE0; --cat-9: #A090D8; --cat-10: #7068B8;

  /* ===== Шрифты ===== */
  --display: "Bagel Fat One", "Arial Black", sans-serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--brand); color: #fff; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 26px; border-radius: 999px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  text-decoration: none; border: 0; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, border-color .15s;
}
.btn:active { transform: scale(0.97); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-deep); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--dark-2); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #f3f3f5; }
.btn-telegram { background: var(--telegram); color: #fff; }
.btn-telegram:hover { background: var(--telegram-deep); }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { background: rgba(0,0,0,0.04); }
.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover { background: #B89752; }
.btn-outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.25); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.05); }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ===== Шапка ===== */
.header {
  background: var(--header-bg); padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 50;
}
.header-left, .header-right { display: flex; align-items: center; gap: 10px; }
.nav-pill {
  background: var(--brand); color: #fff; border-radius: 999px;
  height: 52px; padding: 0 24px; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s ease;
}
.nav-pill:hover { background: var(--brand-deep); }
.nav-pill.active { background: var(--ink); }
.nav-pill--tg { background: var(--telegram); }
.nav-pill--tg:hover { background: var(--telegram-deep); }
.nav-pill--tg svg { width: 18px; height: 18px; }
.header-logo {
  font-family: var(--display); font-size: 36px; color: var(--brand);
  text-decoration: none; line-height: 1; letter-spacing: 0.01em; user-select: none;
}
/* Логотип-картинка (заменяет текстовый знак YUMSHOQ в шапке/футере/бургере) */
.header-logo, .footer-brand, .m-drawer-logo { display: inline-flex; align-items: center; line-height: 1; flex: 0 0 auto; }
.header-logo .logo-img, .footer-brand .logo-img, .m-drawer-logo .logo-img { display: block; width: auto; max-width: none; }
.header-logo .logo-img { height: 34px; }
.footer-brand .logo-img { height: 38px; }
.m-drawer-logo .logo-img { height: 28px; }
@media (max-width: 720px) { .header-logo .logo-img { height: 26px; } }
.icon-pill {
  width: 52px; height: 52px; border-radius: 999px;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  transition: background .15s ease;
}
.icon-pill:hover { background: var(--brand-deep); }
.icon-pill svg { width: 22px; height: 22px; }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--gold); color: var(--dark);
  border-radius: 999px; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--header-bg);
}
/* @req FR-CART-001 — атрибут hidden должен перебивать display:inline-flex (пустая корзина) */
.cart-badge[hidden] { display: none; }

/* ===== Бургер + мобильное меню ===== */
.menu-burger {
  display: none; width: 52px; height: 52px; border-radius: 999px;
  background: var(--brand); color: #fff; border: 0; cursor: pointer;
  align-items: center; justify-content: center; transition: background .15s ease;
}
.menu-burger:hover { background: var(--brand-deep); }
.m-drawer-backdrop { position: fixed; inset: 0; background: rgba(20,16,31,0.5); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.m-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.m-drawer { position: absolute; top: 0; left: 0; bottom: 0; width: min(82vw, 320px); background: var(--page-bg); box-shadow: 0 0 60px rgba(0,0,0,.3); transform: translateX(-100%); transition: transform .3s cubic-bezier(.32,.72,0,1); display: flex; flex-direction: column; padding: 18px; overflow-y: auto; }
.m-drawer-backdrop.open .m-drawer { transform: translateX(0); }
.m-drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.m-drawer-logo { font-family: var(--display); font-size: 28px; color: var(--brand); line-height: 1; }
.m-drawer-x { width: 40px; height: 40px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.m-drawer-link { display: block; padding: 14px 12px; border-radius: 12px; font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: none; transition: background .15s; }
.m-drawer-link:hover { background: var(--brand-soft); }
.m-drawer-cta { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--telegram); color: #fff; padding: 14px; border-radius: 12px; font-weight: 700; text-decoration: none; }
@media (max-width: 720px) { .menu-burger { display: inline-flex; } }

/* ===== Эйбро / заголовки секций ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--brand);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: var(--brand); }

/* ===== Футер ===== */
.footer { background: var(--dark); color: #fff; padding: 48px 56px 32px; }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 48px;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { font-family: var(--display); color: var(--brand); font-size: 38px; line-height: 1; margin-bottom: 14px; }
.footer-tag { color: rgba(255,255,255,0.55); font-size: 14px; line-height: 1.5; margin: 0; max-width: 240px; }
.footer-col h4 { color: rgba(255,255,255,0.45); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-col a { color: #fff; text-decoration: none; font-size: 15px; }
.footer-col a:hover { color: var(--brand); }
.footer-contact-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.footer-contact-row .lbl { color: rgba(255,255,255,0.45); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.footer-contact-row a, .footer-contact-row span { color: #fff; font-size: 15px; font-weight: 500; text-decoration: none; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; padding-top: 24px;
  color: rgba(255,255,255,0.4); font-size: 13px; flex-wrap: wrap; gap: 12px;
}

/* ===== Общие утилиты ===== */
.container { max-width: 1280px; margin: 0 auto; }
.page-pad { padding: 22px; }
.muted { color: var(--ink-soft); }

/* ===== Состояние «пусто» / загрузка ===== */
.empty-state {
  text-align: center; padding: 64px 24px; background: var(--paper);
  border-radius: 24px; border: 1px dashed var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty-state .emoji { font-size: 48px; }
.empty-state h3 { font-family: var(--sans); font-weight: 800; font-size: 22px; margin: 0; }
.empty-state p { color: var(--ink-soft); margin: 0 0 12px; }

.notice {
  margin: 16px 22px; padding: 14px 18px; border-radius: 14px;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: 14px; font-weight: 600;
}
.notice.warn { background: #FFF3E0; color: #9A5B00; }

/* ===== Адаптив шапки/футера ===== */
/* Средние ширины: шапка магазина тесная при полноразмерном логотипе —
   убираем подпись Telegram (остаётся иконка) и Instagram (есть в футере). */
@media (max-width: 900px) {
  .nav-pill--tg span { display: none; }
  .header-right .icon-pill[target="_blank"] { display: none; }
}
@media (max-width: 720px) {
  .header { padding: 10px 10px; gap: 8px; }
  .header-right { gap: 6px; }
  .header-logo { font-size: 23px; }
  .nav-pill { height: 42px; padding: 0 13px; font-size: 13px; }
  .nav-pill--tg span { display: none; }
  .icon-pill { width: 42px; height: 42px; }
  .header-right .icon-pill[target="_blank"] { display: none; } /* Instagram — есть в футере */
  .header-left .nav-pill { display: none; } /* раздел-навигация прячется на мобильном (логотип → главная) */
  /* Разгружаем мобильную шапку магазина под полноразмерный логотип (как на главной):
     остаются бургер + логотип + RU/UZ + корзина. Остальное доступно в меню/футере/каталоге. */
  .header-left .back-pill { display: none; }                    /* назад — жест браузера + бургер-меню */
  .header-right .nav-pill--tg { display: none; }                /* Telegram — в бургер-меню и футере */
  .header-right .icon-pill[aria-label="Избранное"] { display: none; } /* избранное — фильтр в каталоге */
  .footer { padding: 32px 18px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
