/**
 * Header overlays: mobile drawer, search, mini-cart.
 * Required when parent theme CSS is not loaded (e.g. front page).
 */
/* ─ HAMBURGER BUTTON ─ */
.hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 40px; height: 40px; background: none; border: 1px solid var(--ink); cursor: pointer; padding: 0; flex-shrink: 0; }
.hamburger span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform 0.25s, opacity 0.25s; transform-origin: center; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─ MOBILE DRAWER ─ */
/* Full-screen above main nav; body scroll locked in JS (godspeed-drawer-open). */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 10050;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  overflow: hidden;
  pointer-events: none;
}
.mobile-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}
.mobile-drawer__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--ink);
  background: var(--bg);
}
.mobile-drawer__brand {
  font-family: var(--display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}
.mobile-drawer__brand span { color: var(--blood); }
.mobile-drawer__logo { display: flex; align-items: center; max-width: min(200px, 55vw); }
.mobile-drawer__logo .custom-logo-link { display: flex; align-items: center; }
.mobile-drawer__logo img {
  max-height: 36px;
  width: auto;
  height: auto;
  display: block;
}
.mobile-drawer__close {
  padding-bottom: 4px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  background: var(--bg);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.mobile-drawer__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
/* Блокируем скролл документа на моб (iOS/Safari): только body недостаточно; плюс без «smooth» при восстановлении позиции */
html.godspeed-drawer-open {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
  scroll-behavior: auto !important;
}
body.godspeed-drawer-open {
  overscroll-behavior: none;
  overflow: hidden;
}
.mob-nav { padding: 12px 0; border-bottom: 1px solid var(--ink); }
.mob-nav-list { list-style: none; margin: 0; padding: 0; }
.mob-nav-list > .menu-item { border-bottom: 1px solid #f0f0f0; }
.mob-nav-list > .menu-item:last-child { border-bottom: none; }
.mob-nav__row {
  display: flex;
  align-items: stretch;
}
.mob-nav__link,
.mob-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  padding: 16px 24px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s;
}
.mob-nav__link:hover,
.mob-nav a:hover { background: #f5f5f5; }
.mob-nav__link.sale,
.mob-nav a.sale { color: var(--blood); }
.mob-nav__link .arr,
.mob-nav a .arr { font-size: 18px; color: var(--mute); }
.mob-nav__toggle {
  flex-shrink: 0;
  width: 56px;
  border: none;
  border-left: 1px solid #f0f0f0;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.mob-nav__toggle:hover,
.mob-nav__toggle:focus-visible {
  background: #f5f5f5;
  outline: none;
}
.mob-nav__chev {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.mob-nav__toggle[aria-expanded="true"] .mob-nav__chev {
  transform: rotate(-135deg) translateY(-2px);
}
.mob-nav-sub {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}
.mob-nav-sub.is-open { display: block; }
.mob-nav-sub .mob-nav__link,
.mob-nav-sub a {
  padding: 14px 24px 14px 40px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
}
.mob-nav-sub > .menu-item:last-child > .mob-nav__link,
.mob-nav-sub > .menu-item:last-child > a { border-bottom: none; }
.mob-nav-sub .mob-nav__row .mob-nav__link,
.mob-nav-sub .mob-nav__row a { padding-left: 40px; }
.mob-nav-sub .mob-nav-sub .mob-nav__link,
.mob-nav-sub .mob-nav-sub a { padding-left: 56px; }
.mob-nav-sub .mob-nav__row .mob-nav__link--child,
.mob-nav-sub .mob-nav__link--child { padding-left: 56px; }
.mob-nav-sub .mob-nav-sub .mob-nav__link--child { padding-left: 72px; }
.mob-nav-sub .menu-item-has-children { border-bottom: 1px solid #f0f0f0; }
.mob-nav-sub .menu-item-has-children:last-child { border-bottom: none; }
.mob-nav-sub .mob-nav__toggle { width: 48px; }
.mob-bottom { padding: 20px 24px 28px; border-top: 1px solid var(--hair); }
.mob-bottom .mob-header-bottom-menu,
.mob-bottom .flinks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mob-bottom .mob-header-bottom-menu a,
.mob-bottom .flinks a {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s;
}
.mob-bottom .mob-header-bottom-menu a:hover,
.mob-bottom .flinks a:hover { color: var(--blood); }
.mob-trust { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.mob-trust-item { display: flex; gap: 12px; align-items: flex-start; }
.mob-trust-dot { width: 6px; height: 6px; background: var(--blood); border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.mob-trust-text { font-size: 12px; font-weight: 500; color: var(--mute); line-height: 1.5; }
.mob-search { display: flex; border: 1px solid var(--ink); }
.mob-search input { flex: 1; border: none; outline: none; padding: 12px 16px; font-family: var(--display); font-size: 13px; }
.mob-search button { background: var(--ink); color: #fff; border: none; padding: 12px 18px; font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.mob-icons { display: flex; gap: 10px; margin-top: 16px; }
.mob-icon { flex: 1; height: 44px; border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; text-decoration: none; color: var(--ink); transition: background 0.15s; }
.mob-icon:hover { background: var(--ink); color: #fff; }
.mob-icon .nav-icon__svg { flex-shrink: 0; }

/* Product search overlay (header.php); parent bundle may not load on front page — keep opaque UI. */
.site-search-panel {
  position: fixed;
  inset: 0;
  z-index: 1010;
  display: none;
}
.site-search-panel.is-open {
  display: block;
}
.site-search-panel__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 18, 0.55);
}
.site-search-panel__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 72px 20px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.site-search-panel__form {
  position: relative;
  width: min(720px, 100%);
  background-color: #ffffff;
  border: 1px solid var(--ink);
  box-shadow: 0 18px 48px rgba(15, 16, 18, 0.2);
  padding: 28px 24px 20px;
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-search-panel__form .woocommerce-product-search,
.site-search-panel__form form.search-form {
  position: relative;
  width: 100%;
}
.site-search-panel__form input[type='search'],
.site-search-panel__form input[type='text'],
.site-search-panel__form input[name='s'] {
  width: 100%;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  padding: 14px 44px 14px 14px;
  font-family: var(--display);
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.site-search-panel__form input[type='search']:focus,
.site-search-panel__form input[type='text']:focus,
.site-search-panel__form input[name='s']:focus {
  border-color: var(--ink);
  background: #fff;
}
.site-search-panel__form button[type='submit'] {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.site-search-panel__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  z-index: 2;
  padding: 4px 8px;
}
.site-search-panel__loading {
  text-align: center;
  padding: 16px;
  color: var(--mute);
  font-size: 13px;
}
.site-search-panel__results {
  margin-top: 8px;
  max-height: 50vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 14px;
}

.menu-btn.hamburger{display:none;position:relative}
.menu-btn.hamburger .menu-btn__label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@container site (max-width:900px){
  .menu-btn.hamburger{display:flex}
  .nav-right .nav-search.desk-only{display:none}
}
.brand__logo .custom-logo-link{display:block}
.brand__logo img{max-height:40px;width:auto;height:auto;display:block;margin:0 auto}
.mobile-drawer__logo .custom-logo-link{display:flex;align-items:center}
.mobile-drawer__logo img{max-height:36px;width:auto}
.desk-only{display:flex}
.nav-right .nav-search.desk-only,
.nav-right .nav-wishlist.desk-only,
.nav-right .cart.desk-only{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0;
  min-width:40px;
  height:40px;
  padding:0 8px;
  border:none;
  background:transparent;
  font-family:inherit;
  font-size:inherit;
  letter-spacing:normal;
  text-transform:none;
  color:var(--ink);
  cursor:pointer;
  text-decoration:none;
  position:relative;
}
.nav-right .nav-search.desk-only:hover,
.nav-right .nav-wishlist.desk-only:hover,
.nav-right .cart.desk-only:hover{background:transparent;color:var(--ink)}
.nav-right .nav-icon__svg{display:block;flex-shrink:0}
@container site (max-width:900px){
  .desk-only{display:none!important}
}

html.godspeed-drawer-open,html.mini-cart-open,html.search-open{overflow:hidden}
body.godspeed-drawer-open{overflow:hidden}
html.mini-cart-open body,html.search-open body{overflow:hidden}

.site-search-panel__results-header{margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--hair)}
.site-search-panel__results-count{font-size:13px;color:var(--mute);margin:0}
.site-search-panel__no-results{text-align:center;padding:32px 16px;color:var(--mute)}
.site-search-panel__error{color:#b00020;text-align:center;padding:16px;font-size:13px}
.site-search-panel__results-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:16px}
.site-search-panel__result-link{text-decoration:none;color:inherit}
.site-search-panel__result-image{aspect-ratio:1;overflow:hidden;background:#f5f5f5;margin-bottom:8px}
.site-search-panel__result-image img{width:100%;height:100%;object-fit:cover}
.site-search-panel__result-title{font-size:12px;font-weight:600;display:block}
.site-search-panel__load-more{margin-top:12px;padding:12px 20px;background:var(--ink);color:#fff;border:0;cursor:pointer;font-family:var(--display);font-size:11px;letter-spacing:.1em;text-transform:uppercase}

@media (max-width:900px){
  .menu-btn.hamburger{display:flex}
  .desk-only{display:none!important}
  .nav-right .nav-search.desk-only{display:none}
}
@media (min-width:901px){
  .mobile-drawer{transform:translateX(-100%)!important;pointer-events:none!important}
}
