/* ============================================================
   AGED YTA IMPRESSIONS — theme-aged.css  v3
   Load LAST in master.njk.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Martian+Mono:wght@400;600;700&display=swap');

:root {
  --ya-ink:       #0E1013;
  --ya-slab:      #16181D;
  --ya-slab-lift: #1C1F26;
  --ya-rule:      #262A31;
  --ya-rule-soft: #1E2229;
  --ya-bone:      #E8E6E1;
  --ya-dim:       #8A8F98;
  --ya-faint:     #5C616B;
  --ya-flare:     #FF4B2B;
  --ya-live:      #7FD1A4;
  --ya-low:       #E0B341;
  --ya-gone:      #6B7078;
  --ya-sans: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --ya-mono: 'Martian Mono', ui-monospace, 'SF Mono', monospace;
}

/* ---------- Section ---------- */

.ya-section {
  background: var(--ya-ink);
  padding: clamp(40px, 5vw, 64px) 0;
  font-family: var(--ya-sans);
  color: var(--ya-bone);
}

.ya-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.ya-cat {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 16px;
}

.ya-cat + .ya-grid { margin-bottom: 40px; }

.ya-cat__name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
}

.ya-cat__rule { flex: 1; height: 1px; background: var(--ya-rule); }

.ya-cat__count {
  font-family: var(--ya-mono);
  font-size: 10px;
  color: var(--ya-faint);
  white-space: nowrap;
}

/* ---------- Grid ---------- */

.ya-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

/* ---------- Card ---------- */

.ya-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 16px 16px 14px 20px;
  background: var(--ya-slab);
  border: 1px solid var(--ya-rule-soft);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: background 150ms ease, border-color 150ms ease;
}

.ya-card:hover { background: var(--ya-slab-lift); border-color: var(--ya-rule); }
.ya-card:focus-visible { outline: 2px solid var(--ya-flare); outline-offset: 2px; }

/* Left spine carries stock state. Edge chrome, stays out of the content. */
.ya-card::before {
  content: '';
  position: absolute;
  inset: 14px auto 14px 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
}
.ya-card[data-stock="in"]::before  { background: var(--ya-live); }
.ya-card[data-stock="low"]::before { background: var(--ya-low); }
.ya-card[data-stock="out"]::before {
  background: repeating-linear-gradient(to bottom, var(--ya-gone) 0 3px, transparent 3px 7px);
}
.ya-card[data-stock="out"] { opacity: 0.7; }
.ya-card[data-stock="out"]:hover { opacity: 0.9; }

/* ---------- Top: badge + title, one line ---------- */

.ya-card__top { display: flex; align-items: center; gap: 9px; min-width: 0; }

.ya-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--ya-rule);
  border-radius: 4px;
  background: #101216;
  font-family: var(--ya-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--ya-dim);
}

.ya-card__title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
  color: var(--ya-bone);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Description ---------- */

.ya-card__desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ya-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Status ---------- */

.ya-status {
  font-family: var(--ya-mono);
  font-size: 10px;
  margin: 0;
  white-space: nowrap;
}

.ya-card[data-stock="in"]  .ya-status { color: var(--ya-live); }
.ya-card[data-stock="low"] .ya-status { color: var(--ya-low); }
.ya-card[data-stock="out"] .ya-status { color: var(--ya-gone); }

/* ---------- Foot ---------- */

.ya-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--ya-rule-soft);
}

.ya-tag {
  font-family: var(--ya-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ya-faint);
  border: 1px solid var(--ya-rule);
  border-radius: 3px;
  padding: 3px 6px;
}

.ya-price { display: flex; align-items: baseline; gap: 7px; margin-left: auto; }

.ya-price__was {
  font-family: var(--ya-mono);
  font-size: 10px;
  color: var(--ya-faint);
  text-decoration: line-through;
}

.ya-price__now {
  font-family: var(--ya-mono);
  font-weight: 600;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ya-bone);
}

/* ---------- Empty state ---------- */

.ya-empty {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--ya-rule);
  border-radius: 8px;
  color: var(--ya-dim);
  font-size: 13px;
}

/* ---------- Responsive / a11y ---------- */

@media (max-width: 520px) {
  .ya-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ya-card { transition: none; }
}

/* ============================================================
   PRODUCT PAGE
   ============================================================ */

.ya-pdp {
  background: var(--ya-ink);
  color: var(--ya-bone);
  font-family: var(--ya-sans);
  padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 7vw, 88px);
}

/* ---------- Head ---------- */

