/* Aura Gallery embed — scoped under .aura-gallery
   Use px (not rem): Shopify themes set html { font-size: 62.5% }, and rem always
   resolves against the document root — not this component's font-size. */
.aura-gallery {
  --ag-bg: #1f1f21;
  --ag-text: #ffffff;
  --ag-accent: #e3fc02;
  --ag-on-accent: #1f1f21;
  --ag-muted: rgba(255, 255, 255, 0.55);
  --ag-line: rgba(255, 255, 255, 0.12);
  --ag-gap: clamp(8px, 1.2vw, 14px);
  --ag-font: Roboto, system-ui, sans-serif;

  font-size: 16px;
  box-sizing: border-box;
  color: var(--ag-text);
  font-family: var(--ag-font);
  font-weight: 300;
  line-height: 1.45;
  width: 100%;
  position: relative;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.aura-gallery *,
.aura-gallery *::before,
.aura-gallery *::after {
  box-sizing: border-box;
}

.aura-gallery--standalone {
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 10% -10%, rgba(227, 252, 2, 0.08), transparent 55%),
    radial-gradient(90% 60% at 100% 0%, rgba(255, 255, 255, 0.04), transparent 50%),
    var(--ag-bg);
  padding: clamp(20px, 4vw, 48px) clamp(16px, 3vw, 40px) 64px;
}

.aura-gallery__hero {
  max-width: 1152px;
  margin: 0 auto 32px;
  display: grid;
  gap: 10px;
}

.aura-gallery__brand {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.95;
}

.aura-gallery__brand span {
  color: var(--ag-accent);
}

.aura-gallery__lede {
  margin: 0;
  max-width: 448px;
  color: var(--ag-muted);
  font-size: 16px;
}

.aura-gallery__dots {
  max-width: none;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.aura-gallery__dot {
  appearance: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms ease, transform 160ms ease;
}

.aura-gallery__dot:hover,
.aura-gallery__dot.is-active {
  border-color: var(--ag-accent);
}

.aura-gallery__dot:hover {
  transform: translateY(-1px);
}

.aura-gallery__dot-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: block;
}

.aura-gallery__dot-swatch.is-light {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  outline: 1px solid rgba(0, 0, 0, 0.35);
}

.aura-gallery__dot-swatch.is-dark {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.aura-gallery__toolbar {
  max-width: none;
  margin: 0 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}

.aura-gallery__search,
.aura-gallery__select {
  flex: 1 1 192px;
  min-width: 176px;
  max-width: 352px;
  appearance: none;
  border: 1px solid var(--ag-line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ag-text);
  font-family: inherit;
  font-weight: 300;
  font-size: 15px;
  padding: 11px 14px;
  border-radius: 0;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.aura-gallery__select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ag-muted) 50%),
    linear-gradient(135deg, var(--ag-muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
  cursor: pointer;
}

.aura-gallery__select option {
  background: #1f1f21;
  color: #fff;
}

.aura-gallery__search:focus,
.aura-gallery__select:focus {
  border-color: var(--ag-accent);
  background-color: rgba(0, 0, 0, 0.4);
}

.aura-gallery__search::placeholder {
  color: var(--ag-muted);
}

.aura-gallery__count {
  color: var(--ag-muted);
  font-size: 14px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  margin-left: auto;
}

.aura-gallery__more-wrap {
  max-width: none;
  margin: 28px 0 0;
  display: flex;
  justify-content: center;
}

.aura-gallery__more {
  appearance: none;
  border: 1px solid var(--ag-accent);
  background: var(--ag-accent);
  color: var(--ag-on-accent);
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 0;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.aura-gallery__more:hover {
  background: transparent;
  color: var(--ag-accent);
}

.aura-gallery__grid {
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ag-gap);
}

@media (min-width: 720px) {
  .aura-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .aura-gallery__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.aura-gallery__item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  margin: 0;
  border: 0;
  background: #111;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  animation: ag-fade-in 420ms ease forwards;
}

.aura-gallery__item.is-appended {
  animation-delay: 0ms;
}

@keyframes ag-fade-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.aura-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 420ms ease, filter 420ms ease;
}

.aura-gallery__item:hover img {
  transform: scale(1.04);
  filter: saturate(1.05);
}

.aura-gallery__meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 42px 12px 12px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.82) 42%,
    rgba(0, 0, 0, 0) 100%
  );
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  opacity: 1;
  transform: none;
  pointer-events: none;
}

.aura-gallery__title {
  color: #ffffff;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 10px rgba(0, 0, 0, 0.75);
}

.aura-gallery__color {
  color: var(--ag-accent);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 8px rgba(0, 0, 0, 0.7);
}

