/* ============================================================================
   components.css — ОБЩИЕ КОМПОНЕНТЫ (СЛОЙ 2)
   ----------------------------------------------------------------------------
   Блоки, переиспользуемые на ВСЕХ страницах (index/catalog/product):
   шапка, бургер-меню, переключатель языка, кнопка CTA, точки слайдера,
   миниатюры отзывов, lightbox, футер. Каталог и товар берут это без изменений.
   Значения перенесены 1-в-1 из эталона.
   ============================================================================ */

/* ── NAV ────────────────────────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line); transition: box-shadow 0.3s;
}
.nav-logo { font-family: var(--font-display); font-size: 20px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 0.4em; }
.logo-mark { width: 0.92em; height: 0.92em; flex: 0 0 auto; display: block; }

.nav-desktop{ display:flex; gap:30px; list-style:none; align-items:center; }
.nav-desktop a{ font-size:12px; font-weight:400; letter-spacing:.1em; text-transform:uppercase; color:rgba(0,0,0,.55); transition:color .2s,box-shadow .2s; }
.nav-desktop a:hover{ color:var(--ink); }
.nav-desktop a.is-active{
  color:var(--ink);
  box-shadow:inset 0 -1px 0 var(--ink);
  padding-bottom:2px;
}
.nav-right{ display:flex; align-items:center; gap:20px; }

.menu-btn {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); opacity: 0.65; background: none; border: none; cursor: pointer;
  transition: opacity 0.2s; font-family: var(--font-text);
}
.menu-btn:hover { opacity: 1; }
.menu-icon { display: flex; flex-direction: column; gap: 4px; width: 20px; }
.menu-icon span { display: block; height: 1.5px; background: var(--ink); transition: all 0.3s; }

/* ── DROPDOWN MENU (бургер) ─────────────────────────────────────────────── */
#fullmenu {
  position: fixed; top: 54px; right: 48px; z-index: 300;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  min-width: 220px;
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#fullmenu.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.menu-close { display: none; }
.menu-logo { display: none; }
.menu-items { list-style: none; padding: 8px 0; }
.menu-items li { margin: 0; }
.menu-items a {
  display: block; font-family: var(--font-text);
  font-size: 13px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(0,0,0,0.55); padding: 12px 28px;
  transition: color 0.2s, background 0.2s; border-bottom: 1px solid var(--line-soft);
}
.menu-items li:last-child a { border-bottom: none; }
.menu-items a:hover { color: var(--ink); background: rgba(0,0,0,0.03); }
.menu-items a.is-active{
  color: var(--ink);
  background: rgba(0,0,0,0.03);
  box-shadow: inset 2px 0 0 var(--ink);
}
.menu-items a em { font-style: normal; }

/* ── LANG SWITCHER ──────────────────────────────────────────────────────── */
.lang-switcher{ display:flex; align-items:center; gap:6px; }
.lang-btn{ font-family:var(--font-text); font-size:11px; font-weight:500; letter-spacing:.1em; background:none; border:none; cursor:pointer; color:rgba(0,0,0,.55); padding:4px 2px; transition:color .2s; }
.lang-btn.active{ color:var(--ink); }
.lang-divider{ color:rgba(0,0,0,.4); font-size:11px; }

/* ── CTA LINK (общая кнопка-ссылка) ─────────────────────────────────────── */
.cta-link { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); font-weight: 500; border-bottom: 1px solid rgba(0,0,0,0.4); padding-bottom: 2px; transition: opacity 0.2s; }
.cta-link:hover { opacity: 0.5; }
.cta-link::after { content: "→"; font-size: 13px; letter-spacing: 0; }

