/* ═══════════════════════════════════════════════════
   VALICO TOTEM — Dark Luxury Theme
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&display=swap');

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #0a0a0a;
  color: #f5f0eb;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* ── Typography ───────────────────────────────────── */
.font-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ── View Transitions ─────────────────────────────── */
.view {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 300ms ease, transform 300ms ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.view.active {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════
   1. LANDING
   ═══════════════════════════════════════════════════ */
.landing {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.landing__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4);
}

.landing__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 24px;
}

.landing__logo-area {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: min(10vh, 80px);
}

.landing__logo {
  width: 180px;
  height: auto;
  margin-bottom: 8px;
}

.landing__tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.6);
}

.landing__cta-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.landing__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 56px;
  border: 1px solid rgba(245, 240, 235, 0.4);
  background: rgba(245, 240, 235, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f5f0eb;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 250ms ease;
}

.landing__cta:active {
  background: rgba(245, 240, 235, 0.15);
  border-color: rgba(245, 240, 235, 0.7);
}

.landing__banner {
  flex: 0 0 auto;
  padding: 20px 0 max(env(safe-area-inset-bottom, 16px), 16px);
  text-align: center;
}

.banner-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.75);
  line-height: 1.6;
}

.banner-text span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════
   2. CATALOG
   ═══════════════════════════════════════════════════ */
.catalog {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0a0a0a;
}

.catalog__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  border-bottom: 1px solid rgba(245, 240, 235, 0.08);
}

.catalog__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid rgba(245, 240, 235, 0.2);
  color: #f5f0eb;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 0;
  transition: border-color 200ms;
}

.catalog__back:active {
  border-color: rgba(245, 240, 235, 0.5);
}

.catalog__header-logo {
  height: 28px;
  width: auto;
}

.catalog__gender-label {
  margin-left: auto;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.5);
}

/* Brand Filter */
.catalog__filters {
  flex: 0 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 12px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.catalog__filters::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  display: inline-block;
  padding: 8px 18px;
  margin-right: 8px;
  border: 1px solid rgba(245, 240, 235, 0.15);
  background: transparent;
  color: rgba(245, 240, 235, 0.6);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
  vertical-align: top;
}

.filter-pill:last-child {
  margin-right: 0;
}

.filter-pill.active {
  background: #f5f0eb;
  color: #0a0a0a;
  border-color: #f5f0eb;
}

.filter-pill:active:not(.active) {
  border-color: rgba(245, 240, 235, 0.4);
}

/* Product Grid */
.catalog__grid {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}

.catalog__footer {
  flex: 0 0 auto;
  padding: 16px 0 max(env(safe-area-inset-bottom, 16px), 16px);
  text-align: center;
  border-top: 1px solid rgba(245, 240, 235, 0.08);
}

.product-card {
  cursor: pointer;
  transition: opacity 200ms ease;
}

.product-card:active {
  opacity: 0.7;
}

.product-card__img-wrap {
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
  aspect-ratio: 1 / 1;
}

.product-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card__info {
  padding: 10px 4px 16px;
}

.product-card__brand {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.45);
  margin-bottom: 2px;
}

.product-card__name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  color: #f5f0eb;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════
   3. PRODUCT DETAIL
   ═══════════════════════════════════════════════════ */
.product-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0a0a0a;
}

.product-detail__gallery {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  touch-action: pan-y;
}

.product-detail__gallery-track {
  display: flex;
  height: 100%;
  transition: transform 300ms ease;
}

.product-detail__gallery-slide {
  min-width: 100%;
  height: 100%;
}

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

.product-detail__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.product-detail__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 240, 235, 0.35);
  transition: background 200ms;
}

.product-detail__dot.active {
  background: #f5f0eb;
}

.product-detail__close {
  position: absolute;
  top: max(env(safe-area-inset-top, 12px), 12px);
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  color: #f5f0eb;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

.product-detail__close:active {
  background: rgba(10, 10, 10, 0.8);
}

/* Info section */
.product-detail__info {
  flex: 1;
  padding: 24px 20px 16px;
  display: flex;
  flex-direction: column;
}

.product-detail__brand {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.45);
  margin-bottom: 6px;
}

