/* Шапка сайта v2 (Claude, 20.11.2026).
   Единый стиль пунктов меню: обычный текст, у активного — красная черта снизу.
   «Каталог» — главная тёмная кнопка. Город — аккуратная плашка рядом с логотипом.
   Телефон (до 680 px) не меняется: там своё нижнее меню.
   Чтобы откатить — убрать подключение css/header-v2.css со страниц. */

@media (min-width: 681px) {
  header {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(20, 20, 20, .08);
    box-shadow: 0 6px 24px rgba(20, 20, 20, .04);
  }
  header .nav,
  header .city-nav {
    width: min(1360px, calc(100% - 48px));
    height: 76px;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
  }
  header .logo img { width: 108px; height: 62px; }

  /* Город доставки — одна строка, высота как у кнопок справа (44 px):
     булавка · «Доставка» · город · стрелка. Подпись «Город доставки» остаётся для экранных чтецов. */
  header .site-brand-city { gap: 18px; }
  header .delivery-city-control {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    height: 44px;
    padding: 0 0 0 14px;
    border: 1px solid rgba(20, 20, 20, .10);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
  }
  header .delivery-city-control:hover { border-color: rgba(20, 20, 20, .22); background: #faf8f4; }
  header .delivery-city-control:focus-within { border-color: var(--red, #e11924); }
  header .delivery-city-control::before {
    content: "";
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-right: 7px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e11924' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21Z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E");
  }
  header .delivery-city-control > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  header .delivery-city-control::after {
    content: "Доставка";
    order: 1;
    margin-right: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #8a8478;
    pointer-events: none;
  }
  header .delivery-city-control select {
    order: 2;
    -webkit-appearance: none;
    appearance: none;
    width: auto;
    min-width: 0;
    height: 42px;
    min-height: 0;
    margin: 0;
    padding: 0 34px 0 0;
    border: 0;
    border-radius: 0 999px 999px 0;
    background: transparent no-repeat right 14px center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23151515' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    color: #151515;
    font-size: 15px;
    font-weight: 800;
    line-height: 42px;
    cursor: pointer;
  }
  header .delivery-city-control select:focus-visible { outline: none; }

  /* Пункты меню — все одинаковые */
  header .nav-links {
    gap: 4px;
    justify-content: center;
    font-size: 14.5px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: #222;
  }
  header .nav-links a,
  header .nav-links a.nav-tab,
  header .nav-links a.nav-tab.active,
  header .nav-links a.nav-tab.active-page,
  .info-page header .nav-links .nav-tab.active-page,
  .info-page header .nav-links .active-page:not(.nav-tab) {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    box-shadow: none;
    color: #222;
    overflow: visible;
    white-space: nowrap;
    transform: none;
    transition: color .15s ease, background .15s ease;
  }
  header .nav-links a:hover { background: #f6f3ee; color: #111; transform: none; box-shadow: none; }
  header .nav-links a::after,
  header .nav-links a.nav-tab::after,
  .info-page header .nav-links .nav-tab.active-page::after {
    content: "";
    display: block;
    position: absolute;
    inset: auto 12px -18px 12px;
    width: auto;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--red, #e11924);
    opacity: 1;
    transform: scaleX(0);
    transition: transform .18s ease;
  }
  header .nav-links a.active-page,
  header .nav-links a.active,
  .info-page header .nav-links .active-page:not(.nav-tab),
  .info-page header .nav-links .nav-tab.active-page { color: var(--red, #e11924); background: none; }
  header .nav-links a.active-page::after,
  header .nav-links a.active::after,
  .info-page header .nav-links .nav-tab.active-page::after { transform: scaleX(1); }

  /* «Супер акции» — выделена красным и огоньком */
  header .nav-links a[href="catalog.html?promo=1"] { color: var(--red, #e11924); }
  header .nav-links a[href="catalog.html?promo=1"]::before {
    content: "";
    width: 14px;
    height: 14px;
    margin-right: 5px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e11924'%3E%3Cpath d='M12 2c1 3.5 5 6 5 11a5 5 0 0 1-10 0c0-2.2 1-3.8 2.2-5 .2 1.6 1 2.6 2 3 0-3.6.3-6.3.8-9Z'/%3E%3C/svg%3E");
  }

  /* «Каталог» — главная кнопка */
  header .nav-links a:is([data-view="catalog"], [href="catalog.html"]),
  header .nav-links a.nav-tab:is([data-view="catalog"], [href="catalog.html"]).active {
    gap: 9px;
    margin-right: 6px;
    padding: 0 18px 0 16px;
    border-radius: 999px;
    background: #151515;
    color: #fff;
  }
  header .nav-links a:is([data-view="catalog"], [href="catalog.html"]):hover { background: var(--red, #e11924); color: #fff; }
  header .nav-links a:is([data-view="catalog"], [href="catalog.html"])::before {
    content: "";
    width: 14px;
    height: 10px;
    background:
      linear-gradient(currentColor 0 0) top left / 14px 2px no-repeat,
      linear-gradient(currentColor 0 0) center left / 14px 2px no-repeat,
      linear-gradient(currentColor 0 0) bottom left / 14px 2px no-repeat;
    border-radius: 2px;
  }
  header .nav-links a:is([data-view="catalog"], [href="catalog.html"])::after { display: none; }
  header .nav-links a.nav-tab:is([data-view="catalog"], [href="catalog.html"]).active { background: var(--red, #e11924); }

  /* Кнопки справа — одного размера и вида */
  header .nav-actions { gap: 8px; }
  header .nav-actions .icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid rgba(20, 20, 20, .10);
    background: #fff;
    box-shadow: none;
  }
  header .nav-actions .icon-button:hover { transform: none; border-color: rgba(20, 20, 20, .22); background: #faf8f4; box-shadow: none; }
  header .nav-actions .icon-button svg { width: 21px; height: 21px; stroke-width: 2; }
  header .nav-actions .user-pill {
    height: 44px;
    min-height: 44px;
    padding: 0 14px 0 5px;
    gap: 8px;
    border: 1px solid rgba(20, 20, 20, .10);
    border-radius: 999px;
    background: #fff;
    box-shadow: none;
    font-size: 15px;
  }
  header .nav-actions .user-pill > span { width: 34px; height: 34px; font-size: 15px; }
  header .nav-actions .cart-count { top: -4px; right: -4px; }
}

/* Узкий компьютер: «Доставка» вместо «Доставка и оплата» */
@media (min-width: 1101px) and (max-width: 1320px) {
  header .nav-links { font-size: 14px; }
  header .nav-links a,
  header .nav-links a.nav-tab { padding: 0 9px; }
  header .nav-links .wide-label { display: none; }
  header .nav-links .compact-label { display: inline; }
}

/* Планшет: вторая строка — меню, отделено тонкой линией */
@media (min-width: 681px) and (max-width: 1100px) {
  header .nav,
  header .city-nav {
    height: auto;
    grid-template-columns: 1fr auto;
    row-gap: 0;
    padding: 8px 0 0;
  }
  header .nav .logo img { width: 96px; height: 56px; }
  header .nav-links,
  header .city-nav .nav-links {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    gap: 2px;
    margin: 8px -24px 0;
    padding: 6px 24px;
    border-top: 1px solid rgba(20, 20, 20, .07);
    overflow-x: auto;
    scrollbar-width: none;
  }
  header .nav-links::-webkit-scrollbar { display: none; }
  header .nav-links a::after,
  header .nav-links a.nav-tab::after,
  .info-page header .nav-links .nav-tab.active-page::after { bottom: -6px; }
  header .nav-links .wide-label { display: none; }
  header .nav-links .compact-label { display: inline; }
}
