/* Catalogue pages: home, catalogue, search, facets, voucher, merchant, map, poster.
   Extends static/base.css (style guide components). Token values only: no colour, font,
   shadow or radius outside the tokens. Breakpoints 400, 760 and 1024 px. */

.page-head { margin-bottom: var(--s5); }
.page-head .lead { max-width: 70ch; margin-bottom: 0; }
.section-head { margin-bottom: var(--s4); }
.section-head h2 { margin-bottom: 0; }

/* --- breadcrumbs (style guide .crumbs) ------------------------------------------------ */

.crumbs-nav { margin-bottom: var(--s4); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs .ico-crumb { width: 14px; height: 14px; }

/* --- pager (style guide .pager) ------------------------------------------------------- */

.pager { margin: var(--s4) 0 var(--s6); }
.pager .pager__pos { min-width: 0; padding: 0 var(--s3); color: var(--text-muted); font-weight: 500; }
.pager a:visited { color: var(--navy); }

/* --- empty states (style guide .empty, mascot above the heading) ---------------------- */

.empty { margin-bottom: var(--s6); }
/* base.css gives .mascot width:auto, which lets the SVG's large intrinsic size win over the
   include's width attribute; hold each pose at the size the include sets. */
.empty .mascot--sitting { width: 150px; height: auto; }
.empty .mascot--tracking { width: 150px; height: auto; }
.empty p { max-width: 56ch; margin-inline: auto; }
.empty p:last-child { margin-bottom: 0; }

/* --- home: image hero (style guide .hero, VB-13) --------------------------------------- */

.home-hero { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--s4); }
.home-hero .copy h1 { margin-bottom: 0; }
.home-hero .search .input { flex: 1 1 12rem; min-width: 0; }
.hero-more { color: var(--text-muted); margin-bottom: var(--s7); }
@media (min-width: 761px) and (max-width: 1024px) {
  /* Keeps the heading, the sentence and the search field inside the 514:1200 image. */
  .home-hero .copy h1 { font-size: clamp(28px, 3.6vw, 40px); }
  .home-hero .copy p { margin-top: var(--s2); }
  .home-hero .search { margin-top: var(--s3); }
}
@media (max-width: 760px) {
  .home-hero .copy { padding-bottom: var(--s5); }
}
@media (max-width: 400px) {
  .home-hero .search { flex-wrap: wrap; }
  .home-hero .search .btn { width: 100%; }
}

/* --- home: axes with brand tiles (VB-14) ----------------------------------------------- */

.axes { margin-bottom: var(--s7); }
.axes-grid { margin-top: var(--s4); }
.axis { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s3); margin-bottom: 0; }
.axis .tile { border: 0; border-radius: var(--r-md); }
.axis .tile .cap { margin: 0; }
.axis > :not(.tile) { padding-inline: var(--s2); }
.axis__list { list-style: none; padding: 0; margin: 0; }
.axis__list li { margin-bottom: var(--s1); }
.axis__list a { text-decoration: none; }
.axis__list a:hover { text-decoration: underline; }
.axis > p { margin-bottom: var(--s2); }

.featured { margin-bottom: var(--s7); }

.city-tiles { margin-bottom: var(--s7); }
.city-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s3); }
.city-tile { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--text); }
.city-tile:visited { color: var(--text); }
.city-tile:hover { border-color: var(--navy); color: var(--text); }
.city-tile__name { font-weight: 600; }
.city-tile__count { font-size: 13px; color: var(--text-muted); }

.how { margin-bottom: var(--s7); }
.steps { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s4); }
.step { margin-bottom: 0; }
.step__no { display: inline-flex; width: var(--s6); height: var(--s6); align-items: center; justify-content: center; border-radius: var(--r-full); background: var(--navy); color: var(--paper); font-family: var(--f-display); font-weight: 700; margin-bottom: var(--s2); }
.step h3 { font-size: 16px; }
.step p { margin: 0; }

/* --- voucher cards (style guide .vcard) ------------------------------------------------- */

.vt-card { display: flex; }
.vcard { width: 100%; color: inherit; text-decoration: none; }
.vcard:visited, .vcard:hover { color: inherit; }
.vcard .who { margin: 0; line-height: 1.25; }
.vcard .where { margin: 0; }
.vcard__rating { color: var(--navy); }

/* --- facet nav, chips, search forms ------------------------------------------------------ */

.facet-nav { margin-bottom: var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.facet-nav__group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.facet-nav__label { font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-inline-end: var(--s1); }
/* Link variant of the style guide .tag. */
.chip { display: inline-flex; align-items: center; gap: var(--s1); font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-full); background: var(--cool-pale); color: var(--navy); text-decoration: none; }
.chip:visited { color: var(--navy); }
.chip:hover { color: var(--accent-dark); text-decoration: underline; }
.chip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.search-inline { margin-top: var(--s2); }
.search-form { margin-top: var(--s4); }
.search input[type="search"] { flex: 1 1 12rem; min-width: 0; border-radius: var(--r-full); padding-left: 18px; }
.related-facets { margin: var(--s6) 0; }
.ranking-note { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); max-width: 70ch; }

/* --- stars (inline SVG, brand decision) --------------------------------------------------- */

.stars { display: inline-flex; align-items: center; gap: 1px; color: var(--navy); }
.stars__on, .stars__off { display: inline-flex; gap: 1px; }
.stars__on { color: var(--navy); }
.stars__off { color: var(--text-muted); }

/* --- voucher page --------------------------------------------------------------------------- */

