/* ============================================================
   The Found Original — receipt aesthetic
   ============================================================ */

@font-face {
  font-family: "Merchant Copy";
  src: url("../assets/fonts/MerchantCopy.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-text: #101010;
  --color-blue: #0000ff;
  --color-bg: #f8f8f8;
  --color-muted: #a39da0;

  --font: "Merchant Copy", "Courier New", ui-monospace, monospace;

  /* Merchant Copy runs small; sizes tuned to match the mockups */
  --fs-title: 60px;
  --fs-status: 40px;
  --fs-body: 22px;
  --fs-small: 20px;

  --col: 400px;            /* central content column */
  --card-w: 316px;
  --card-h: 450px;
  --gutter: 16px;

  --grid-max: 1312px;      /* 4 * 316 + 3 * 16 */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
a:hover { color: var(--color-blue); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ---------- layout ---------- */

.page {
  min-height: 100vh;
  padding: 56px 24px 40px;
}

.col {
  width: var(--col);
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

/* ---------- masthead ---------- */

.masthead { text-align: center; }
.masthead .logo {
  display: block;
  width: 97px;
  height: 40px;
  margin: 0 auto 22px;
}
.masthead .logo img { width: 100%; height: 100%; }

.title {
  font-size: var(--fs-title);
  line-height: 1;
  margin: 0 0 14px;
  font-weight: normal;
  letter-spacing: 0.5px;
}
.tagline {
  font-size: var(--fs-body);
  line-height: 1.1;
  margin: 0;
  max-width: 400px;
  margin-inline: auto;
}

/* ---------- receipt key/value rows ---------- */

.rows { margin: 44px auto 0; width: var(--col); max-width: 100%; text-align: left; }
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  line-height: 1.15;
  padding: 1px 0;
}
.row .k { white-space: nowrap; }
.row .v { text-align: right; }
.row .v.wrap { white-space: normal; }
.muted { color: var(--color-muted); }
.blue { color: var(--color-blue); }

/* asterisk-decorated value, e.g. **Open  */
.deco::before { content: "**"; }
.deco1::before { content: "*"; }

.divider {
  text-align: center;
  letter-spacing: 4px;
  margin: 28px 0;
  user-select: none;
}
.divider-lg { margin: 60px 0; font-size: 28px; }

/* ---------- collection ---------- */

.section-head {
  text-align: center;
  font-size: var(--fs-status);
  margin: 56px 0 24px;
  font-weight: normal;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--grid-max);
  margin: 0 auto 20px;
  color: var(--color-muted);
}
.filter { display: inline-flex; gap: 8px; align-items: baseline; }
.filter select {
  font: inherit;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
}
.filter .brace::before { content: "{"; }
.filter .brace::after { content: "}"; }
.filter select:hover { color: var(--color-blue); }

.grid {
  display: grid;
  grid-template-columns: repeat(4, var(--card-w));
  gap: 40px var(--gutter);
  justify-content: center;
  max-width: var(--grid-max);
  margin: 0 auto;
}

.card { text-align: left; text-decoration: none; display: block; }
.card:hover { color: inherit; }
.thumb-wrap {
  position: relative;
  width: var(--card-w);
  max-width: 100%;
  margin-bottom: 12px;
}
.card .thumb {
  width: var(--card-w);
  height: var(--card-h);
  max-width: 100%;
  object-fit: cover;
  background: #ececec;
  display: block;
}
/* hover: blue tint + centered white **Details** */
.card-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 255, 0.8);
  color: #fff;
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.card:hover .card-hover { opacity: 1; }
.card .name { line-height: 1.1; }
.card .price { color: var(--color-blue); margin-top: 2px; }
.card:hover .name { color: var(--color-blue); }

.loadmore-wrap { text-align: center; margin: 56px 0 0; }
.loadmore { font-size: var(--fs-status); }

/* ---------- footer ---------- */

.footer {
  width: var(--col);
  max-width: 100%;
  margin: 40px auto 0;
  font-size: var(--fs-small);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer .strike { text-decoration: line-through; }
.footer .copyright { text-align: center; margin-top: 28px; }

/* ---------- side panels ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 16, 16, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 40;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 400px;
  max-width: 100%;
  background: var(--color-bg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--color-text);
}
.panel.open { transform: translateX(0); }
.panel-head {
  display: flex;
  justify-content: flex-end;
  padding: 20px 24px;
}
.panel-close-x {
  width: 20px; height: 20px;
  line-height: 1;
  font-size: 22px;
}
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 24px;
}
.panel-title { font-size: var(--fs-status); margin: 0 0 24px; font-weight: normal; }
.panel-foot { padding: 20px 24px 32px; }
.panel-close-lg { font-size: var(--fs-status); }

.review { padding: 18px 0; border-top: 1px solid var(--color-muted); }
.review .stars { color: var(--color-text); letter-spacing: 2px; }
.review .rprod { color: var(--color-muted); }
.review .rname { color: var(--color-muted); margin-top: 6px; }

/* ---------- product page ---------- */

/* item-name title (60px) sits above the list; 16px gap to the list.
   Constrained to the 400px column so long titles wrap over several lines. */
.product-title {
  width: var(--col);
  max-width: 100%;
  margin: 32px auto 16px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.product-header { margin-top: 0; }
.product-header .row { padding: 2px 0; }

.gallery { margin: 12px 0 8px; }
.gallery-stage {
  position: relative;
  height: 570px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}
.gallery-track {
  display: flex;
  align-items: center;
  gap: 24px;
  transition: transform 0.35s ease;
  will-change: transform;
}
.gallery-img {
  height: 570px;
  width: auto;
  object-fit: contain;
  flex: 0 0 auto;
  position: relative;
}
.gallery-img.active { cursor: zoom-in; }

.gallery-nav {
  display: flex;
  justify-content: space-between;
  width: var(--col);
  max-width: 100%;
  margin: 8px auto 0;
}
.gallery-nav button { width: 20px; height: 20px; }
.gallery-nav img { width: 20px; height: 20px; }

/* description sits 16px below the gallery arrows, within the 400px column */
.product-desc {
  width: var(--col);
  max-width: 100%;
  margin: 16px auto 0;
  text-align: left;
}

/* hover-zoom */
.zoom-lens {
  position: fixed;
  width: 96px;
  height: 96px;
  border: 2px solid var(--color-blue);
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 60;
  display: none;
}

/* ---------- offer form ---------- */

.form { width: var(--col); max-width: 100%; margin: 0 auto; text-align: left; }
.field { margin-bottom: 22px; }
.field label { display: block; margin-bottom: 6px; }
.field input,
.field textarea {
  font: inherit;
  color: var(--color-text);
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-text);
  padding: 4px 0;
  border-radius: 0;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--color-muted); }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--color-blue); }
