/* ==========================================================================
   AVIA Design System — chrome
   Header, mobile drawer, category submenu and every footer variant.
   Replaces the CSS string that js/app-core.js used to inject as #gm-style.
   The .gm-* class names are created at runtime by app-core.js and must not
   be renamed; the .header-* / .footer-* names come from the Webflow export.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header shell
   -------------------------------------------------------------------------- */

.header,
.gm-header {
  position: sticky;
  top: 0;
  z-index: var(--avia-z-header);
  background: rgba(2, 20, 34, 0.76);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--avia-stroke-soft);
  transition: background var(--avia-dur) var(--avia-ease), border-color var(--avia-dur) var(--avia-ease);
}

/* The legacy utility bar (language switcher + duplicate cart) is redundant
   now that everything lives in one row. */
.header-top,
.header-top-wrapper,
.header-top-left,
.header-top-right {
  display: none !important;
}

.heeader-bottom {
  /* typo is in the Webflow export; kept so the selector keeps matching */
  width: 100%;
}

.heeader-bottom .container-large,
.gm-header .container-large {
  max-width: var(--avia-container-wide);
  margin-inline: auto;
}

.heeader-bottom .padding-global {
  padding-inline: var(--avia-gutter);
}

.header-bottom-wrapper,
.gm-header-inner {
  display: flex;
  align-items: center;
  gap: var(--avia-sp-4);
  min-height: 68px;
  max-width: var(--avia-container-wide);
  margin-inline: auto;
}

.gm-header-inner {
  padding: 0 var(--avia-gutter);
}

.header-bottom-left,
.gm-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.header-logo {
  display: flex;
  align-items: center;
  transition: opacity var(--avia-dur) var(--avia-ease);
}

.header-logo:hover {
  opacity: 0.82;
}

.header-logo img {
  height: 50px;
  width: auto;
  max-width: 168px;
  object-fit: contain;
}

.gm-brand {
  gap: 10px;
  color: var(--avia-text);
  font-family: var(--avia-font-display);
  font-weight: var(--avia-fw-display);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.gm-brand img {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.gm-brand span {
  font-size: 17px;
  line-height: 1;
}

.header-bottom-right {
  display: flex;
  align-items: center;
  gap: var(--avia-sp-3);
  margin-left: auto;
}

/* Webflow nav scaffolding — flatten it, the layout is handled above. */
.navbar-logo-left-container,
.navbar-logo-left-container .container,
.navbar-logo-left-container .navbar-wrapper,
.nav-menu-wrapper {
  display: flex;
  align-items: center;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  max-width: none;
  width: auto;
}

/* --------------------------------------------------------------------------
   Primary navigation links
   -------------------------------------------------------------------------- */

.nav-menu-two,
.gm-primary {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gm-primary-inline {
  margin-left: auto;
}

.header-main-item {
  display: flex;
  align-items: center;
}

.link-item,
.gm-primary-link,
.gm-submenu-link,
.profile-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  font-family: var(--avia-font-body);
  font-size: var(--avia-fs-sm);
  font-weight: var(--avia-fw-semi);
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  color: var(--avia-text-dim);
  border-radius: var(--avia-r-xs);
  transition: color var(--avia-dur) var(--avia-ease), background var(--avia-dur) var(--avia-ease);
}

.link-item:hover,
.gm-primary-link:hover,
.gm-submenu-link:hover,
.profile-nav a:hover {
  color: var(--avia-text);
  background: var(--avia-surface-2);
}

/* Active item is marked by the accent underline rather than a filled pill —
   closer to the white paper's restrained use of the brand blue. */
.link-item.is-active,
.gm-primary-link.is-active,
.gm-submenu-link.is-active,
.profile-nav a.is-active {
  color: var(--avia-accent);
  background: transparent;
}

.link-item.is-active::after,
.gm-primary-link.is-active::after,
.gm-submenu-link.is-active::after,
.profile-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--avia-accent);
}

