/* Kissakan — Assortment page. Builds on /styles.css (tokens, nav, footer, hero pieces). */

/* ─── Nav additions ───────────────────────────────────────── */
.nav-back { display: inline-flex; align-items: center; gap: 10px; }
.nav-back svg { transition: transform .35s cubic-bezier(.22,.61,.36,1); }
.nav-back:hover svg { transform: translateX(-5px); }
.nav .is-current { color: var(--red-2); }
@media (max-width: 760px) { .nav-right .mono.is-current { display: none; } }

/* ─── Hero (shorter than the home hero) ───────────────────── */
.as-hero {
  position: relative;
  min-height: 86vh;
  background: var(--bg);
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 140px 0 72px;
}
.as-hero .hero-title { font-size: clamp(52px, 8vw, 140px); margin-bottom: 48px; }
.as-hero .hero-sun { top: 30%; right: 8%; width: 300px; height: 300px; opacity: .8; }
@media (max-width: 900px) { .as-hero { min-height: 78vh; padding-bottom: 48px; } .as-hero .hero-sun { width: 200px; height: 200px; right: -40px; top: 16%; } }
.temp-toggle .t.active.all { background: var(--ivory); color: var(--bg); }

/* ─── Catalog ─────────────────────────────────────────────── */
.as-catalog { background: var(--bg-2); border-top: 1px solid var(--rule); padding: 96px 0 120px; }
.as-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 28px; margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.as-chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(237,230,214,0.12);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  transition: all .35s cubic-bezier(.4,0,.2,1);
}
.as-chip:hover { color: var(--ivory); border-color: rgba(237,230,214,0.3); }
.as-chip.on { background: var(--red); border-color: var(--red); color: var(--ivory); }
.as-chip .n { opacity: .55; margin-left: 6px; }

.as-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (max-width: 1200px) { .as-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .as-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .as-grid { grid-template-columns: 1fr; } }

.as-card {
  --tint: var(--tobacco);
  background: var(--bg-2);
  text-align: left;
  display: flex; flex-direction: column;
  min-height: 100%;
  transition: background .5s ease;
  animation: fadeUp .6s ease-out both;
  position: relative;
}
.as-card:hover, .as-card:focus-visible { background: var(--bg-3); outline: none; }
.as-card:focus-visible { box-shadow: inset 0 0 0 1px var(--red-2); }
.as-card[data-cat="Latte"]        { --tint: var(--oat); }
.as-card[data-cat="Tea"]          { --tint: #6f8a52; }
.as-card[data-cat="Hydration"]    { --tint: var(--cold); }
.as-card[data-cat="Energy Drink"] { --tint: var(--red-2); }

.as-stage {
  position: relative;
  aspect-ratio: 4 / 4.6;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 36px 24px 28px;
  overflow: hidden;
}
.as-stage::before {                       /* soft glow behind the can, like the machine photo */
  content: ""; position: absolute; inset: 14% 12% 6%;
  background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--tint) 40%, transparent), transparent 70%);
  filter: blur(34px); opacity: .55;
  transition: opacity .6s ease;
}
.as-card:hover .as-stage::before { opacity: .95; }
.as-stage img, .as-stage svg.ph {
  position: relative; z-index: 1;
  height: 100%; width: auto; max-width: 100%;
  object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 22px 26px rgba(0,0,0,.55));
  transition: transform .9s cubic-bezier(.22,.61,.36,1);
}
.as-card:hover .as-stage img, .as-card:hover .as-stage svg.ph { transform: translateY(-6px); }
.as-code { position: absolute; top: 18px; left: 20px; color: var(--red-2); z-index: 2; }
.as-temps { position: absolute; top: 18px; right: 20px; z-index: 2; display: inline-flex; gap: 6px; }
.as-temps i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.as-temps .h { background: var(--hot);  box-shadow: 0 0 8px var(--hot); }
.as-temps .c { background: var(--cold); box-shadow: 0 0 8px var(--cold); }