.ya-pdp__head {
  max-width: 640px;
  margin: 0 0 clamp(28px, 4vw, 44px);
}

.ya-pdp__titlerow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ya-badge--lg {
  min-width: 46px;
  height: 28px;
  font-size: 11px;
  border-radius: 6px;
}

.ya-pdp__title {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ya-tag--link {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 12px;
}

.ya-tag--link:hover { color: var(--ya-dim); border-color: var(--ya-dim); }

.ya-pdp__blurb {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ya-dim);
}

/* ---------- Grid ---------- */

.ya-pdp__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.ya-pdp__main { display: flex; flex-direction: column; gap: 12px; }
.ya-pdp__side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 84px; }

/* ---------- Panels ---------- */

.ya-panel,
.ya-buy,
.ya-specs {
  background: var(--ya-slab);
  border: 1px solid var(--ya-rule-soft);
  border-radius: 8px;
  padding: clamp(16px, 2vw, 22px);
}

.ya-panel__label {
  margin: 0 0 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ya-faint);
}

/* ---------- Prose (renders the rich-text description) ---------- */

.ya-prose { font-size: 14px; line-height: 1.65; color: var(--ya-dim); }
.ya-prose > :first-child { margin-top: 0; }
.ya-prose > :last-child { margin-bottom: 0; }
.ya-prose p { margin: 0 0 12px; }
.ya-prose strong { color: var(--ya-bone); font-weight: 600; }
.ya-prose a { color: var(--ya-flare); }
.ya-prose ul, .ya-prose ol { margin: 0 0 12px; padding-left: 18px; }
.ya-prose li { margin-bottom: 6px; }
.ya-prose li::marker { color: var(--ya-faint); }
.ya-prose h1, .ya-prose h2, .ya-prose h3 {
  color: var(--ya-bone);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 18px 0 8px;
}

/* ---------- Buy box ---------- */

.ya-buy__price { margin-bottom: 6px; }

.ya-buy__now {
  font-family: var(--ya-mono);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ya-bone);
}

.ya-status--live { color: var(--ya-live); }
.ya-status--gone { color: var(--ya-gone); }
.ya-buy .ya-status { margin: 0 0 16px; }

/* Base theme renders the quantity input and buttons inside .ya-buy.
   Give them room without overriding their behaviour. */
.ya-buy form,
.ya-buy > div:not(.ya-buy__price) { margin-top: 0; }
.ya-buy .btn { border-radius: 6px; font-size: 13px; font-weight: 600; }

/* ---------- Specs ---------- */

.ya-specs__list { margin: 0; }

.ya-spec {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ya-rule-soft);
}

.ya-spec:last-child { border-bottom: 0; padding-bottom: 0; }
.ya-spec:first-child { padding-top: 0; }

.ya-spec dt {
  font-family: var(--ya-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ya-faint);
  white-space: nowrap;
  font-weight: 400;
}

.ya-spec dd {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ya-bone);
  text-align: right;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .ya-pdp__grid { grid-template-columns: 1fr; }
  .ya-pdp__side { position: static; order: -1; }
}

/* ---------- PDP: what-you-get list ---------- */

.ya-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ya-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ya-bone);
}

.ya-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--ya-live);
}

.ya-prose--fine {
  font-size: 12px;
  color: var(--ya-faint);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ya-rule-soft);
}

/* ---------- Ownership line ---------- */

.ya-owner {
  border-top: 1px solid var(--ya-rule-soft);
  background: var(--ya-ink);
  padding: 14px 0 18px;
  text-align: center;
  font-family: var(--ya-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #3F444C;
  transition: color 200ms ease;
}

.ya-owner:hover { color: var(--ya-dim); }

/* ============================================================
   PRODUCTS PAGE
   ============================================================ */

.ya-shop {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
  align-items: start;
}

.ya-shop__main { min-width: 0; }

/* ---------- Filter panel ---------- */

.ya-filters {
  background: var(--ya-slab);
  border: 1px solid var(--ya-rule-soft);
  border-radius: 8px;
  padding: 18px;
  position: sticky;
  top: 84px;
}

.ya-field { margin-bottom: 18px; }
.ya-field:last-child { margin-bottom: 0; }

.ya-field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ya-faint);
}

.ya-catlist { display: flex; flex-direction: column; gap: 2px; }