.voucher { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: var(--s6); align-items: start; }
@media (max-width: 760px) { .voucher { grid-template-columns: 1fr; } }
.voucher__brand { font-size: 18px; font-weight: 500; color: var(--text-muted); margin-bottom: var(--s2); }
.voucher__facts { color: var(--text-muted); }
/* A merchant photograph is a 4:3 cover crop: never stretched, letterboxed or filtered (VB-15). */
.voucher__media { aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2); margin-bottom: var(--s5); }
.voucher__media img { width: 100%; height: 100%; object-fit: cover; }
.voucher__description { margin-bottom: var(--s5); }
.attr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2) var(--s4); margin: 0 0 var(--s5); }
.attr-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s2) var(--s3); }
.attr-row dt { font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.attr-row dd { margin: 0; font-weight: 600; }
.policy-list { margin: 0; }
.policy-list > div { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.policy-list > div:last-child { border-bottom: 0; }
.policy-list dt { font-weight: 600; color: var(--navy); }
.policy-list dd { margin: 0; }
.legal-position { font-weight: 500; margin-bottom: var(--s1); }
.voucher__side { position: sticky; top: var(--s4); }
@media (max-width: 760px) { .voucher__side { position: static; } }
.buy-box .price-large { margin-bottom: var(--s3); }
.buy-box__state { margin-bottom: var(--s2); }
.buy-form { margin: var(--s3) 0; }
.merchant-box__name { margin-bottom: var(--s1); }
.metrics { list-style: none; padding: 0; margin: 0 0 var(--s3); font-size: 14px; }

/* --- merchant page ---------------------------------------------------------------------- */

.merchant-head { display: flex; gap: var(--s5); align-items: flex-start; margin-bottom: var(--s5); }
.merchant-head h1 { margin-bottom: var(--s2); }
.merchant-head .lead { margin-bottom: var(--s3); }
/* Logos are not photographs: square, whole, never cropped (VB-15). */
.merchant-logo { width: 96px; height: 96px; border-radius: var(--r-lg); object-fit: contain; flex: 0 0 auto; background: var(--surface); border: 1px solid var(--line); }
.merchant-logo--ph { display: flex; align-items: center; justify-content: center; font-family: var(--f-display); font-weight: 700; font-size: clamp(24px, 3vw, 34px); color: var(--paper); background: var(--navy); border-color: var(--navy); }
.merchant-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: var(--s6); align-items: start; }
@media (max-width: 760px) { .merchant-grid { grid-template-columns: 1fr; } .merchant-head { flex-direction: column; } }
.merchant-about, .merchant-listings { margin-bottom: var(--s6); }
.merchant-address { font-style: normal; line-height: 1.7; }

/* --- map (Leaflet, VB-22) ------------------------------------------------------------------ */

.map { height: min(70vh, 640px); border-radius: var(--r-lg); border: 1px solid var(--line); margin-bottom: var(--s3); background: var(--paper-2); }
.map-listings, .map-cities { margin-top: var(--s6); }
.map-pin { color: var(--navy); background: transparent; border: 0; }
.map-pin svg { display: block; width: 24px; height: 32px; }
.map-pin__body { fill: currentColor; }
.map-pin__dot { fill: var(--paper); }
.map .leaflet-container, .map.leaflet-container { font-family: var(--f-text); }
.map .leaflet-popup-content-wrapper { border-radius: var(--r-md); box-shadow: var(--shadow-pop); background: var(--surface); color: var(--text); }
.map .leaflet-popup-tip { background: var(--surface); box-shadow: none; }
.map .leaflet-popup-content { font-family: var(--f-text); font-size: 14px; line-height: 1.55; margin: var(--s3) var(--s4); }
.map .leaflet-popup-content p { margin: 0 0 var(--s1); }
.map .map-popup__title { font-family: var(--f-display); font-weight: 700; color: var(--navy); }
.map .map-popup__merchant { color: var(--text-muted); }
.map .map-popup__price { font-family: var(--f-display); font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.map .leaflet-popup-content a { color: var(--accent-text); }
.map .leaflet-control-attribution { font-family: var(--f-text); }
.city-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: var(--s5); }
.city-list li { margin-bottom: var(--s2); break-inside: avoid; }
@media (max-width: 760px) { .city-list { columns: 1; } }

/* --- poster (A4) ------------------------------------------------------------------------ */

.poster { max-width: 720px; margin: 0 auto; text-align: center; padding: var(--s7) var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.poster__logo { height: 36px; width: auto; margin: 0 auto var(--s5); }
.poster__kicker { font-size: 20px; font-weight: 600; color: var(--text-muted); margin-bottom: var(--s2); }
.poster__title { color: var(--navy); margin-bottom: var(--s6); }
.poster__qr { display: flex; justify-content: center; margin-bottom: var(--s5); }
.poster__qr svg { width: 320px; height: 320px; }
.poster__url { font-family: var(--f-display); font-size: 22px; font-weight: 700; color: var(--navy); word-break: break-all; margin-bottom: var(--s4); }
.poster__note { color: var(--text-muted); }
@media print {
  @page { size: A4 portrait; margin: 15mm; }
  .poster { border: 0; max-width: none; padding: 20mm 0; }
  .poster__logo { width: 28mm; height: auto; margin-bottom: 8mm; }
  .poster__qr svg { width: 110mm; height: 110mm; }
  .poster__title { font-size: 34pt; }
  .poster__url { font-size: 20pt; }
}