/* Legacy search icons in the export have no handler behind them. */
.header-bottom-right-search-icon,
a.header-main-item.desktop.w-inline-block,
a.header-main-item.mobile.w-inline-block {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Header cart button
   -------------------------------------------------------------------------- */

.gm-lang-slot {
  display: flex;
  align-items: center;
}

.gm-lang {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: var(--avia-surface-1);
  border: 1px solid var(--avia-stroke);
  border-radius: 999px;
}

.gm-lang__btn {
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--avia-text-faint);
  font-family: var(--avia-font-display);
  font-size: 11px;
  font-weight: var(--avia-fw-bold);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color var(--avia-dur) var(--avia-ease), background var(--avia-dur) var(--avia-ease);
}

.gm-lang__btn:hover {
  color: var(--avia-text);
}

.gm-lang__btn.is-active {
  color: var(--avia-text-on-accent);
  background: var(--avia-accent);
}

.gm-menu-cart-wrap {
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.gm-cart-btn,
#cartButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--avia-text-dim);
  background: var(--avia-surface-1);
  border: 1px solid var(--avia-stroke);
  border-radius: var(--avia-r-sm);
  cursor: pointer;
  transition: all var(--avia-dur) var(--avia-ease);
}

.gm-cart-btn:hover,
#cartButton:hover {
  color: var(--avia-accent);
  border-color: var(--avia-stroke-accent);
  background: var(--avia-surface-2);
}

.gm-cart-btn svg,
#cartButton svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* The export hard-codes dark strokes on the cart glyph. */
#cartButton svg path,
#cartButton svg circle:not(#cartCount) {
  stroke: currentColor;
}

#cartCount {
  fill: var(--avia-accent);
}

/* --------------------------------------------------------------------------
   Category submenu strip
   -------------------------------------------------------------------------- */

.gm-submenu {
  position: relative;
  z-index: calc(var(--avia-z-header) - 10);
  background: rgba(2, 27, 45, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--avia-stroke-soft);
}

.gm-submenu-inner {
  display: flex;
  gap: 4px;
  max-width: var(--avia-container-wide);
  margin-inline: auto;
  padding: 8px var(--avia-gutter);
  overflow-x: auto;
  scrollbar-width: none;
}

.gm-submenu-inner::-webkit-scrollbar {
  display: none;
}

.gm-submenu-link {
  padding: 7px 12px;
  font-size: var(--avia-fs-xs);
}

/* --------------------------------------------------------------------------
   Mobile button + drawer
   -------------------------------------------------------------------------- */

.gm-mobile-actions {
  display: none;
  align-items: center;
  gap: var(--avia-sp-2);
  margin-left: auto;
}

.gm-mobile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--avia-text);
  background: var(--avia-surface-1);
  border: 1px solid var(--avia-stroke);
  border-radius: var(--avia-r-sm);
  cursor: pointer;
  transition: all var(--avia-dur) var(--avia-ease);
}

.gm-mobile-btn:hover,
.gm-mobile-btn-light:hover {
  border-color: var(--avia-stroke-accent);
  background: var(--avia-surface-2);
}

.gm-mobile-btn-light {
  color: var(--avia-text);
  background: var(--avia-surface-1);
  border-color: var(--avia-stroke);
}

.gm-mobile-btn svg {
  width: 20px;
  height: 20px;
}

.gm-mobile-btn-inline {
  display: none;
  margin-left: auto;
}

.gm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--avia-z-drawer) - 1);
  background: rgba(0, 8, 23, 0.68);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.gm-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: var(--avia-z-drawer);
  display: flex;
  flex-direction: column;
  width: min(330px, 86vw);
  height: 100%;
  padding: var(--avia-sp-5) 0;
  background: linear-gradient(196deg, #05395a 0%, #02263d 46%, #01131f 100%);
  border-left: 1px solid var(--avia-stroke);
  box-shadow: var(--avia-shadow-lg);
  transform: translateX(100%);
  transition: transform var(--avia-dur-slow) var(--avia-ease-out);
  overflow-y: auto;
}

.gm-drawer.is-open {
  transform: translateX(0);
}

