/* v4: the ECU file search (/shop/, its categories, ?s=…&post_type=product), over the search app's own sheet
   (plugin tdb-file-shop, assets/css/shop.css). The strip that says how a file is bought, the panel of other ways
   beside the results, the cards the files sit in, and Buy. Words: data/file-search.php; tests/test-v4-file-search.php. */

/* The hero, the site's own (Ionut, 26 Oct 2026: "un hero frumos elegant ... uniform peste tot"): the dark band of every
   v4 page, one column like /features/, the trail, the striped eyebrow, a display heading with what was searched lit in
   gold, the lead, then the search bar as its one action, and the proofs in mono under a rule. Shorter than a page's
   hero, so the solutions start sooner. Test: tests/test-file-search-hero.php. */
.fs-hero {
  isolation: isolate;
  padding-block: clamp(2.4rem, 5vw, 4.4rem) clamp(2.2rem, 4.4vw, 3.6rem);
}

.fs-hero::after {
  position: absolute;
  top: 0;
  right: -10%;
  bottom: 0;
  z-index: -1;
  width: min(1000px, 70%);
  background: var(--motif-ink);
  -webkit-mask: url("../../img/home/world-dots.webp") right center / contain no-repeat;
  mask: url("../../img/home/world-dots.webp") right center / contain no-repeat;
  content: "";
  pointer-events: none;
}

.fs-hero__in {
  display: block;
}

.fs-hero .crumbs {
  margin: 0 0 1.4rem;
}

.fs-hero__kick {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1.1rem;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fs-hero__kick::before {
  flex: none;
  width: 30px;
  height: 10px;
  border-radius: 2px;
  background: var(--stripes);
  content: "";
}

.fs-hero__h {
  max-width: 19ch;
  margin: 0;
  font-size: clamp(2.3rem, 1.2rem + 3.2vw, 4rem);
  font-weight: 880;
  font-stretch: 122%;
  line-height: .98;
  letter-spacing: -.02em;
}

/* What was searched, lit: a part number breaks anywhere rather than push the page sideways. */
.fs-hero__q {
  color: var(--accent-ink);
  overflow-wrap: anywhere;
}

.fs-hero .fs-hero__lede {
  max-width: 46rem;
  margin: 1.2rem 0 0;
}

.fs-hero .fs-q {
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
}

.fs-hero .fs-hint {
  margin-top: .7rem;
  color: var(--muted);
}

.fs-hero .fs-hero__alt {
  margin-top: 1rem;
}

.fs-hero .fs-formats {
  margin-top: .9rem;
  color: var(--muted);
}

.fs-hero .fs-formats b {
  color: var(--fg);
}

.fs-hero__proof {
  max-width: 820px;
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}

.fs-hero .fs-reader:not(:empty) {
  margin-top: 1rem;
}

/* The parts around the heading come in once (shop.js enter()); until then they wait unseen, never for whoever asked for
   less motion. The heading and its line are drawn at once: they are the page's largest paint (26 Oct 2026, 3.8 s on a
   phone while they waited). */
.fs-hero.is-pre .crumbs,
.fs-hero.is-pre .fs-hero__kick,
.fs-hero.is-pre .fs-q,
.fs-hero.is-pre .fs-hint,
.fs-hero.is-pre .fs-hero__alt,
.fs-hero.is-pre .fs-formats,
.fs-hero.is-pre .fs-hero__proof {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .fs-hero.is-pre * {
    opacity: 1;
  }
}

/* A phone keeps the words clear of the map. */
@media (max-width: 759px) {
  .fs-hero::after {
    display: none;
  }
}

/* How it works: one quiet strip between the search and the results. */
.fs-how {
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.fs-how__in {
  display: grid;
  gap: var(--sp-4);
}

.fs-how__h,
.fs-ways__h {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fs-how__h::before,
.fs-ways__h::before {
  flex: none;
  width: 30px;
  height: 10px;
  border-radius: 2px;
  background: var(--stripes);
  content: "";
}

.fs-how__steps {
  display: grid;
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.fs-how__step {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  min-width: 0;
}

.fs-how__n {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-weight: 700;
}

.fs-how__step h3 {
  margin: 0 0 var(--sp-1);
  color: var(--fg);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.3;
}

.fs-how__step p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
}

.fs-how__fix {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin: 0;
  color: var(--fg);
  font-size: .92rem;
  font-weight: 600;
}

.fs-how__fix::before {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--btn-bg);
  content: "";
  transform: translateY(-2px);
}

@media (min-width: 760px) {
  .fs-how__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-5);
  }
}

/* The results and, beside them, the other ways to the file; one column below 1100 px, the panel after the results. */
.fs-body__in {
  display: grid;
  gap: var(--sp-6);
  min-width: 0;
}

.fs-main {
  min-width: 0;
}