.as-body { padding: 22px 24px 28px; border-top: 1px solid var(--rule-2); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.as-brand { color: var(--muted); }
.as-body h3 { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.05; letter-spacing: -0.02em; }
.as-body p {
  font-size: 14px; line-height: 1.55; color: var(--ivory-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.as-meta { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.as-meta .more { display: inline-flex; align-items: center; gap: 8px; color: var(--ivory); }
.as-meta .more svg { transition: transform .35s cubic-bezier(.22,.61,.36,1); }
.as-card:hover .as-meta .more svg { transform: translateX(5px); }

.as-empty { text-align: center; padding: 80px 0; color: var(--muted); font-size: 16px; }
.as-note { margin-top: 40px; color: var(--muted-2); text-align: center; line-height: 1.8; }

/* placeholder can (until a photo is supplied) */
svg.ph .ph-body { fill: url(#phGrad); stroke: rgba(237,230,214,.16); }
svg.ph .ph-cap  { fill: #1a1512; stroke: rgba(237,230,214,.12); }
svg.ph .ph-label { fill: var(--tint); opacity: .85; }
svg.ph text { font-family: var(--f-mono); letter-spacing: .16em; fill: var(--ivory); }

/* ─── CTA ─────────────────────────────────────────────────── */
.as-cta { position: relative; overflow: hidden; background: var(--bg); border-top: 1px solid var(--rule); padding: 160px 0; }
.as-cta .cta-title { margin: 36px 0 28px; }
.as-cta-inner { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; text-align: center; }
.as-cta-links { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; align-items: center; }
.as-cta .submit-btn { margin-top: 0; }
.as-ghost { display: inline-flex; align-items: center; gap: 12px; color: var(--ivory-2); padding: 14px 4px; border-bottom: 1px solid var(--rule); transition: color .3s, border-color .3s; }
.as-ghost:hover { color: var(--ivory); border-color: var(--red-2); }
.as-ghost svg { transition: transform .35s; }
.as-ghost:hover svg { transform: translateX(-5px); }
@media (max-width: 760px) { .as-cta { padding: 110px 0; } }

/* ─── Detail dialog ───────────────────────────────────────── */
.as-dialog {
  --tint: var(--tobacco);
  margin: auto;
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--bg-2);
  color: var(--ivory);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0;
  box-shadow: 0 40px 120px rgba(0,0,0,.7);
}
.as-dialog[open] { animation: fadeUp .45s cubic-bezier(.22,.61,.36,1); }
.as-dialog::backdrop { background: rgba(8,6,5,.78); backdrop-filter: blur(6px); }
.as-dialog[data-cat="Latte"]        { --tint: var(--oat); }
.as-dialog[data-cat="Tea"]          { --tint: #6f8a52; }
.as-dialog[data-cat="Hydration"]    { --tint: var(--cold); }
.as-dialog[data-cat="Energy Drink"] { --tint: var(--red-2); }
.as-close { position: absolute; top: 18px; right: 22px; z-index: 3; color: var(--muted); padding: 6px 4px; transition: color .25s; }
.as-close:hover { color: var(--ivory); }
.as-d-grid { display: grid; grid-template-columns: .85fr 1.15fr; }
.as-d-stage {
  position: relative; background: var(--bg-3);
  border-right: 1px solid var(--rule);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 56px 40px 48px; min-height: 480px; overflow: hidden;
}
.as-d-stage::before {
  content: ""; position: absolute; inset: 12% 10% 6%;
  background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--tint) 45%, transparent), transparent 70%);
  filter: blur(40px); opacity: .7;
}
.as-d-stage img, .as-d-stage svg.ph { position: relative; z-index: 1; max-height: 420px; width: auto; max-width: 100%; filter: drop-shadow(0 28px 32px rgba(0,0,0,.6)); }
.as-d-copy { padding: 56px 48px 48px; }
.as-d-eyebrow { color: var(--red-2); margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.as-d-copy h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(36px, 4vw, 56px); line-height: 1; letter-spacing: -0.03em; margin-bottom: 18px; }
.as-d-tag { font-size: 16px; line-height: 1.55; color: var(--ivory-2); max-width: 50ch; }
.as-d-spec { margin-top: 28px; }
.as-d-spec li { grid-template-columns: 1fr auto; padding: 13px 0; gap: 16px; }
.as-d-spec li:first-child { border-top: 1px solid var(--rule); }
.as-d-spec .v { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.as-d-spec .u { font-family: var(--f-display); font-size: 20px; letter-spacing: -0.01em; color: var(--ivory); text-align: right; }
.as-d-h { margin: 32px 0 10px; color: var(--muted); font-weight: 400; }
.as-d-text { font-size: 14px; line-height: 1.65; color: var(--ivory-2); }
.as-d-foot { margin-top: 28px; color: var(--muted-2); line-height: 1.7; text-transform: none; letter-spacing: .06em; }
.as-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.as-tag { padding: 3px 9px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ivory-2); }
@media (max-width: 760px) {
  .as-d-grid { grid-template-columns: 1fr; }
  .as-d-stage { min-height: 300px; padding: 48px 24px 32px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .as-d-stage img, .as-d-stage svg.ph { max-height: 260px; }
  .as-d-copy { padding: 32px 24px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .as-card, .as-dialog[open] { animation: none; }
}