html[dir="rtl"] .header-bottom-right {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .gm-drawer {
  right: auto;
  left: 0;
  border-left: 0;
  border-right: 1px solid var(--avia-stroke);
  transform: translateX(-100%);
}

.gm-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--avia-sp-3);
  padding: 0 var(--avia-sp-5) var(--avia-sp-4);
  border-bottom: 1px solid var(--avia-stroke-soft);
}

.gm-drawer-title {
  font-family: var(--avia-font-display);
  font-size: var(--avia-fs-eyebrow);
  font-weight: var(--avia-fw-bold);
  letter-spacing: var(--avia-ls-eyebrow);
  text-transform: uppercase;
  color: var(--avia-text-faint);
}

.gm-drawer-close {
  padding: 7px 12px;
  font-size: var(--avia-fs-xs);
  font-weight: var(--avia-fw-semi);
  color: var(--avia-text-dim);
  background: var(--avia-surface-1);
  border: 1px solid var(--avia-stroke);
  border-radius: var(--avia-r-xs);
  cursor: pointer;
  transition: all var(--avia-dur) var(--avia-ease);
}

.gm-drawer-close:hover {
  color: var(--avia-text);
  border-color: var(--avia-stroke-accent);
}

.gm-drawer-body {
  display: flex;
  flex-direction: column;
  gap: var(--avia-sp-5);
  padding: var(--avia-sp-5) var(--avia-sp-4) var(--avia-sp-6);
}

.gm-drawer-primary,
.gm-drawer-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gm-drawer-primary a,
.gm-drawer-sub a {
  padding: 12px 14px;
  font-size: var(--avia-fs-body);
  font-weight: var(--avia-fw-semi);
  color: var(--avia-text-dim);
  text-decoration: none;
  border-radius: var(--avia-r-sm);
  transition: all var(--avia-dur) var(--avia-ease);
}

.gm-drawer-sub a {
  font-size: var(--avia-fs-sm);
  font-weight: var(--avia-fw-medium);
  color: var(--avia-text-faint);
}

.gm-drawer-primary a:hover,
.gm-drawer-sub a:hover {
  color: var(--avia-text);
  background: var(--avia-surface-2);
}

.gm-drawer-primary a.is-active,
.gm-drawer-sub a.is-active {
  color: var(--avia-text-on-accent);
  background: var(--avia-accent);
}

.gm-drawer-sec > div:first-child {
  font-family: var(--avia-font-display);
  font-size: var(--avia-fs-eyebrow) !important;
  font-weight: var(--avia-fw-bold);
  letter-spacing: var(--avia-ls-eyebrow);
  text-transform: uppercase;
  color: var(--avia-text-faint) !important;
  padding: 0 14px 8px !important;
}

/* Elements that only make sense when signed out/in. */
.gm-auth-hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  position: relative;
  margin-top: var(--avia-sp-8);
  background: linear-gradient(180deg, rgba(0, 8, 23, 0) 0%, rgba(0, 8, 23, 0.55) 34%, #000817 100%);
  border-top: 1px solid var(--avia-stroke-soft);
  color: var(--avia-text-dim);
}

.footer .container-large {
  max-width: var(--avia-container);
  margin-inline: auto;
}

.footer .padding-global {
  padding-inline: var(--avia-gutter);
}

.footer-top {
  padding-block: clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--avia-stroke-soft);
}

.footer-top-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--avia-sp-6);
  flex-wrap: wrap;
}

.footer-top-text {
  flex: 1 1 420px;
}

.footer-top-title {
  margin: 0 0 var(--avia-sp-3);
  font-family: var(--avia-font-display);
  font-size: var(--avia-fs-h2);
  font-weight: var(--avia-fw-display);
  line-height: var(--avia-lh-head);
  letter-spacing: var(--avia-ls-head);
  text-transform: uppercase;
  color: var(--avia-text);
}

.footer-top-text-content {
  max-width: 56ch;
  font-size: var(--avia-fs-sm);
  line-height: 1.6;
  color: var(--avia-text-dim);
}