.field textarea { resize: none; overflow: hidden; }

/* Offer amount field with a trailing € to indicate currency */
.input-euro { position: relative; }
.input-euro input { padding-right: 18px; }
.input-euro .euro {
  position: absolute;
  right: 0;
  bottom: 5px;
  color: var(--color-text);
  pointer-events: none;
}

.submit-wrap { text-align: center; margin: 40px 0 8px; }
/* Send offer: same look as the panel "Close" link — underlined, blue on hover */
.submit {
  font-size: var(--fs-status);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.submit:hover { color: var(--color-blue); }
.form-note { text-align: center; color: var(--color-muted); }

/* Return to overview — 24px underlined link under the form note */
.return-wrap { text-align: center; margin-top: 16px; }
.return-link { font-size: 24px; }

/* ---------- receipt print-in animation ---------- */

.print-line {
  opacity: 0;
  transform: translateY(10px);
}
.print-line.printed {
  opacity: 1;
  transform: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
@media (prefers-reduced-motion: reduce) {
  .print-line { opacity: 1; transform: none; transition: none; }
}

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

@media (max-width: 1360px) {
  .grid { grid-template-columns: repeat(3, var(--card-w)); }
}
@media (max-width: 1040px) {
  .grid { grid-template-columns: repeat(2, var(--card-w)); }
}
@media (max-width: 720px) {
  :root { --fs-title: 44px; --fs-status: 30px; }
  .page { padding: 40px 18px 32px; }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
    --card-w: 100%;
  }
  .thumb-wrap { width: 100%; }
  .card .thumb { width: 100%; height: auto; aspect-ratio: 316 / 450; }
  .card-hover { font-size: 22px; }
  .filters { color: var(--color-muted); gap: 6px 16px; }
  .footer-row { flex-direction: column; gap: 4px; }
  .panel { width: 100%; }
  .gallery-img, .gallery-stage { height: 60vh; }
}
