/*
 * HighImpressions – clean black skin for the Canvas theme (algrow-style),
 * with only the hero headline in a small pixel/retro font.
 * This file survives theme updates. Colours come from the theme settings (--cl-* tokens).
 */
@import url('https://fonts.googleapis.com/css2?family=Doto:wght@700;900&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  --hi-pixel: 'Doto', 'Geist Mono', ui-monospace, monospace;
  --hi-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --hi-ok: 63, 185, 80;
  --hi-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html { scrollbar-color: #222 #050505; }
body { -webkit-font-smoothing: antialiased; }
::selection { background: rgba(255, 255, 255, 0.9); color: #050505; }
:focus-visible { outline: 1px solid rgb(var(--cl-t-primary)); outline-offset: 2px; }

/* ---------------------------------------------------------------- background: faint grid at the top only */
.pfx-pattern-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
}

/* ---------------------------------------------------------------- header */
.sa-header { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.sa-navbar {
  background: rgba(5, 5, 5, 0.8) !important;
  border-bottom: 1px solid var(--cl-border);
}
.sa-navbar-logo span { font-weight: 600; letter-spacing: -0.01em; }
.sa-navbar-logo img { border-radius: 0 !important; }
.sa-navbar-link {
  border-radius: 0 !important;
  font-family: var(--hi-mono);
  font-size: 13px !important;
  font-weight: 400 !important;
}
.sa-navbar-link:hover { background: transparent !important; }
.sa-navbar-cart { border-radius: 0 !important; }
.sa-navbar [\@click*='loginOrRedirect'] {
  border-radius: 0 !important;
  font-family: var(--hi-mono);
  font-size: 13px !important;
  font-weight: 400 !important;
}

.sa-announcement--neutral {
  background: #050505 !important;
  border-bottom: 1px solid var(--cl-border);
  font-family: var(--hi-mono);
  font-size: 11.5px;
  font-weight: 400;
  color: rgb(var(--cl-t-muted)) !important;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.sa-announcement--neutral .sa-announcement-item::after {
  content: '·';
  margin-left: 3rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ---------------------------------------------------------------- buttons */
.sa-btn {
  border-radius: 0 !important;
  font-family: var(--hi-mono);
  font-weight: 500;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease;
}
.sa-btn--primary.sa-btn--solid { box-shadow: none !important; }
.sa-btn--primary.sa-btn--solid:hover { opacity: 0.88; }
.sa-btn--secondary.sa-btn--outline { background: #0E0E0E !important; border-color: #1F1F1F !important; }
.sa-btn--secondary.sa-btn--outline:hover { border-color: #3a3a3a !important; }

/* ---------------------------------------------------------------- hero */
.hi-hero { position: relative; }
.hi-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}
.hi-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.25rem;
  border: 1px solid #1F1F1F;
  background: #0A0A0A;
}
.hi-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  font-family: var(--hi-mono);
  font-size: 12px;
  color: rgb(var(--cl-t-muted));
}
.hi-chip + .hi-chip { border-left: 1px solid #1F1F1F; }
.hi-chip--live { color: rgb(var(--cl-t-primary)); }
.hi-dot { width: 7px; height: 7px; background: rgb(var(--hi-ok)); }

/* the one retro element: pixel headline */
.hi-hero-title {
  max-width: 60rem;
  font-family: var(--hi-pixel);
  font-weight: 900;
  font-size: clamp(2rem, 5.6vw, 4.3rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  color: rgb(var(--cl-t-primary));
}
.hi-rotator {
  display: inline-grid;
  vertical-align: bottom;
  overflow: hidden;
  height: 1.2em;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
  text-align: left; /* words share one grid cell; keep them flush to the space before */
}
.hi-rotator-word {
  grid-area: 1 / 1;
  color: #55FF55; /* Minecraft green (§a) */
  text-shadow: 0.08em 0.08em 0 #153F15; /* Minecraft-style hard drop shadow */
  transform: translateY(105%);
  opacity: 0;
  transition: transform 600ms var(--hi-ease), opacity 600ms ease;
}
.hi-rotator-word[data-state='in'] { transform: none; opacity: 1; }
.hi-rotator-word[data-state='out'] { transform: translateY(-105%); opacity: 0; }

.hi-hero-subtitle {
  max-width: 36rem;
  margin-top: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgb(var(--cl-t-muted));
}
.hi-hero-actions { margin-top: 2rem; }

/* ---------------------------------------------------------------- section heads */
.hi-tiers { border-top: 1px solid var(--cl-border); }
.hi-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; margin-bottom: 1.25rem; }
.hi-section-title { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.hi-section-title::before { content: '◈'; font-size: 0.85em; color: rgb(var(--cl-t-muted)); }
.hi-section-sub { color: rgb(var(--cl-t-muted)); font-size: 0.875rem; }

/* ---------------------------------------------------------------- tier grid */
.hi-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); }

.hi-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 12.5rem;
  padding: 1.25rem;
  border: 1px solid #1A1A1A;
  border-radius: 0 !important;
  background: #0A0A0A;
  color: rgb(var(--cl-t-primary));
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.hi-tile::after { /* small arrow in the corner, like algrow */
  content: '↗';
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  font-size: 0.75rem;
  color: #3a3a3a;
  transition: color 160ms ease, transform 160ms ease;
}
.hi-tile:hover { border-color: #333; background: #0D0D0D; }
.hi-tile:hover::after { color: rgb(var(--cl-t-primary)); transform: translate(1px, -1px); }
.hi-tile--soldout .hi-tier { opacity: 0.7; }

.hi-tile-top { display: flex; align-items: baseline; gap: 0.55rem; padding-right: 1.25rem; }
.hi-tier-unit { font-family: var(--hi-mono); font-size: 0.8rem; color: rgb(var(--cl-t-muted)); }
.hi-tile-status { display: flex; margin-top: 0.75rem; }
.hi-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hi-tier {
  font-family: var(--hi-pixel);
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.hi-pill {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--hi-mono);
  font-size: 12px;
  white-space: nowrap;
}
.hi-pill-dot { width: 6px; height: 6px; background: currentColor; }
.hi-pill--in { color: rgb(var(--hi-ok)); }
.hi-pill--out { color: rgb(var(--cl-error)); }

.hi-tile-name { margin-top: 1.1rem; font-family: var(--hi-mono); font-weight: 600; font-size: 0.95rem; }
.hi-tile-desc {
  margin-top: 0.9rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgb(var(--cl-t-muted));
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hi-tile-bottom { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; padding-top: 1.25rem; }
.hi-tile-note {
  padding: 0.2rem 0.5rem;
  border: 1px solid #262626;
  font-family: var(--hi-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--cl-t-muted));
}
.hi-price { font-family: var(--hi-mono); font-size: 1rem; font-weight: 600; }
.hi-price-plus { opacity: 0.55; }

.hi-tile--restock { border-style: dashed; justify-content: flex-start; }
.hi-tile--restock::after { content: none; }
.hi-restock-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #262626;
  background: #0E0E0E;
  color: rgb(var(--cl-t-primary));
  font-size: 1rem;
}
.hi-tile--restock .hi-tile-name { margin-top: 1rem; }
.hi-restock-cta {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.45rem 0.85rem;
  border: 1px solid #262626;
  font-family: var(--hi-mono);
  font-size: 0.78rem;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.hi-tile--restock:hover .hi-restock-cta { background: rgb(var(--cl-t-primary)); border-color: rgb(var(--cl-t-primary)); color: #050505; }
.hi-empty { margin-top: 1rem; padding: 1.5rem; border: 1px dashed #262626; color: rgb(var(--cl-t-muted)); font-family: var(--hi-mono); }

/* ---------------------------------------------------------------- tier grid: filter + smooth motion */
.hi-filter { display: inline-flex; border: 1px solid #1F1F1F; background: #0A0A0A; }
.hi-filter[hidden] { display: none; }
.hi-filter-btn {
  padding: 0.4rem 0.85rem;
  font-family: var(--hi-mono);
  font-size: 12px;
  color: rgb(var(--cl-t-muted));
  transition: background-color 200ms ease, color 200ms ease;
}
.hi-filter-btn + .hi-filter-btn { border-left: 1px solid #1F1F1F; }
.hi-filter-btn:hover { color: rgb(var(--cl-t-primary)); }
.hi-filter-btn[aria-pressed='true'] { background: rgb(var(--cl-t-primary)); color: #050505; }
.hi-filter-btn span { opacity: 0.55; margin-left: 0.25rem; }
.hi-empty--filter[hidden] { display: none; }

/* thin light line that glides along the top edge on hover */
.hi-tile::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: transform 500ms var(--hi-ease), opacity 300ms ease;
  pointer-events: none;
}
.hi-tile:hover::before { transform: scaleX(1); opacity: 1; }
.hi-price { transition: transform 300ms var(--hi-ease); }
.hi-tile:hover .hi-price { transform: translateX(-3px); }

/* staggered fade-up when the grid scrolls into view, and when filtering (only with JS) */
.hi-js .hi-grid > .hi-tile { opacity: 0; transform: translateY(10px); transition: opacity 520ms ease, transform 520ms var(--hi-ease), border-color 160ms ease, background-color 160ms ease; transition-delay: var(--hi-d, 0ms), var(--hi-d, 0ms), 0ms, 0ms; }
.hi-js .hi-grid > .hi-tile.hi-in { opacity: 1; transform: none; }
.hi-grid > .hi-tile.hi-hide { display: none; }

/* ---------------------------------------------------------------- product page, cart, cards */
.sa-product-card, .sa-product-form, .sa-cart-panel { background-color: #0A0A0A; }
.sa-product-card-price, .sa-tpl-product .sa-product-form [class*='price'] { font-family: var(--hi-mono); }

/* ---------------------------------------------------------------- footer */
.sa-footer { background: #050505; border-top: 1px solid var(--cl-border); }
.sa-footer-link { font-family: var(--hi-mono); font-size: 13px !important; transition: color 150ms ease; }
.sa-footer-link[href$="#cookie-settings"] { display: none !important; } /* hide automatic "Cookie settings" link */

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  .hi-rotator-word, .hi-tile, .hi-tile::before { transition: none !important; }
  .hi-js .hi-grid > .hi-tile { opacity: 1; transform: none; }
}