.ya-catlink {
  display: block;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 12.5px;
  color: var(--ya-dim);
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.ya-catlink:hover { background: var(--ya-slab-lift); color: var(--ya-bone); }

.ya-catlink.is-active {
  background: var(--ya-bone);
  color: var(--ya-ink);
  font-weight: 600;
}

.ya-input {
  width: 100%;
  padding: 8px 10px;
  background: #101216;
  border: 1px solid var(--ya-rule);
  border-radius: 5px;
  color: var(--ya-bone);
  font-family: var(--ya-sans);
  font-size: 13px;
}

.ya-input::placeholder { color: var(--ya-faint); }

.ya-input:focus {
  outline: none;
  border-color: var(--ya-dim);
}

/* Kill the number spinners, they look broken at this size */
.ya-input[type="number"]::-webkit-outer-spin-button,
.ya-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ya-input[type="number"] { -moz-appearance: textfield; }

.ya-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.ya-field--actions { display: flex; flex-direction: column; gap: 8px; }

.ya-btn {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ya-bone);
  border-radius: 6px;
  background: var(--ya-bone);
  color: var(--ya-ink);
  font-family: var(--ya-sans);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: filter 140ms ease;
}

.ya-btn:hover { background: #fff; border-color: #fff; color: var(--ya-ink); }

.ya-btn--ghost {
  background: transparent;
  border-color: var(--ya-rule);
  color: var(--ya-dim);
}

.ya-btn--ghost:hover { background: var(--ya-slab-lift); color: var(--ya-bone); }

.ya-filterbtn {
  width: 100%;
  margin-bottom: 16px;
  padding: 10px;
  background: var(--ya-slab);
  border: 1px solid var(--ya-rule);
  border-radius: 6px;
  color: var(--ya-bone);
  font-family: var(--ya-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ya-pagination { margin-top: 24px; }

/* ---------- Modal shell ---------- */

.modal-content {
  background: var(--ya-slab);
  border: 1px solid var(--ya-rule);
  color: var(--ya-bone);
}

.modal-header { border-bottom-color: var(--ya-rule-soft); }
.modal-title { font-family: var(--ya-sans); font-size: 15px; font-weight: 600; }

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .ya-shop { grid-template-columns: 1fr; }
  .ya-filters { position: static; }
}

/* ============================================================
   BASE THEME OVERRIDES
   Toning down the accent and compacting the footer. These target
   the base theme's own markup, so !important is needed to beat
   pro.css specificity.
   ============================================================ */

/* ---------- Buttons: neutral primary, accent reserved ---------- */

#app .btn-primary {
  background-color: var(--ya-bone) !important;
  border-color: var(--ya-bone) !important;
  color: var(--ya-ink) !important;
}

#app .btn-primary:hover,
#app .btn-primary:focus {
  background-color: #fff !important;
  border-color: #fff !important;
  color: var(--ya-ink) !important;
}

#app .btn-outline-primary {
  border-color: var(--ya-rule) !important;
  color: var(--ya-dim) !important;
  background-color: transparent !important;
}

#app .btn-outline-primary:hover,
#app .btn-outline-primary:focus {
  background-color: var(--ya-slab-lift) !important;
  border-color: var(--ya-dim) !important;
  color: var(--ya-bone) !important;
}

/* Stock pill on the base product page reads as an alert in orange */
#app .stock-indicator {
  border-color: var(--ya-rule) !important;
  color: var(--ya-live) !important;
}

/* ---------- Navbar ---------- */

#app .navbar .btn,
#app header .btn {
  border-color: var(--ya-rule) !important;
}

/* ---------- Footer: compact ---------- */

#app footer.footer {
  background: var(--ya-slab) !important;
  border-top: 1px solid var(--ya-rule-soft);
}

/* This is the one that matters. The base theme had py-5 (3rem) here. */
#app footer .ya-footer-row {
  padding-top: 26px !important;
  padding-bottom: 22px !important;
}

#app footer h5 {
  font-family: var(--ya-sans) !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--ya-faint) !important;
  margin: 0 0 8px !important;
}

#app footer .ya-footer-brand {
  font-family: var(--ya-sans) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  color: var(--ya-bone) !important;
}

#app footer .nav-link {
  font-size: 12px !important;
  line-height: 1.9 !important;
  color: var(--ya-dim) !important;
  padding: 0 !important;
}

#app footer .nav-link:hover { color: var(--ya-bone) !important; }
#app footer .logo { margin-bottom: 0 !important; }

/* ---------- Footer sits at the bottom on short pages ---------- */

html, body { height: 100%; }

#app.flex-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* First child is the header + page content wrapper. Let it absorb the slack
   so the footer and ownership line get pushed down instead of floating mid-page. */