.footer-top-button {
  display: flex;
  align-items: center;
  gap: var(--avia-sp-3);
  flex-wrap: wrap;
}

.avia-store,
.footer-app-download-link,
.hm-download__store,
.mk-stores a {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform var(--avia-dur) var(--avia-ease), box-shadow var(--avia-dur) var(--avia-ease);
}

.avia-store:hover,
.footer-app-download-link:hover,
.hm-download__store:hover,
.mk-stores a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(12, 174, 244, 0.45), 0 10px 24px rgba(0, 8, 23, 0.35);
}

.avia-store img,
.footer-app-download-link img,
.hm-download__store img,
.mk-stores img {
  height: 48px;
  width: auto;
  display: block;
  border-radius: 10px;
}

.footer-app-download-link {
  display: inline-flex;
  border-radius: var(--avia-r-sm);
  overflow: hidden;
  transition: transform var(--avia-dur) var(--avia-ease), opacity var(--avia-dur) var(--avia-ease);
}

.footer-app-download-link:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.footer-app-download-link img {
  height: 44px;
  width: auto;
  display: block;
}

.footer-bottom {
  padding-block: clamp(32px, 4vw, 56px);
}

.footer-bottom-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--avia-sp-5);
}

.footer-bottom-top-content {
  display: flex;
  justify-content: space-between;
  gap: var(--avia-sp-6);
  flex-wrap: wrap;
}

.footer-community-title,
.footer-bottom-top-right-content .footer-community-title {
  margin-bottom: var(--avia-sp-3);
  font-family: var(--avia-font-display);
  font-size: var(--avia-fs-eyebrow);
  font-weight: var(--avia-fw-bold);
  letter-spacing: var(--avia-ls-eyebrow);
  text-transform: uppercase;
  color: var(--avia-text-faint);
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: var(--avia-sp-2);
  flex-wrap: wrap;
}

.footer-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--avia-text-dim);
  background: var(--avia-surface-1);
  border: 1px solid var(--avia-stroke);
  border-radius: var(--avia-r-sm);
  transition: all var(--avia-dur) var(--avia-ease);
}

.footer-social-links a:hover,
.footer .social-link-item:hover {
  color: var(--avia-accent);
  border-color: var(--avia-stroke-accent);
  background: var(--avia-surface-2);
  transform: translateY(-2px);
}

.footer .social-link-item {
  color: var(--avia-text-dim);
  background: var(--avia-surface-1);
}

.footer-social-links img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.footer-bottom-div {
  height: 1px;
  background: var(--avia-stroke-soft);
}

.footer-bottom-links-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--avia-sp-5);
  flex-wrap: wrap;
}

.footer-links-left {
  display: flex;
  align-items: center;
  gap: var(--avia-sp-4);
  flex-wrap: wrap;
}

.footer-link-block {
  text-decoration: none;
}

.footer-link {
  font-size: var(--avia-fs-sm);
  font-weight: var(--avia-fw-medium);
  color: var(--avia-text-faint);
  transition: color var(--avia-dur) var(--avia-ease);
}

.footer-link-block:hover .footer-link {
  color: var(--avia-accent);
}

.footer-links-right {
  display: flex;
  align-items: center;
  gap: var(--avia-sp-3);
  flex-wrap: wrap;
}

.footer-link-icon img {
  height: 26px;
  width: auto;
  opacity: 0.6;
  transition: opacity var(--avia-dur) var(--avia-ease);
}

.footer-link-icon:hover img {
  opacity: 1;
}

.footer .news-title {
  max-width: 16ch;
  margin: 0 0 var(--avia-sp-4);
  font-family: var(--avia-font-display);
  font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.2rem);
  font-weight: var(--avia-fw-display);
  line-height: var(--avia-lh-head);
  letter-spacing: var(--avia-ls-head);
  text-transform: none;
  color: var(--avia-text);
}