.aura-gallery__status {
  max-width: none;
  margin: 48px auto;
  color: var(--ag-muted);
  text-align: center;
  font-size: 15px;
}

.aura-gallery__status--error {
  color: #ff8f8f;
}

/* Lightbox — also owns brand tokens (mounted on document.body) */
.aura-gallery__lightbox {
  --ag-bg: #1f1f21;
  --ag-text: #ffffff;
  --ag-accent: #e3fc02;
  --ag-on-accent: #1f1f21;
  --ag-muted: rgba(255, 255, 255, 0.55);
  --ag-font: Roboto, system-ui, sans-serif;

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 10, 12, 0.92);
  opacity: 0;
  transition: opacity 220ms ease;
  font-family: var(--ag-font);
  font-size: 16px;
  font-weight: 300;
  color: #ffffff;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.aura-gallery__lightbox *,
.aura-gallery__lightbox *::before,
.aura-gallery__lightbox *::after {
  box-sizing: border-box;
}

.aura-gallery__lightbox.is-open {
  display: flex;
  opacity: 1;
}

.aura-gallery__lightbox-inner {
  position: relative;
  max-width: min(96vw, 1100px);
  max-height: 92vh;
  width: fit-content;
  display: grid;
  gap: 14px;
  transform: scale(0.97);
  transition: transform 240ms ease;
}

.aura-gallery__lightbox.is-open .aura-gallery__lightbox-inner {
  transform: none;
}

.aura-gallery__lightbox img {
  display: block;
  max-width: min(96vw, 1100px);
  max-height: 72vh;
  width: auto;
  height: auto;
  margin: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.aura-gallery__lightbox-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  color: #ffffff;
  font-family: var(--ag-font);
}

.aura-gallery__lightbox-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.aura-gallery__lb-title {
  margin: 0;
  color: #ffffff !important;
  font-family: var(--ag-font) !important;
  font-style: normal !important;
  font-weight: 500 !important;
  font-size: 18px;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.aura-gallery__lb-color {
  margin: 0;
  font-style: normal !important;
  font-family: var(--ag-font) !important;
  color: var(--ag-accent) !important;
  font-weight: 500 !important;
  font-size: 15px;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.aura-gallery__lb-color.is-empty {
  color: var(--ag-muted) !important;
}

.aura-gallery__lightbox-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 12px;
  align-items: center;
}

.aura-gallery__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 2px;
  color: #ffffff !important;
  font-family: var(--ag-font) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--ag-accent);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease,
    filter 160ms ease;
}

.aura-gallery__link--shop {
  background: var(--ag-accent) !important;
  color: var(--ag-on-accent) !important;
  border: 1px solid var(--ag-accent) !important;
  border-bottom: 1px solid var(--ag-accent) !important;
  padding: 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 13px;
}

.aura-gallery__link--shop:hover,
.aura-gallery__link--shop:focus-visible {
  background: transparent !important;
  color: var(--ag-accent) !important;
  filter: none;
}

.aura-gallery__link--delete {
  appearance: none;
  cursor: pointer;
  background: transparent !important;
  color: #ff8f8f !important;
  border: 1px solid #ff8f8f !important;
  border-bottom: 1px solid #ff8f8f !important;
  padding: 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 13px;
  height: 40px;
}

.aura-gallery__link--delete:hover,
.aura-gallery__link--delete:focus-visible {
  background: #ff8f8f !important;
  color: #1f1f21 !important;
}

.aura-gallery__tile-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  appearance: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.75);
  color: #ff8f8f;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

.aura-gallery__tile-delete:hover {
  background: #ff8f8f;
  color: #1f1f21;
}

.aura-gallery__admin-banner {
  max-width: none;
  margin: 0 0 16px;
  color: #ff8f8f;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.aura-gallery__link:not(.aura-gallery__link--shop):not(.aura-gallery__link--delete):hover,
.aura-gallery__link:not(.aura-gallery__link--shop):not(.aura-gallery__link--delete):focus-visible {
  color: var(--ag-accent) !important;
}

.aura-gallery__link[hidden],
.aura-gallery__lb-color[hidden] {
  display: none !important;
}

.aura-gallery__close {
  position: absolute;
  top: -4px;
  right: -4px;
  appearance: none;
  border: 0;
  background: var(--ag-accent);
  color: var(--ag-on-accent);
  width: 36px;
  height: 36px;
  font-family: var(--ag-font);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
  z-index: 2;
}

.aura-gallery--embedded {
  background: transparent;
  min-height: 0;
  padding: 0;
}

.aura-gallery--embedded .aura-gallery__hero {
  display: none;
}

/* Host page helper when standalone body uses gallery */
body.aura-gallery-host {
  margin: 0;
  background: #1f1f21;
}
