/* Tindeq shop index — "Everything we make". Page layout only; the nav, footer,
   atoms and reset live in base.css.
   Ported from Claude Design project 43e41638 · "All Products - Index Page.dc.html"
   (board 1A desktop 1440, board 1B mobile 390).

   THE GRID (the whole idea of the page, preserved exactly):
   repeat(auto-fit, minmax(232px, 1fr)) with a 16px gap. The row is fluid, not
   five fixed columns — the track re-wraps itself at 5 / 4 / 3 / 2 across as the
   viewport narrows, with no breakpoint doing the work. The design declares
   exactly one real breakpoint, at 620px, where the floor drops to 150px so a
   phone holds two cards across instead of collapsing to one; that is the only
   place this file departs from the 1279 / 1023 / 767 set the other pages use,
   and it is deliberate.

   A NOTE ON SPECIFICITY: the shop archive carries `woocommerce` on <body>, so
   WooCommerce's own `.woocommerce a.button` (0,2,1) matches our add-to-cart
   link and out-specifies `.tq .tq-btn` (0,2,0) from base.css. Every button
   rule below therefore carries one extra class plus the element — enough to
   win without a single !important. */

/* ------------------------------------------------------------------- head */

.tq .tq-shop__head {
  padding-top: 56px;
  padding-bottom: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 64px;
}
.tq .tq-shop__kicker { margin-bottom: 12px; font-size: 11px; }
.tq .tq-shop__title {
  font-family: var(--tq-serif); font-weight: 400;
  font-size: 46px; line-height: 1; letter-spacing: -.025em;
  color: var(--tq-ink);
}
.tq .tq-shop__lede {
  max-width: 34ch;
  margin-bottom: 6px;
  font-size: 15px; line-height: 1.55;
  color: var(--tq-ink-2);
  text-align: right;
  text-wrap: pretty;
}

/* WooCommerce notices. This template is a full document, so
   woocommerce_before_shop_loop never runs and the queue is flushed by hand in
   the template — a no-JS add-to-cart lands back here and has to say so. */
.tq .tq-shop__notices .woocommerce-notices-wrapper:empty { display: none; }
.tq .tq-shop__notices .woocommerce-message,
.tq .tq-shop__notices .woocommerce-info,
.tq .tq-shop__notices .woocommerce-error {
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--tq-hairline);
  border-left: 2px solid var(--tq-ink);
  border-radius: var(--tq-radius);
  background: var(--tq-snow-2);
  color: var(--tq-ink-2);
  font-size: 14px;
  list-style: none;
}
.tq .tq-shop__notices .woocommerce-error { border-left-color: var(--tq-outdoor); }
.tq .tq-shop__notices .woocommerce-message::before,
.tq .tq-shop__notices .woocommerce-info::before,
.tq .tq-shop__notices .woocommerce-error::before { display: none; }
.tq .tq-shop__notices a.button {
  float: right;
  margin-left: 16px;
  font-size: 13px; font-weight: 500;
  color: var(--tq-ink);
  border-bottom: 1px solid var(--tq-ink);
}

/* ------------------------------------------------------------------- grid */

.tq .tq-shop__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 16px;
  padding-bottom: 112px;
}

.tq .tq-shop__card {
  position: relative; /* containing block for the stretched name link */
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px;
  border: 1px solid var(--tq-hairline);
  border-radius: var(--tq-radius);
  background: var(--tq-snow-2);
  transition: border-color 160ms ease;
}
/* The design's style-hover. :focus-within gives the same affordance to a
   keyboard, which the canvas had no way to express. */
.tq .tq-shop__card:hover,
.tq .tq-shop__card:focus-within { border-color: var(--tq-ink); }

/* The image well. Renders are shot on a light ground and multiplied onto snow,
   which is why the well is --tq-snow inside a --tq-snow-2 card and why the
   image needs no cut-out. */
.tq .tq-shop__shot {
  height: 182px;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  border-radius: 6px;
  background: var(--tq-snow);
}
.tq .tq-shop__shot img {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.tq .tq-shop__meta { display: flex; flex-direction: column; gap: 6px; padding: 0 2px; }

.tq .tq-shop__no {
  font-family: var(--tq-mono); font-size: 10px; font-weight: 400; line-height: 1.4;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--tq-mute);
}

/* The design sets product names in Instrument Serif at 22px. The design system
   forbids the serif below 30px (it loses its contrast and starts reading as a
   UI font), and PORTING.md makes that binding — so the names are Archivo 500 at
   the size that holds the same weight in the card. Flagged for Joakim: one
   line here and one in cart.css switch it back. */
.tq .tq-shop__name {
  font-size: 19px; font-weight: 500; line-height: 1.15; letter-spacing: -.01em;
  color: var(--tq-ink);
}
.tq .tq-shop__card:hover .tq-shop__name a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* The whole card opens the product (Joakim, 2026-10-23). The name link stays
   the card's one link; its ::after is stretched over the card, so a tap on the
   image, price, stock or whitespace lands on it. The add-to-cart button sits
   above it (position + z-index on a.tq-btn below) and keeps adding to cart.
   The focus ring moves from the name to the stretched box, i.e. the card. */
.tq .tq-shop__name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--tq-radius); }
.tq .tq-shop__name a:focus-visible { outline: none; }
.tq .tq-shop__name a:focus-visible::after { outline: 2px solid var(--tq-ink); outline-offset: 3px; }

