/* Clean icon shell — flyer navigation */
.shell-flag {
  display: block;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.shell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 254, 249, 0.14);
  background: rgba(255, 254, 249, 0.06);
  color: #fffef9;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.15s ease,
    box-shadow 0.18s ease;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
}

.shell-btn .icon {
  width: 20px;
  height: 20px;
}

.shell-btn:hover {
  background: rgba(255, 254, 249, 0.11);
  border-color: rgba(255, 254, 249, 0.22);
}

.shell-btn:active {
  transform: scale(0.96);
}

.shell-btn--back {
  color: #e8d5a3;
}

.shell-btn--download {
  color: #1a2421;
  background: #e8c45a;
  border-color: rgba(232, 196, 90, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.shell-btn--download:hover {
  background: #f0d06a;
  border-color: rgba(255, 240, 184, 0.7);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 6px 20px rgba(201, 162, 39, 0.28);
}

.shell-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 254, 249, 0.14);
  background: rgba(255, 254, 249, 0.06);
  color: #fffef9;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease;
  backdrop-filter: blur(8px);
}

.shell-chip:hover {
  background: rgba(255, 254, 249, 0.1);
  border-color: rgba(255, 254, 249, 0.22);
}

body.has-flyer-shell .brochure-toolbar {
  position: sticky !important;
  top: 0;
  inset: auto !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: rgba(18, 26, 23, 0.82) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 254, 249, 0.08) !important;
}

.brochure-toolbar .toolbar-pages,
.brochure-toolbar a[href^="#page-"] {
  display: none !important;
}

.brochure-toolbar .toolbar-lang,
.brochure-toolbar .toolbar-lang--active,
.brochure-toolbar .toolbar-title {
  display: none !important;
}

body.has-flyer-shell .brochure-toolbar button[data-pdf-download].toolbar-pdf-icon {
  margin-left: auto;
}

.brochure-toolbar button[data-pdf-download].toolbar-pdf-icon {
  display: inline-flex !important;
}

.toolbar-lang-btn__code {
  line-height: 1;
}

.toolbar-lang-btn__caret {
  font-size: 10px;
  opacity: 0.65;
}

.toolbar-lang-btn[aria-expanded="true"] {
  background: rgba(255, 254, 249, 0.12);
  border-color: rgba(232, 196, 90, 0.35);
}

.lang-panel {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(10, 14, 12, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lang-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lang-panel__sheet {
  width: 100%;
  max-width: 520px;
  max-height: 80dvh;
  overflow-y: auto;
  background: rgba(26, 36, 33, 0.96);
  border: 1px solid rgba(255, 254, 249, 0.1);
  border-radius: 20px 20px 0 0;
  padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  backdrop-filter: blur(16px);
}

.lang-panel.is-open .lang-panel__sheet {
  transform: translateY(0);
}

.lang-panel__head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.lang-panel__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (min-width: 400px) {
  .lang-panel__grid {
    gap: 12px;
  }
}

.lang-panel__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 254, 249, 0.1);
  background: rgba(255, 254, 249, 0.04);
  color: #fffef9;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.lang-panel__item:hover,
.lang-panel__item:focus-visible {
  background: rgba(255, 254, 249, 0.08);
  border-color: rgba(232, 196, 90, 0.35);
  transform: translateY(-1px);
}

.lang-panel__item--active {
  background: rgba(232, 196, 90, 0.14);
  border-color: rgba(232, 196, 90, 0.45);
  pointer-events: none;
}

.lang-panel__item .shell-flag {
  width: 40px;
  height: 30px;
}

.lang-panel__code {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff0b8;
  line-height: 1;
}

.lang-panel__native {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 254, 249, 0.72);
  text-align: center;
  line-height: 1.2;
}

.flyer-mobile-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(18, 26, 23, 0.88);
  border-top: 1px solid rgba(255, 254, 249, 0.08);
  backdrop-filter: blur(14px);
  font-family: system-ui, sans-serif;
}

.flyer-mobile-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flyer-mobile-bar__lang .shell-flag {
  width: 24px;
  height: 18px;
}

@media (min-width: 900px) {
  .flyer-mobile-bar {
    display: none;
  }

  .lang-panel {
    align-items: center;
    padding: 20px;
  }

  .lang-panel__sheet {
    border-radius: 20px;
    max-height: 85dvh;
    transform: translateY(12px) scale(0.96);
  }

  .lang-panel.is-open .lang-panel__sheet {
    transform: translateY(0) scale(1);
  }
}

body.has-flyer-shell {
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 900px) {
  body.has-flyer-shell {
    padding-bottom: 0;
  }
}

@media screen {
  html.has-flyer-shell,
  body.has-flyer-shell,
  body.has-toolbar {
    overflow-x: hidden;
  }

  .sheet-fit {
    position: relative;
    margin: 0 auto 10px;
    overflow: hidden;
  }

  .sheet-fit > .sheet {
    margin: 0 !important;
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
  }
}