.footer .join-the-list {
  margin-bottom: var(--avia-sp-3);
  font-family: var(--avia-font-display);
  font-size: var(--avia-fs-eyebrow);
  font-weight: var(--avia-fw-bold);
  letter-spacing: var(--avia-ls-eyebrow);
  text-transform: uppercase;
  color: var(--avia-text-faint);
}

.footer .nl-form-block,
.footer .nl-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--avia-sp-3);
  max-width: 360px;
  margin: 0;
}

.footer .nl-input,
.footer .nl-input.w-input {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 12px 14px;
  color: var(--avia-text);
  background: var(--avia-surface-1);
  border: 1px solid var(--avia-stroke);
  border-radius: var(--avia-r-sm);
  outline: none;
  box-shadow: none;
}

.footer .nl-input::placeholder {
  color: var(--avia-text-faint);
}

.footer .nl-input:focus {
  border-color: var(--avia-stroke-accent);
  box-shadow: 0 0 0 3px rgba(12, 174, 244, 0.16);
}

.footer .nl-text {
  max-width: 40ch;
  font-size: var(--avia-fs-sm);
  line-height: 1.5;
  color: var(--avia-text-dim);
}

.footer .nl-btn,
.footer .nl-btn.w-button {
  align-self: flex-start;
  min-height: 44px;
  padding: 11px 22px;
  color: var(--avia-text-on-accent);
  background: var(--avia-accent);
  border: 0;
  border-radius: var(--avia-r-sm);
  font-weight: var(--avia-fw-semi);
  cursor: pointer;
  transition: background var(--avia-dur) var(--avia-ease), transform var(--avia-dur) var(--avia-ease);
}

.footer .nl-btn:hover,
.footer .nl-btn.w-button:hover {
  color: var(--avia-text-on-accent);
  background: var(--avia-accent-hi);
  transform: translateY(-1px);
}

.footer-copyright-text,
.footer-privacy-links {
  font-size: var(--avia-fs-xs);
  color: var(--avia-text-faint);
}

.footer-privacy-links {
  text-decoration: none;
}

a.footer-privacy-links:hover {
  color: var(--avia-accent);
}

.footer-bottom-copyright-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--avia-sp-4);
  flex-wrap: wrap;
  padding-block: var(--avia-sp-4) var(--avia-sp-6);
}

.footer-copy-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links-right {
  display: none;
}

.footer .social-icon-svg,
.footer .social-link-item .w-embed {
  width: 18px;
  height: 18px;
  display: flex;
}

.footer .social-icon-svg svg {
  width: 18px;
  height: 18px;
}

/* Minimal footer used by auth, admin and category pages. */
.footer-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--avia-sp-6) var(--avia-gutter);
}

.footer-text {
  font-size: var(--avia-fs-xs);
  color: var(--avia-text-faint);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
  .gm-mobile-btn,
  .gm-mobile-btn-inline {
    display: flex;
  }

  .gm-mobile-actions {
    display: flex;
  }

  .header-bottom-right .nav-menu-wrapper,
  .header-bottom-wrapper .gm-primary,
  .gm-header .gm-primary,
  .gm-submenu,
  .profile-nav a,
  .menu-button.w-nav-button,
  .gm-menu-cart-wrap {
    display: none !important;
  }

  .header-bottom-wrapper,
  .gm-header-inner {
    min-height: 60px;
    justify-content: space-between;
  }

  .header-logo img {
    height: 40px;
  }

  .footer-top-content,
  .footer-bottom-top-content,
  .footer-bottom-links-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .footer-app-download-link img {
    height: 40px;
  }
}

/* --------------------------------------------------------------------------
   Universal media viewer

   installUniversalImageViewer() in js/app-core.js appends this overlay to
   every page but shipped without any stylesheet, so the toolbar, <video> and
   hint text rendered as loose content under the footer. It is hidden until the
   script adds .is-open.
   -------------------------------------------------------------------------- */

