/* ══════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════ */
:root {
  /* Palette */
  --gl-bg:       #fafaf8;
  --gl-bg2:      #f2f0eb;
  --gl-bg3:      #eceae4;
  --gl-ink:      #111111;
  --gl-ink-hover:#333333;
  --gl-muted:    #777777;
  --gl-line:     #dddddd;
  --gl-gold:     #a07840;
  --gl-red:      #c0392b;

  /* Typography */
  --gl-disp:     'Bebas Neue', sans-serif;
  --gl-body:     'DM Sans', sans-serif;

  /* Layout */
  --nav-h:       56px;
  --ticker-h:    36px;

  /* Overlay */
  --gl-overlay-dark: rgba(0, 0, 0, 0.92);
  --gl-overlay-banner: rgba(0, 0, 0, 0.72);
  --gl-overlay-banner-mobile: rgba(0, 0, 0, 0.78);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--gl-line) var(--gl-bg);
}

body {
  background: var(--gl-bg);
  color: var(--gl-ink);
  font-family: var(--gl-body);
  font-weight: 400;
  overflow-x: hidden;
}

/* Webkit scrollbar */
::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: var(--gl-bg); }
::-webkit-scrollbar-thumb { background: var(--gl-line); }

main#page-home {
  display: block;
  padding-top: calc(var(--nav-h) + var(--ticker-h));
}

/* ══════════════════════════════════════════
   FOCUS STATES
══════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--gl-gold);
  outline-offset: 2px;
}
/* Remove outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* ══════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════ */
.gl-img-cover {
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.gl-img-cover--top {
  object-position: center top;
}

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.gl-navbar {
  position: fixed; top: var(--ticker-h); left: 0; right: 0; z-index: 1040;
  height: var(--nav-h);
  background: var(--gl-bg);
  border-bottom: 1px solid var(--gl-line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 32px;
}

.gl-nav-left { display: flex; gap: 24px; align-items: center; }

.gl-nav-link {
  font-family: var(--gl-body);
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gl-muted);
  background: none; border: none; cursor: pointer;
  text-decoration: none; transition: color 0.2s;
  padding: 0;
}
.gl-nav-link:hover, .gl-nav-link.active { color: var(--gl-ink); }
.gl-nav-link.sale { color: var(--gl-red); }

.gl-nav-logo {
  cursor: pointer; display: flex; align-items: center;
  justify-self: center; grid-column: 2;
  margin-top: -8px;
  text-decoration: none;
}

.gl-nav-right {
  display: flex; gap: 20px; align-items: center; justify-content: flex-end;
}

.gl-icon-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gl-muted); padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  width: 28px; height: 28px;
  line-height: 1;
  font-size: 0;             /* collapse any whitespace inside */
  transition: color 0.2s; text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
}
.gl-icon-btn svg {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
/* Heart icon optical correction: the visible shape sits slightly higher
   than the other toolbar icons inside the shared 20x20 viewBox. */
.gl-icon-btn[aria-label="Избранное"] svg,
.gl-nav-right .gl-icon-btn:nth-child(3) svg {
  transform: translateY(1.5px);
}
.gl-icon-btn:hover { color: var(--gl-ink); }
.gl-icon-btn--cart {
  position: relative;
}

.gl-cart-badge {
  position: absolute; top: -2px; right: -4px;
  min-width: 14px; height: 14px; padding: 0 3px;
  background: var(--gl-ink); color: var(--gl-bg);
  font-size: 8px; font-weight: 600; line-height: 14px;
  text-align: center; font-family: var(--gl-body);
  border-radius: 0;
}

.gl-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.gl-burger span {
  display: block; width: 20px; height: 1.3px;
  background: var(--gl-muted); transition: background 0.2s;
}
.gl-burger:hover span { background: var(--gl-ink); }

@media (max-width: 1024px) {
  .gl-navbar {
    padding: 0 16px;
    grid-template-columns: auto auto 1fr auto;
  }
  .gl-nav-left { display: none; }
  .gl-burger {
    display: flex;
    grid-column: 1;
  }
  .gl-nav-logo {
    grid-column: 2;
    justify-self: start;
    margin-top: -8px;
    margin-left: 12px;
  }
  .gl-nav-right {
    grid-column: 4;
    gap: 8px;
  }
  .gl-icon-btn { padding: 2px; }
}

/* ══════════════════════════════════════════
   OFFCANVAS SIDEBAR
══════════════════════════════════════════ */
#glSidebar {
  width: 300px !important;
  max-width: 88vw;
  background: var(--gl-bg) !important;
  border-right: 1px solid var(--gl-line);
  display: flex;
  flex-direction: column;
  top: var(--ticker-h) !important;
  height: calc(100% - var(--ticker-h)) !important;
}
#glSidebar .offcanvas-header {
  height: 56px; padding: 0 16px;
  border-bottom: 1px solid var(--gl-line);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
