/* ════════════════════════════════════════════════════════════
   BluCruise Design System — search-results.css
   Cruise search results page. Filter panel + results grid.
   Requires: variables.css, cards.css, layout.css, buttons.css
════════════════════════════════════════════════════════════ */

/* ── Page layout ─────────────────────────────────────────── */
.sr-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-4);
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4);
  align-items: start;
}

/* ── Results header ───────────────────────────────────────── */
.sr-header {
  background: var(--ink);
  padding: 80px var(--sp-4) var(--sp-6);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.sr-header__inner {
  max-width: 1280px;
  margin: 0 auto;
}

.sr-header__title {
  font-family: var(--font-s);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  color: var(--white);
  letter-spacing: -.035em;
  line-height: 1.04;
  margin-bottom: var(--sp-2);
}

.sr-header__title em {
  font-style: italic;
  color: var(--gold);
}

.sr-header__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.sr-header__count {
  font-size: 13px;
  /* Board readability rule: text on the dark hero is white or gold,
     never a reduced-opacity grey. Was rgba(255,255,255,.5). */
  color: rgba(255,255,255,.82);
}

.sr-header__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sr-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(196,154,42,.15);
  border: 1px solid rgba(196,154,42,.3);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
}

.sr-tag__remove {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
  opacity: .7;
  transition: opacity var(--trans);
}

.sr-tag__remove:hover { opacity: 1; }

/* ── Filter panel ─────────────────────────────────────────── */
.sr-filters {
  background: var(--white);
  border: 1px solid var(--br);
  border-radius: var(--rad-lg);
  padding: var(--sp-3);
  position: sticky;
  top: 80px;
}

.sr-filters__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tx3);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--br);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sr-filter-group {
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--br);
}

.sr-filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sr-filter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: var(--sp-1);
  display: block;
}

.sr-filter-select {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--br);
  border-radius: var(--rad);
  padding: 9px 12px;
  font-family: var(--font-n);
  font-size: 13px;
  color: var(--tx1);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23C4B9AC' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  transition: border-color var(--trans);
}

.sr-filter-select:focus {
  outline: none;
  border-color: var(--gold);
}

/* Duration pills */
.sr-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sr-pill {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--br);
  background: none;
  font-family: var(--font-n);
  font-size: 12px;
  font-weight: 500;
  color: var(--tx2);
  cursor: pointer;
  transition: all var(--trans);
}

.sr-pill:hover { border-color: var(--gold); color: var(--navy); }
.sr-pill.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

/* Reset link */
.sr-reset {
  font-size: 11.5px;
  color: var(--coral);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-n);
  transition: opacity var(--trans);
}
.sr-reset:hover { opacity: .7; }

/* ── Sort bar ─────────────────────────────────────────────── */
.sr-sort {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.sr-sort__count {
  font-size: 13px;
  color: var(--tx3);
  white-space: nowrap;
}

.sr-sort__options {
  display: flex;
  gap: 4px;
}

.sr-sort__btn {
  padding: 6px 12px;
  border-radius: var(--rad-sm);
  border: 1px solid var(--br);
  background: none;
  font-family: var(--font-n);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--tx3);
  cursor: pointer;
  transition: all var(--trans);
}

.sr-sort__btn:hover { border-color: var(--navy); color: var(--navy); }
.sr-sort__btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* ── Cruise result card (extended version) ────────────────── */
.sr-card {
  background: var(--white);
  border: 1px solid var(--br);
  border-radius: var(--rad-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
  margin-bottom: var(--sp-3);
  transition: transform var(--trans), box-shadow var(--trans);
}

.sr-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.sr-card__img {
  position: relative;
  min-height: 200px;
}

.sr-card__img .bc-img {
  height: 100%;
  border-radius: 0;
}

.sr-card__img img {
  transition: transform .5s ease, opacity .4s ease;
}

.sr-card:hover .sr-card__img img { transform: scale(1.04); }

.sr-card__line-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(7,16,28,.86);
  color: rgba(255,255,255,.85);
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--rad-sm);
  letter-spacing: .06em;
  text-transform: uppercase;
  z-index: 2;
}

.sr-card__night-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--gold);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--rad-sm);
  z-index: 2;
}

.sr-card__body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
}

.sr-card__top {
  flex: 1;
}

.sr-card__region {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 4px;
}