.gm-image-viewer {
  position: fixed;
  inset: 0;
  z-index: var(--avia-z-modal);
  display: none;
  flex-direction: column;
  gap: var(--avia-sp-3);
  padding: var(--avia-sp-4);
  background: rgba(0, 8, 23, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.gm-image-viewer.is-open {
  display: flex;
}

.gm-image-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: var(--avia-sp-2);
}

.gm-image-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-family: var(--avia-font-display);
  font-size: 15px;
  font-weight: var(--avia-fw-bold);
  color: var(--avia-text-dim);
  background: var(--avia-surface-1);
  border: 1px solid var(--avia-stroke);
  border-radius: var(--avia-r-sm);
  cursor: pointer;
  transition: all var(--avia-dur) var(--avia-ease);
}

.gm-image-btn:hover {
  color: var(--avia-text);
  border-color: var(--avia-stroke-accent);
  background: var(--avia-surface-2);
}

.gm-image-shell {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  gap: var(--avia-sp-3);
  min-height: 0;
}

.gm-image-nav {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  font-size: 26px;
  line-height: 1;
  color: var(--avia-text-dim);
  background: var(--avia-surface-1);
  border: 1px solid var(--avia-stroke);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--avia-dur) var(--avia-ease);
}

.gm-image-nav:hover {
  color: var(--avia-text);
  border-color: var(--avia-stroke-accent);
}

.gm-image-stage {
  position: relative;
  flex: 1;
  align-self: stretch;
  overflow: hidden;
  border-radius: var(--avia-r-md);
}

/* The script positions the image from its centre and drives zoom/pan through
   the transform, so the offsets here must stay at 50%. */
.gm-viewer-image {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 100%;
  max-height: 100%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}

.gm-viewer-video {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  max-width: 100%;
  max-height: 100%;
  transform: translate(-50%, -50%);
  border-radius: var(--avia-r-sm);
  background: #000;
}

.gm-image-counter {
  position: absolute;
  right: var(--avia-sp-3);
  bottom: var(--avia-sp-3);
  padding: 4px 10px;
  font-size: var(--avia-fs-xs);
  font-weight: var(--avia-fw-semi);
  color: var(--avia-text-dim);
  background: rgba(2, 20, 34, 0.8);
  border: 1px solid var(--avia-stroke);
  border-radius: var(--avia-r-pill);
  font-variant-numeric: tabular-nums;
}

.gm-image-strip {
  display: flex;
  flex: 0 0 auto;
  gap: var(--avia-sp-2);
  justify-content: center;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.gm-image-strip:empty {
  display: none;
}

.gm-strip-item {
  position: relative;
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  padding: 0;
  overflow: hidden;
  background: var(--avia-surface-1);
  border: 2px solid var(--avia-stroke);
  border-radius: var(--avia-r-sm);
  cursor: pointer;
  transition: border-color var(--avia-dur) var(--avia-ease);
}

.gm-strip-item:hover {
  border-color: var(--avia-stroke-accent);
}

.gm-strip-item.is-active {
  border-color: var(--avia-accent);
}

.gm-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gm-strip-type {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: var(--avia-fw-bold);
  letter-spacing: 0.06em;
  color: var(--avia-text-on-accent);
  background: var(--avia-accent);
  border-radius: 3px;
}

.gm-image-hint {
  flex: 0 0 auto;
  text-align: center;
  font-size: var(--avia-fs-xs);
  color: var(--avia-text-faint);
}

/* Category artwork painted by applyMarketplaceCategoryIcons() in app-core.js.
   The source files are monochrome line art in near-black, so they are used as
   a mask over currentColor instead of being shown directly. */
.gm-cat-icon {
  display: block;
  position: relative;
  z-index: 1;
  background-color: currentColor;
  -webkit-mask: var(--gm-cat-icon) center / contain no-repeat;
  mask: var(--gm-cat-icon) center / contain no-repeat;
}

@media (max-width: 640px) {
  .gm-image-viewer {
    padding: var(--avia-sp-3);
  }

  .gm-image-nav {
    width: 38px;
    height: 38px;
    font-size: 21px;
  }

  .gm-strip-item {
    width: 54px;
    height: 54px;
  }

  .gm-image-hint {
    display: none;
  }
}