#glSidebar .offcanvas-header .sb-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; color: var(--gl-muted);
  padding: 0; margin: 0;
  transition: color 0.2s;
}
#glSidebar .offcanvas-header .sb-close:hover {
  color: var(--gl-ink);
}
#glSidebar .offcanvas-body {
  padding: 0; display: flex; flex-direction: column; flex: 1;
  overflow-y: auto;
}

.sb-logo { cursor: pointer; display: flex; align-items: center; margin-top: -2px; text-decoration: none; }

.sb-nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sb-nav-item {
  min-height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--gl-line);
  cursor: pointer; background: none;
  text-align: left; text-decoration: none;
  transition: background 0.15s;
  font-family: var(--gl-disp);
  font-size: 30px; letter-spacing: 0.05em; line-height: 1;
  color: var(--gl-ink);
}
.sb-nav-item:last-child { border-bottom: none; }
.sb-nav-item:hover { background: var(--gl-bg2); }
.sb-nav-item:hover .sb-arrow { opacity: 1; transform: translateX(3px); }
.sb-nav-item.sale { color: var(--gl-red); }

.sb-arrow {
  color: var(--gl-muted); opacity: 0;
  transition: opacity 0.15s, transform 0.2s; flex-shrink: 0;
}

.sb-bottom { flex-shrink: 0; border-top: 1px solid var(--gl-line); }

.sb-icons { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--gl-line); }
.sb-icon-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 6px;
  background: none; border: none; cursor: pointer;
  border-right: 1px solid var(--gl-line);
  color: var(--gl-muted); text-decoration: none;
  font-family: var(--gl-body); font-size: 8px;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: color 0.15s, background 0.15s; position: relative;
}
.sb-icon-btn:last-child { border-right: none; }
.sb-icon-btn:hover { color: var(--gl-ink); background: var(--gl-bg2); }

.sb-badge {
  position: absolute; top: 6px; right: calc(50% - 16px);
  min-width: 14px; height: 14px; padding: 0 3px;
  background: var(--gl-ink); color: var(--gl-bg);
  font-size: 8px; font-weight: 600; line-height: 14px;
  text-align: center; pointer-events: none;
}

.sb-foot { padding: 16px 20px 24px; }
.sb-foot-label {
  font-size: 8px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gl-muted); margin-bottom: 6px;
}
.sb-foot-phone {
  display: block; font-family: var(--gl-disp);
  font-size: 22px; letter-spacing: 0.04em;
  color: var(--gl-ink); text-decoration: none;
  margin-bottom: 2px; transition: color 0.2s;
}
.sb-foot-phone:hover { color: var(--gl-gold); }
.sb-foot-hours { font-size: 10px; color: var(--gl-muted); }

/* ══════════════════════════════════════════
   TICKER
══════════════════════════════════════════ */
.gl-ticker {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1050;
  height: var(--ticker-h); overflow: hidden;
  border-bottom: 1px solid var(--gl-line);
  background: #EFECE6;
  display: flex; align-items: center; justify-content: center;
}

.gl-ticker-track {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.gl-ticker-inner {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.gl-ticker-item {
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gl-muted);
}
.gl-ticker-sep { color: var(--gl-gold); }