.sr-card__title {
  font-family: var(--font-s);
  font-size: 22px;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: -.01em;
  line-height: 1.15;
  margin-bottom: 5px;
}

.sr-card__route {
  font-size: 12px;
  color: var(--tx3);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: var(--sp-2);
}

.sr-card__route i { font-size: 11px; color: var(--coral); }

.sr-card__ports {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: var(--sp-2);
}

.sr-card__port-link {
  background: var(--cream);
  border: 1px solid var(--br);
  color: var(--navy);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: .04em;
  transition: all var(--trans);
  text-decoration: none;
}

.sr-card__port-link:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.sr-card__highlights {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--sp-2);
}

.sr-card__tag {
  font-size: 10.5px;
  color: var(--tx3);
  background: rgba(27,45,79,.05);
  padding: 2px 8px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sr-card__tag i { font-size: 11px; color: var(--gold); }

.sr-card__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--br);
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.sr-card__pricing {}

.sr-card__price-label {
  font-size: 9.5px;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}

.sr-card__price {
  font-family: var(--font-s);
  font-size: 28px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -.02em;
  line-height: 1;
}

.sr-card__price-note {
  font-size: 10px;
  color: var(--tx3);
  margin-top: 2px;
}

.sr-card__rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: var(--sp-1);
}

.sr-card__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: flex-end;
}

/* ── Empty state ─────────────────────────────────────────── */
.sr-empty {
  text-align: center;
  padding: var(--sp-12) var(--sp-4);
  color: var(--tx3);
}

.sr-empty i {
  font-size: 48px;
  color: var(--br);
  margin-bottom: var(--sp-3);
  display: block;
}

.sr-empty h3 {
  font-family: var(--font-s);
  font-size: 24px;
  color: var(--navy);
  margin-bottom: var(--sp-2);
}

/* ── Mobile filter drawer ─────────────────────────────────── */
.sr-filter-toggle {
  display: none;
}

.sr-filter-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
}

.sr-filter-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(6,15,28,.6);
}

.sr-filter-drawer__panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--rad-lg) var(--rad-lg) 0 0;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-3) var(--sp-6);
  -webkit-overflow-scrolling: touch;
}

.sr-filter-drawer.open { display: block; }

.sr-filter-drawer__handle {
  width: 40px;
  height: 4px;
  background: var(--br);
  border-radius: 2px;
  margin: 0 auto var(--sp-3);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sr-layout { grid-template-columns: 240px 1fr; }
}

@media (max-width: 768px) {
  .sr-layout { grid-template-columns: 1fr; }
  .sr-filters { display: none; }
  .sr-filter-toggle { display: flex; }
  .sr-card {
    grid-template-columns: 1fr;
  }
  .sr-card__img { min-height: 180px; height: 180px; }
  .sr-sort { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .sr-header { padding-top: 72px; }
  .sr-card__actions { width: 100%; }
  .sr-card__actions .bc-btn { flex: 1; justify-content: center; }
}

/* ── Shared page hero (BluCruise Design System) ──────────────
   One treatment for every main page: photographic background at
   42% over the ink gradient, top-down scrim for legibility, and
   the header nested inside as its first child (homepage pattern).
   Set the image per page with .bc-hero--<page>. */
.bc-hero-img{ position:absolute; inset:0; z-index:0; overflow:hidden; }
.bc-hero-img img{ width:100%; height:100%; object-fit:cover; opacity:.42; }
.bc-hero-img::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(180deg,rgba(6,15,28,.62) 0%,rgba(6,15,28,.34) 40%,rgba(6,15,28,.90) 100%);
}

/* The header now contains the nav and a photographic background,
   so it becomes a positioned column. */
.sr-header{ position:relative; overflow:hidden; }
.sr-header > *:not(.bc-hero-img):not(.bc-nav){ position:relative; z-index:2; }
/* The header floats over the hero rather than joining its flow, so
   the hero keeps its own padding and the nav keeps the homepage
   32px/52px inset. The hero's existing top padding already reserves
   the space the header occupies. */
.sr-header .bc-nav--in-hero{
  position:absolute; top:0; left:0; right:0; width:100%; z-index:30;
}
/* Reserve the header's height so hero copy never sits under it.
   Header = 32px top padding + ~52px content on desktop, 24px + ~46px
   on mobile. Measured, not estimated. */
.sr-header{ padding-top:132px !important; }
@media (max-width:960px){ .sr-header{ padding-top:96px !important; } }