/* ── REVIEW PHOTOS / THUMBS (общие — отзывы есть и на product) ──────────── */
.rev-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 16px; }
.rev-thumb {
  width: 72px; height: 72px; object-fit: cover; cursor: pointer;
  border: 1px solid rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s; border-radius: 2px;
}
.rev-thumb:hover { transform: scale(1.06); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

/* ── LIGHTBOX (общий — index + product) ─────────────────────────────────── */
#lightbox {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.92); align-items: center; justify-content: center; cursor: zoom-out;
}
#lightbox.open { display: flex; }
.lb-content { position: relative; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
#lbImg { max-width: 90vw; max-height: 82vh; object-fit: contain; display: block; border: 1px solid rgba(255,255,255,0.08); }
.lb-counter { margin-top: 12px; font-size: 12px; letter-spacing: 0.12em; color: rgba(255,255,255,0.4); text-transform: uppercase; }
.lb-close { position: fixed; top: 28px; right: 36px; font-size: 20px; color: rgba(255,255,255,0.6); background: none; border: none; cursor: pointer; transition: color 0.2s; z-index: 10; font-family: inherit; }
.lb-close:hover { color: #fff; }
.lb-prev, .lb-next { position: fixed; top: 50%; transform: translateY(-50%); font-size: 36px; color: rgba(255,255,255,0.5); background: none; border: none; cursor: pointer; transition: color 0.2s; z-index: 10; padding: 0 20px; font-family: inherit; line-height: 1; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-prev:hover, .lb-next:hover { color: #fff; }

/* ── FOOTER (общий) ─────────────────────────────────────────────────────── */
footer { background: var(--dark); color: #fff; padding: 80px 48px 44px; }
.footer-grid { display: grid; grid-template-columns: minmax(220px,1.6fr) minmax(130px,.8fr) minmax(165px,1fr) minmax(155px,.9fr) minmax(150px,1fr); gap: 36px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 32px; }
.footer-brand-col { grid-column: 1; }
.footer-logo { font-family: var(--font-display); font-size: 17px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: #fff; margin-bottom: 20px; display: inline-flex; align-items: center; gap: 0.4em; }
.footer-desc { font-size: 13px; font-weight: 300; line-height: 1.8; color: rgba(255,255,255,0.35); max-width: 240px; margin-bottom: 24px; }
.footer-col h5, .footer-qr h5 { font-size: var(--fs-2xs); letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255,255,255,0.25); margin-bottom: 20px; }
.footer-col ul { list-style: none; display: grid; gap: 11px; }
.footer-col ul li a { font-size: 13px; font-weight: 300; color: rgba(255,255,255,0.45); transition: color 0.2s; }
.footer-col ul li a:hover { color: rgba(255,255,255,0.9); }
.footer-docs .ac-cookie-settings { margin: 4px 0 0 -10px; padding: 7px 10px; border: 1px solid rgba(255,255,255,0.13); border-radius: 999px; background: transparent; color: rgba(255,255,255,0.45); font: 300 12px/1.2 var(--font-text); cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; }
.footer-docs .ac-cookie-settings:hover { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.9); }
.footer-support-label { font-family: var(--font-text); font-size: 20px; font-weight: 400; color: #fff; line-height: 1.25; margin-bottom: 18px; }
.footer-qr-link { display: inline-block; transition: opacity 0.2s; }
.footer-qr-link:hover { opacity: 0.85; }
.footer-qr-img { width: 120px; height: 120px; display: block; background: #fff; border-radius: 10px; border: 1px solid rgba(255,255,255,0.9); box-shadow: 0 6px 20px rgba(0,0,0,0.28); }
.footer-qr-hint { font-family: var(--font-text); font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 8px; }
.footer-bottom { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,0.2); flex-wrap: wrap; gap: 8px; }

/* Средняя ширина: бренд служит визуальным якорем слева, остальные четыре
   блока образуют компактную матрицу 2x2. QR не проваливается отдельной строкой. */
@media(max-width:1100px) and (min-width:701px){
  .footer-grid{
    grid-template-columns: minmax(220px,1.25fr) minmax(130px,.75fr) minmax(180px,1fr);
    grid-template-areas: "brand nav docs" "brand contacts support";
    gap: 48px 36px;
    justify-content: stretch;
  }
  .footer-brand-col{ grid-area: brand; }
  .footer-nav{ grid-area: nav; }
  .footer-docs{ grid-area: docs; }
  .footer-contacts{ grid-area: contacts; }
  .footer-qr{ grid-area: support; justify-self: start; text-align: left; }
  .footer-desc{ max-width: 260px; }
}
@media(max-width:700px){
  footer{ padding: 56px 24px 36px; }
  .footer-grid{ grid-template-columns: 1fr; gap: 40px; text-align: center; justify-items: center; }
  .footer-desc{ max-width: 320px; margin-left: auto; margin-right: auto; }
  .footer-col ul{ justify-items: center; }
  .footer-docs .ac-cookie-settings{ margin-left: 0; }
  .footer-qr{ grid-column: auto; }
  .footer-qr-img{ margin-left: auto; margin-right: auto; }
  .footer-bottom{ flex-direction: column; align-items: center; text-align: center; gap: 6px; }
}

/* Десктоп показывает горизонтальное меню, мобайл — бургер (адаптив в pages.css
   переопределяет эти два правила, но логика «или/или» общая для всех страниц) */
@media(max-width:960px){ .nav-desktop{ display:none } }
@media(min-width:961px){ .menu-btn{ display:none } }