#app.flex-wrapper > div:first-child { flex: 1 0 auto; }

#app.flex-wrapper > footer,
#app.flex-wrapper > .ya-owner { flex: none; }

/* ---------- Cart: drop the product thumbnail ---------- */
/* Every product uses the same shop logo, so the thumbnail adds nothing
   and just widens the row. Confirmed class from cart-page.njk. Hidden in
   CSS so the base cart component stays untouched. */

#app .cart-image-container { display: none !important; }

/* Reclaim the padding the image column was holding */
#app .cart-item-bg > .flex-grow-1 > .min-w-0:not(.cart-image-container) {
  padding-left: 14px;
}

/* ============================================================
   HERO
   ============================================================ */

.ya-hero {
  overflow-x: hidden;
  background: var(--ya-ink);
  color: var(--ya-bone);
  font-family: var(--ya-sans);
  padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 4vw, 48px);
  text-align: center;
}

/* ---------- Trust strip ---------- */

.ya-strip {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: clamp(22px, 3vw, 32px);
  padding: 7px 4px;
  border: 1px solid var(--ya-rule);
  border-radius: 6px;
  background: var(--ya-slab);
}

.ya-strip__item {
  position: relative;
  padding: 0 14px;
  font-family: var(--ya-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--ya-dim);
  white-space: nowrap;
}

.ya-strip__item + .ya-strip__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 11px;
  background: var(--ya-rule);
}

.ya-strip__item--live { color: var(--ya-bone); }

.ya-strip__item--live::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-radius: 1px;
  background: var(--ya-live);
  vertical-align: middle;
}

/* ---------- Headline ---------- */

/* Hero breaks out of the standard container so the headline can run wide */
.ya-hero .ya-container { max-width: 1720px; }

.ya-hero__title {
  max-width: none;
  margin: 0 auto 26px;
  /* 6vw fills the width on normal screens; the 100px cap stops it
     overflowing the container on very wide monitors, which is what
     made it look off-centre. Retune both if you change copy length. */
  font-size: clamp(30px, 6vw, 100px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: var(--ya-bone);
  white-space: nowrap;
}

/* Below this the single line stops fitting, so let it wrap */
@media (max-width: 680px) {
  .ya-hero__title {
    white-space: normal;
    font-size: clamp(32px, 9.5vw, 56px);
    line-height: 1;
    letter-spacing: -0.035em;
    text-wrap: balance;
  }
}

.ya-hero__sub {
  max-width: 56ch;
  margin: 0 auto;
  font-size: clamp(14px, 1.55vw, 17px);
  line-height: 1.6;
  color: var(--ya-dim);
  text-wrap: pretty;
}

/* ---------- Search ---------- */

.ya-search {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: clamp(20px, 2.6vw, 28px) auto 0;
}

.ya-search svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--ya-faint);
  pointer-events: none;
}

.ya-search input {
  width: 100%;
  padding: 13px 16px 13px 42px;
  background: var(--ya-slab);
  border: 1px solid var(--ya-rule);
  border-radius: 8px;
  color: var(--ya-bone);
  font-family: var(--ya-sans);
  font-size: 14px;
  transition: border-color 150ms ease, background 150ms ease;
}

.ya-search input::placeholder { color: var(--ya-faint); }

.ya-search input:focus {
  outline: none;
  border-color: var(--ya-dim);
  background: var(--ya-slab-lift);
}

/* Kill the browser's own search decorations */
.ya-search input::-webkit-search-decoration,
.ya-search input::-webkit-search-results-button { -webkit-appearance: none; }
.ya-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  cursor: pointer;
  background: var(--ya-faint);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 13.4l-4.9 4.9a1 1 0 0 1-1.4-1.4l4.9-4.9-4.9-4.9a1 1 0 0 1 1.4-1.4l4.9 4.9 4.9-4.9a1 1 0 0 1 1.4 1.4L13.4 12l4.9 4.9a1 1 0 0 1-1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ya-search-empty { margin-top: 4px; }

/* The search filter toggles [hidden]; beat the display rules on grids and cards */
.ya-grid[hidden],
.ya-card[hidden],
.ya-cat[hidden] { display: none !important; }

/* Hero already carries bottom spacing, so the grid below tightens up */
.ya-hero + .ya-section { padding-top: clamp(24px, 3vw, 40px); }

@media (max-width: 520px) {
  .ya-strip { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 12px; }
  .ya-strip__item { padding: 0; text-align: center; }
  .ya-strip__item + .ya-strip__item::before { display: none; }
}