﻿* {
  box-sizing: border-box;
}

:root {
  --navy: #071522;
  --navy-deep: #040d16;
  --navy-raised: #0b1c2b;
  --gold: #d2a24f;
  --gold-light: #f1d49a;
  --text-muted: #aeb6bf;
  --gold-line: rgba(210, 162, 79, 0.78);
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--navy-deep);
  color: var(--gold-light);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: 100%;
  min-height: 100vh;
  padding: 46px 0 72px;
  padding: calc(46px + env(safe-area-inset-top)) 0 calc(72px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 8%, rgba(31, 58, 78, 0.46), transparent 28%),
    linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 42%, #081827 100%);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  isolation: isolate;
  width: 100%;
  height: 46px;
  height: calc(46px + env(safe-area-inset-top));
  padding-top: 0;
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 15, 25, 0.96);
  color: var(--gold-light);
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  border-bottom: 1px solid var(--gold-line);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.navbar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -42%;
  width: 34%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, rgba(210, 162, 79, 0.04) 28%, rgba(241, 212, 154, 0.24) 50%, rgba(210, 162, 79, 0.06) 72%, transparent 100%);
  transform: translateX(0) skewX(-14deg);
  animation: navbarSweep 5s ease-in-out 250ms infinite;
}

.detailNavbar {
  justify-content: center;
}

.navbarBrand {
  max-width: calc(100% - 32px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.detailNavbar .navbarTitle {
  max-width: calc(100% - 96px);
}

.navbarLogo {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--gold-light);
  fill: currentColor;
}

.navbarTitle {
  display: block;
  min-width: 0;
  color: var(--gold-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backButton {
  position: absolute;
  left: 0;
  top: 0;
  top: env(safe-area-inset-top);
  width: 46px;
  height: 46px;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--gold-light);
}

.backButton svg {
  width: 24px;
  height: 24px;
}

.swiper {
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 39 / 16;
  overflow: visible;
  user-select: none;
}

.swiperViewport {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--navy-raised);
  border: 1px solid var(--gold-line);
  border-radius: 5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  cursor: grab;
  touch-action: pan-y;
}

.swiperViewport:active {
  cursor: grabbing;
}

.swiperTrack {
  height: 100%;
  display: flex;
  transition: transform 360ms ease;
}

.swiperSlide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.swiperSlide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.swiperArrow,
.swiperArrowArt {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 64px;
  transform: translateY(-50%);
}

.swiperArrowArt {
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.swiperArrow {
  z-index: 3;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.swiperArrowPrev,
.swiperArrowArtPrev {
  left: -10px;
  transform: translate(-50%, -50%);
}

.swiperArrowNext,
.swiperArrowArtNext {
  right: -10px;
  transform: translate(50%, -50%);
}

.swiperArrowArtNext img {
  transform: scaleX(-1);
}

.swiperArrowArt img {
  width: 34px;
  height: 49px;
  display: block;
  object-fit: contain;
}

.swiperDots {
  display: none;
}

.swiperDot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(210, 162, 79, 0.72);
}

.swiperDot.active {
  background: var(--gold-light);
  box-shadow: 0 0 0 2px rgba(241, 212, 154, 0.18);
}

.gridPage {
  max-width: 1458px;
  margin: 0 auto;
}

.cardGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 24px;
  row-gap: 29px;
  padding: 20px 36px 40px;
}

.card {
  display: block;
  min-width: 0;
  color: inherit;
  text-align: center;
  text-decoration: none;
  opacity: 0;
  transform: translateY(10px);
  transition: filter 140ms ease;
}

.card.cardVisible {
  opacity: 1;
  transform: translateY(0);
}

.card.cardRevealRun {
  animation: cardRevealIn 520ms ease both;
  animation-delay: var(--reveal-delay, 0ms);
}

.card:active {
  filter: brightness(0.96);
  transform: translateY(0) scale(0.985);
  transition-duration: 120ms;
  transition-delay: 0ms;
}

.cardImage {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--navy-raised);
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.18);
}

.cardImage img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cardTitle {
  margin-top: 20px;
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cardDesc {
  height: 22px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 11px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cardWide {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(400px, 100%);
}

.cardWide .cardImage {
  aspect-ratio: auto;
  height: auto;
}

.cardWide .cardImage img {
  height: auto;
  object-fit: contain;
}

.cardWide .cardDesc {
  display: none;
}

[hidden] {
  display: none !important;
}

body.detailView .app {
  padding-bottom: 0;
  background: var(--navy-deep);
}

body.detailView .bottomTabs {
  display: none;
}

.detailImage {
  width: 100%;
  display: block;
  animation: detailImageIn 520ms ease both;
}

.detailSingle {
  display: flex;
  justify-content: center;
  width: 100%;
}

.detailSingle .detailImage {
  width: min(500px, 100%);
}

.bottomTabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  height: 48px;
  height: calc(48px + env(safe-area-inset-bottom));
  padding-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: rgba(6, 17, 28, 0.97);
  color: #aeb6bf;
  border-top: 1px solid var(--gold-line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.tabButton {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  padding: 5px 0 3px;
  background: transparent;
  color: #aeb6bf;
  font-size: 12px;
  line-height: 12px;
  text-align: center;
}

.tabIcon {
  width: 20px;
  height: 20px;
  margin: 0 auto 5px;
  display: block;
  color: #aeb6bf;
}

.tabButton.active .tabIcon,
.tabButton.active .tabText {
  color: var(--gold-light);
}

.tabText {
  display: block;
}

.emptyState {
  padding: 80px 20px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 760px) and (hover: none), (max-width: 760px) and (pointer: coarse) {
  .cardGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: initial;
    column-gap: 24px;
    row-gap: 29px;
    padding: 20px 24px 36px;
  }

  .card {
    width: auto;
  }

}

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

@media (max-width: 520px) and (hover: hover) and (pointer: fine) {
  .cardGrid {
    grid-template-columns: repeat(4, 1fr);
    column-gap: 5px;
    row-gap: 29px;
    padding-left: 27px;
    padding-right: 27px;
  }

}

.mobileClient .cardGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: initial;
  column-gap: 24px;
  row-gap: 29px;
  padding: 20px 24px 36px;
}

.mobileClient .card,
.mobileClient .cardImage {
  width: 100%;
}

.mobileClient .cardWide .cardImage {
  aspect-ratio: auto;
  height: auto;
}

@keyframes navbarSweep {
  0%, 4% {
    transform: translateX(0) skewX(-14deg);
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  62% {
    transform: translateX(430%) skewX(-14deg);
    opacity: 1;
  }

  68%, 100% {
    transform: translateX(430%) skewX(-14deg);
    opacity: 0;
  }
}

@keyframes detailImageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardRevealIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