.tq .tq-shop__spec { font-size: 13px; line-height: 1.45; color: var(--tq-ink-2); }

/* Price / stock / button, pinned to the bottom of the card so a two-line name
   in one card never lifts its neighbour's button out of line. */
.tq .tq-shop__buy {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 11px;
  padding: 12px 2px 2px;
  border-top: 1px solid var(--tq-hairline);
}
.tq .tq-shop__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tq .tq-shop__price { font-size: 18px; font-weight: 500; line-height: 1; color: var(--tq-ink); }
.tq .tq-shop__price del { font-size: .82em; }
/* An amount never breaks ("2 / 099 kr"); a stock badge never breaks ("PRE- / ORDER"). */
.tq .tq-shop__price .woocommerce-Price-amount,
.tq .tq-shop__card .tq-stock { white-space: nowrap; }

/* Above the stretched name link: the button, and the "View cart" link Woo may
   append after an AJAX add. */
.tq .tq-shop__card a.added_to_cart { position: relative; z-index: 1; }

/* Re-assert the pill over `.woocommerce a.button` — see the note at the top. */
.tq .tq-shop__card a.tq-btn {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 44px; padding: 0 20px;
  border: 0; border-radius: var(--tq-radius-pill);
  background: var(--tq-onyx); color: var(--tq-paper);
  font-family: var(--tq-sans); font-size: 13px; font-weight: 500; line-height: 1;
  text-align: center; text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}
.tq .tq-shop__card a.tq-btn:hover { background: var(--tq-onyx); opacity: .88; }
/* The two states tq.js sets off WooCommerce's added_to_cart event — the
   design's DCLogic "Added ✓" for two seconds, then "In cart". */
.tq .tq-shop__card a.tq-btn.is-added {
  background: transparent; color: var(--tq-ink);
  border: 1px solid var(--tq-ink);
}
.tq .tq-shop__card a.tq-btn.is-in-cart {
  background: transparent; color: var(--tq-ink-2);
  border: 1px solid var(--tq-hairline);
}
.tq .tq-shop__card a.tq-btn.loading { opacity: .6; cursor: progress; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1279px) {
  .tq .tq-shop__head  { padding-top: 48px; padding-bottom: 26px; gap: 48px; }
  .tq .tq-shop__title { font-size: 42px; }
  .tq .tq-shop__grid  { padding-bottom: 96px; }
}

@media (max-width: 1023px) {
  .tq .tq-shop__head  { padding-top: 40px; padding-bottom: 24px; gap: 32px; }
  .tq .tq-shop__title { font-size: 38px; }
  .tq .tq-shop__lede  { font-size: 14px; }
  .tq .tq-shop__shot  { height: 164px; }
}

/* 390 board — the head stacks and the lede stops being right-aligned; the grid
   is still doing its own arithmetic at this width. */
@media (max-width: 767px) {
  .tq .tq-shop__head {
    flex-direction: column; align-items: stretch;
    gap: 10px;
    padding-top: 26px;
    padding-bottom: 20px;
  }
  .tq .tq-shop__kicker { margin-bottom: 10px; }
  .tq .tq-shop__title  { font-size: 32px; line-height: 1.02; letter-spacing: -.02em; }
  .tq .tq-shop__lede   { max-width: none; margin-bottom: 0; text-align: left; font-size: 14px; }
  .tq .tq-shop__grid   { padding-bottom: 72px; }
}

/* The design's one real breakpoint: below ~620px the card floor drops to 150px
   so the phone holds two across rather than collapsing to a single column. */
@media (max-width: 619px) {
  .tq .tq-shop__grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
  }
  .tq .tq-shop__card { gap: 10px; padding: 10px; }
  .tq .tq-shop__shot { height: 120px; padding: 10px; }
  .tq .tq-shop__meta { gap: 5px; padding: 0; }
  .tq .tq-shop__no   { font-size: 9px; letter-spacing: .14em; }
  .tq .tq-shop__name { font-size: 17px; }
  .tq .tq-shop__spec { font-size: 12px; line-height: 1.4; }
  .tq .tq-shop__buy  { gap: 9px; padding: 10px 0 0; }

  /* At 150px a price and a stock dot will not sit side by side. */
  .tq .tq-shop__row   { flex-direction: column; align-items: flex-start; gap: 5px; }
  .tq .tq-shop__price { font-size: 17px; }
  .tq .tq-stock       { font-size: 9px; }

  /* "Legg i handlekurv" is wider than a 150px card's button at 20px padding:
     tighter padding, and a second line rather than overflowing the card. */
  .tq .tq-shop__card a.tq-btn {
    height: auto; min-height: 44px; padding: 6px 10px;
    line-height: 1.2; white-space: normal; text-wrap: balance;
  }

  /* Removed 2026-10-23 (feedback-b3b): the odd last card (the saw) spanning
     the row as a horizontal card. Its price and badge wrapped and the NO button
     overflowed the card, so it now stays a vertical card in the left column,
     like the lone last card in an odd row on desktop. PHP still adds
     .tq-shop__grid--odd; nothing styles it. Old rules: feedback-b3b backup. */
}

/* Design canvas 11 Nov 2026: one line under each product name saying what it
   does, in ink like the name. */
.tq .tq-shop__line {
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--tq-ink);
  text-wrap: balance;
}
@media (max-width: 619px) {
  .tq .tq-shop__line { font-size: 15px; }
}