.product-detail__name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: #f5f0eb;
  line-height: 1.2;
  margin-bottom: 4px;
}

.product-detail__category {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.35);
  margin-bottom: 16px;
}

.product-detail__desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245, 240, 235, 0.7);
  max-width: 480px;
}

.product-detail__footer {
  flex: 0 0 auto;
  padding: 16px 20px max(env(safe-area-inset-bottom, 16px), 16px);
  border-top: 1px solid rgba(245, 240, 235, 0.06);
}

.product-detail__footer .banner-text {
  text-align: center;
}

/* ═══════════════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════════════ */

/* Safe area padding for notched devices */
.safe-top { padding-top: env(safe-area-inset-top, 0); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }

/* Loading shimmer for images */
.shimmer {
  background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ═══════════════════════════════════════════════════
   LIGHT THEME
   Landing always dark — only catalog & product switch
   ═══════════════════════════════════════════════════ */

/* Smooth background transition on theme switch */
.catalog,
.product-detail {
  transition: background-color 300ms ease;
}

/* ── Theme Toggle ─────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: rgba(245, 240, 235, 0.5);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: color 200ms;
}

.theme-toggle:active { color: #f5f0eb; }

.theme-toggle .icon-moon { display: none; }

html.light .theme-toggle { color: rgba(26, 26, 26, 0.45); }
html.light .theme-toggle:active { color: #1a1a1a; }
html.light .theme-toggle .icon-sun { display: none; }
html.light .theme-toggle .icon-moon { display: block; }

/* Toggle over product gallery — always light on dark overlay */
.product-detail .theme-toggle {
  position: absolute;
  top: max(env(safe-area-inset-top, 12px), 12px);
  left: 16px;
  z-index: 2;
  color: rgba(245, 240, 235, 0.7);
}

.product-detail .theme-toggle:active { color: #f5f0eb; }
html.light .product-detail .theme-toggle { color: rgba(245, 240, 235, 0.7); }
html.light .product-detail .theme-toggle:active { color: #f5f0eb; }

/* ── Catalog Light ────────────────────────────────── */
html.light .catalog { background: #f8f6f3; }
html.light .catalog__header { border-bottom-color: rgba(26, 26, 26, 0.08); }
html.light .catalog__back { border-color: rgba(26, 26, 26, 0.2); color: #1a1a1a; }
html.light .catalog__back:active { border-color: rgba(26, 26, 26, 0.5); }
html.light .catalog__header-logo { filter: brightness(0); }
html.light .catalog__gender-label { color: rgba(26, 26, 26, 0.5); }
html.light .filter-pill { border-color: rgba(26, 26, 26, 0.15); color: rgba(26, 26, 26, 0.6); }
html.light .filter-pill.active { background: #1a1a1a; color: #f5f0eb; border-color: #1a1a1a; }
html.light .filter-pill:active:not(.active) { border-color: rgba(26, 26, 26, 0.4); }
html.light .catalog__footer { border-top-color: rgba(26, 26, 26, 0.08); }
html.light .product-card__img-wrap { background: #eae6e1; }
html.light .product-card__brand { color: rgba(26, 26, 26, 0.5); }
html.light .product-card__name { color: #1a1a1a; }

/* ── Product Detail Light ─────────────────────────── */
html.light .product-detail { background: #f8f6f3; }
html.light .product-detail__brand { color: rgba(26, 26, 26, 0.5); }
html.light .product-detail__name { color: #1a1a1a; }
html.light .product-detail__category { color: rgba(26, 26, 26, 0.4); }
html.light .product-detail__desc { color: rgba(26, 26, 26, 0.7); }
html.light .product-detail__footer { border-top-color: rgba(26, 26, 26, 0.06); }

/* ── Shared Light ─────────────────────────────────── */
html.light .catalog .banner-text,
html.light .product-detail .banner-text { color: rgba(26, 26, 26, 0.65); }

html.light .shimmer {
  background: linear-gradient(90deg, #eae6e1 25%, #f0ece7 50%, #eae6e1 75%);
  background-size: 200% 100%;
}