@media (min-width: 1100px) {
  .fs-body__in {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }

  .fs-body__in--wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The panel stays beside the results only where the window is taller than the panel and the bar above it
   (a 768 px laptop would never see its last card). */
@media (min-width: 1100px) and (min-height: 860px) {
  .fs-ways {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-7));
  }
}

.fs-ways {
  display: grid;
  gap: var(--sp-3);
  min-width: 0;
}

.fs-way {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.fs-way h3 {
  margin: 0;
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 760;
  line-height: 1.25;
}

.fs-way p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
}

.fs-way .fs-way__price {
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: .86rem;
  font-weight: 600;
}

.fs-way__go {
  justify-self: start;
  min-height: 44px;
  margin-top: var(--sp-1);
}

/* The card that leads, marked with the stripes: the membership for whoever has none, a custom file for a member
   (data/file-search.php sets which). */
.fs-way--lead {
  position: relative;
  overflow: hidden;
  border-color: var(--line-strong);
}

.fs-way--lead::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--stripes);
  content: "";
}

/* The membership at the top of the results, for whoever has none (Ionut, 26 Oct 2026: "pt aia fara login sa faci
   promote la membership"; tests/test-file-search-member-offer.php): the site's dark band in small, its striped eyebrow,
   what a member gets and the price, one gold button; the homepage's dotted map faint behind it. */
.fs-promo {
  position: relative;
  display: grid;
  gap: .35rem 2.4rem;
  margin: 0 0 var(--sp-5);
  padding: clamp(1.2rem, 2.6vw, 1.7rem) clamp(1.2rem, 3vw, 2rem);
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--band-dark-fill);
  color: var(--p-snow);
  isolation: isolate;
}

.fs-promo::after {
  position: absolute;
  top: 0;
  right: -6%;
  bottom: 0;
  z-index: -1;
  width: 60%;
  background: color-mix(in srgb, var(--p-accent) 10%, transparent);
  -webkit-mask: url("../../img/home/world-dots.webp") right center / contain no-repeat;
  mask: url("../../img/home/world-dots.webp") right center / contain no-repeat;
  content: "";
  pointer-events: none;
}

.fs-promo__kick {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0;
  color: var(--p-accent-hi);
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fs-promo__kick::before {
  flex: none;
  width: 30px;
  height: 10px;
  border-radius: 2px;
  background: var(--stripes);
  content: "";
}

.fs-promo__h {
  margin: .2rem 0 0;
  color: var(--p-snow);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem);
  font-weight: 840;
  font-stretch: 116%;
  line-height: 1.1;
}

.fs-promo__line {
  max-width: 56ch;
  margin: 0;
  color: var(--p-fog);
  line-height: 1.5;
}

.fs-promo__price {
  margin: .3rem 0 0;
  color: var(--p-snow);
  font-family: var(--font-mono);
  font-size: .9rem;
  font-weight: 600;
}

.fs-promo__go {
  justify-self: start;
  min-height: 44px;
  margin-top: .5rem;
}

@media (min-width: 900px) {
  .fs-promo {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .fs-promo__kick,
  .fs-promo__h,
  .fs-promo__line {
    grid-column: 1;
  }

  .fs-promo__price {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
    margin: 0;
    text-align: right;
  }

  .fs-promo__go {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    margin-top: 0;
  }
}

/* Every ECU card, for whoever has no membership: its solutions are in it. Above the car's name on a phone, at the
   card's top right from a tablet up. */
.fs-group__member {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: .45rem;
  min-height: 32px;
  padding: .2rem .7rem;
  border: 1px solid color-mix(in srgb, var(--p-accent) 45%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--p-accent) 9%, transparent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}

.fs-group__member::before {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--btn-bg);
  content: "";
}

.fs-group__member:hover {
  border-color: var(--p-accent);
  background: color-mix(in srgb, var(--p-accent) 16%, transparent);
}

/* The car's power beside its name, quieter. */
.fs-group__hp {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

@media (min-width: 760px) {
  .fs-group__head {
    position: relative;
  }

  .fs-group__member {
    position: absolute;
    top: var(--sp-4);
    right: var(--sp-4);
  }

  .fs-group__head:has(> .fs-group__member) .fs-group__title,
  .fs-group__head:has(> .fs-group__member) .fs-group__facts {
    padding-right: 15rem;
  }
}

/* The files: each original a card on the page, its rows priced and bought on the line. */
.fs-group {
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.fs-group__head {
  background: var(--bg);
}

.fs-row__price {
  font-size: 1.02rem;
}

.fs-row__buy {
  padding-inline: 1.1rem;
  font-size: .92rem;
}

.fs-row__go {
  padding-inline: .9rem;
  font-size: .9rem;
}

@media (max-width: 600px) {
  .fs-row__buy {
    padding-inline: .9rem;
  }
}
