/* Cottage page. Areas reorder by breakpoint:
   mobile/tablet: back bar, gallery, title, booking, content
   desktop:       back bar, title, gallery, then content beside a sticky booking box */

.cottage-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "back"
    "gallery"
    "title"
    "booking"
    "content";
  padding-bottom: var(--space-2);
}
.cottage-page__back { grid-area: back; }
.cottage-page__gallery { grid-area: gallery; }
.cottage-page__title { grid-area: title; }
.cottage-page__booking { grid-area: booking; }
.cottage-page__content {
  grid-area: content;
  display: flex; flex-direction: column; gap: var(--space-7);
  margin-top: var(--space-7);
}

@media (min-width: 768px) {
  .cottage-page__content { gap: 40px; margin-top: 40px; }
}

@media (min-width: 1024px) {
  .cottage-page {
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas:
      "back back"
      "title title"
      "gallery gallery"
      "content booking";
    column-gap: var(--space-8);
  }
  .cottage-page__content { gap: var(--space-8); }
  .cottage-page__booking {
    align-self: start;
    position: sticky;
    top: var(--space-6);
    margin-top: 40px;
  }
}

/* ---- Back bar / breadcrumb ------------------------------------------------- */
.back-bar {
  min-height: 52px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.back-bar__crumbs { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.back-bar__back {
  min-height: 44px;
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-sm); font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.breadcrumb { display: none; }
.back-bar__actions { display: flex; gap: var(--space-2); }
.back-bar__actions .btn span { display: none; }
.back-bar__actions .btn { width: 44px; padding: 0; border-color: transparent; background: transparent; }

@media (min-width: 768px) {
  .back-bar { min-height: 56px; }
  .back-bar__back { font-size: 0.9375rem; }
  .back-bar__actions .btn span { display: inline; }
  .back-bar__actions .btn { width: auto; padding: 0 var(--space-4); border-color: var(--color-border-strong); background: var(--color-surface); }
}

@media (min-width: 1024px) {
  .breadcrumb {
    display: flex; align-items: center; gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-ink-subtle);
  }
  .breadcrumb::before { content: "·"; }
  .breadcrumb li + li::before { content: "›"; margin-right: var(--space-2); }
  .breadcrumb a { color: var(--color-ink-subtle); }
  .breadcrumb [aria-current] { color: var(--color-ink); }
}

/* ---- Gallery --------------------------------------------------------------- */
.gallery { position: relative; margin-inline: calc(-1 * var(--gutter)); }
.gallery__grid { height: 260px; display: grid; gap: var(--space-2); overflow: hidden; }
.gallery__item { width: 100%; height: 100%; }
.gallery__item--1, .gallery__item--2, .gallery__item--3, .gallery__item--4 { display: none; }
.gallery__item--2, .gallery__item--4 { background: var(--color-placeholder-alt); }
.gallery__actions {
  position: absolute; right: var(--space-3); bottom: var(--space-3);
  display: flex; gap: var(--space-2);
}

@media (min-width: 768px) {
  .gallery { margin-inline: 0; }
  .gallery__grid {
    height: 340px;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    border-radius: 18px;
  }
  .gallery__item--0 { grid-row: 1 / 3; }
  .gallery__item--1, .gallery__item--2 { display: flex; }
  img.gallery__item--1, img.gallery__item--2 { display: block; }
}

@media (min-width: 1024px) {
  .gallery__grid { height: 460px; grid-template-columns: 2fr 1fr 1fr; border-radius: var(--radius-xl); }
  .gallery__item--3, .gallery__item--4 { display: flex; }
  img.gallery__item--3, img.gallery__item--4 { display: block; }
  .gallery__actions { right: var(--space-4); bottom: var(--space-4); }
}

/* ---- Title and key facts --------------------------------------------------- */
.cottage-title { display: flex; flex-direction: column; gap: 10px; padding-top: var(--space-5); }
.cottage-title__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-h1);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.cottage-title__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
}
.cottage-title__place { display: inline-flex; align-items: center; gap: 6px; }
.cottage-title__meta a { font-weight: 600; }
.cottage-title__meta .rating a { color: var(--color-ink-muted); font-weight: 400; }

.key-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.key-facts li {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-1);
  padding: var(--space-3) var(--space-1);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  font-size: var(--text-xs); font-weight: 600;
  text-align: center;
}

@media (min-width: 768px) {
  .cottage-title { padding-top: var(--space-6); }
  .cottage-title__meta { font-size: 0.9375rem; }
  .key-facts { gap: 10px; }
  .key-facts li { flex-direction: row; gap: var(--space-2); padding: 14px; font-size: 0.9375rem; text-align: left; border-radius: 14px; }
}

@media (min-width: 1024px) {
  .cottage-title { padding: var(--space-2) 0 var(--space-6); }
  .key-facts { max-width: 760px; gap: var(--space-3); }
  .key-facts li { padding: var(--space-4); font-size: var(--text-md); }
}

/* ---- Booking box ----------------------------------------------------------- */
.booking { margin-top: var(--space-6); }
.booking__form {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: 18px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 18px;
}
.booking__price { font-size: var(--text-sm); font-weight: 400; color: var(--color-ink-muted); }
.booking__price-amount {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--color-ink);
}
.booking__dates, .booking__party { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.booking__no-pets {
  height: var(--control-height);
  display: flex; align-items: center;
  color: var(--color-ink-subtle);
}
.booking__note { font-size: var(--text-xs); color: var(--color-ink-subtle); text-align: center; }
.booking__extras {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
}
.booking__extras li { display: flex; align-items: center; gap: var(--space-2); }
.booking__extras:not(:has(li)) { display: none; }

/* Tablet: dates and party side by side in one wide box. */
@media (min-width: 768px) and (max-width: 1023px) {
  .booking__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
    padding: var(--space-5);
  }
  .booking__price, .booking__form > .btn, .booking__note, .booking__extras { grid-column: 1 / -1; }
  .booking__price-amount { font-size: 28px; }
  .booking__note { font-size: 0.8125rem; }
}

@media (min-width: 1024px) {
  .booking { margin-top: 0; }
  .booking__form {
    gap: 14px;
    padding: var(--space-6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 32px rgb(22 37 28 / 0.10);
  }
  .booking__price-amount { font-size: 30px; }
  .booking__note { font-size: 0.8125rem; }
}

/* ---- Content sections ------------------------------------------------------ */
.cottage-section { display: flex; flex-direction: column; gap: var(--space-3); }
.cottage-section__header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.cottage-section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cottage-section .prose { color: var(--color-ink-muted); max-width: 680px; }

.read-more > summary { display: inline-flex; }
.read-more[open] > summary { margin-bottom: var(--space-3); }

@media (min-width: 768px) {
  .cottage-section { gap: var(--space-4); }
}

/* Highlights */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  font-size: var(--text-sm);
}
.feature-list li { display: flex; align-items: center; gap: 10px; }
.feature-list--more { margin-top: var(--space-1); }

@media (min-width: 768px) {
  .feature-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; font-size: 0.9375rem; }
}
@media (min-width: 1024px) {
  .feature-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
}

/* Rooms */
.rooms { display: grid; gap: 10px; }
.rooms__floor { padding: var(--space-4); box-shadow: none; }
.rooms__floor .eyebrow { margin-bottom: 6px; }
.rooms__floor ul { margin: 0; padding: 0; list-style: none; }

@media (min-width: 768px) {
  .rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rooms__floor { padding: 18px; font-size: 0.9375rem; }
}
@media (min-width: 1024px) {
  .rooms { gap: var(--space-3); }
  .rooms__floor { padding: var(--space-5); font-size: var(--text-md); }
}

/* Location */
.location { display: grid; gap: var(--space-3); }
.location__map {
  position: relative;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(115deg, var(--color-map-sea) 0 38%, var(--color-map-land) 38%);
}
.location__pin {
  position: absolute; left: 50%; top: 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-dark);
  box-shadow: 0 4px 10px rgb(22 37 28 / 0.25);
}
.distance-list { padding: var(--space-1) var(--space-4); box-shadow: none; }
.distance-list__row {
  display: flex; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.distance-list__row:last-child { border-bottom: 0; }
.distance-list dd { font-weight: 600; }

@media (min-width: 768px) {
  .location { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .location__map { height: 230px; }
  .distance-list { padding-inline: 18px; font-size: 0.9375rem; }
}
@media (min-width: 1024px) {
  .location { grid-template-columns: 1.5fr 1fr; gap: var(--space-4); }
  .location__map { height: 280px; }
  .distance-list { padding-inline: var(--space-5); }
  .distance-list__row { padding: 14px 0; }
}

/* Reviews */
.review-summary { display: flex; flex-direction: column; gap: 14px; padding: 18px; box-shadow: none; }
.review-summary__score { display: flex; align-items: center; gap: 14px; }
.review-summary__score > span:last-child { display: flex; flex-direction: column; }
.review-summary__word { font-size: var(--text-md); }
.review-summary__count { font-size: 0.8125rem; color: var(--color-ink-subtle); }
.score-badge {
  width: 60px; height: 60px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--color-primary);
  color: var(--color-on-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}

.score-bars { display: flex; flex-direction: column; gap: 10px; font-size: var(--text-sm); }
.score-bars__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.score-bars dd { display: flex; align-items: center; gap: 10px; }
.score-bars dd strong { width: 32px; text-align: right; }
.score-bars__track {
  width: 90px; height: 6px;
  border-radius: 3px;
  background: var(--color-border);
  overflow: hidden;
}
.score-bars__fill { display: block; height: 100%; background: var(--color-primary); }

.review-list { display: grid; gap: 10px; }
.review { display: flex; flex-direction: column; gap: var(--space-2); padding: 18px; box-shadow: none; }
.review__head { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 0.8125rem; }
.review__head time { color: var(--color-ink-subtle); }
.review__body { color: var(--color-ink-muted); }
.review__reply {
  padding: 10px var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  font-size: 0.8125rem;
  color: var(--color-ink-muted);
}
.review__reply strong { color: var(--color-ink); }

@media (min-width: 768px) {
  .review-summary { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: var(--space-6); padding: var(--space-5); }
  .score-badge { width: 64px; height: 64px; font-size: 22px; }
  .score-bars { font-size: 0.9375rem; }
  .score-bars__track { width: 120px; }
  .review-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review { font-size: 0.9375rem; }
  .review__head { font-size: var(--text-sm); }
  .review__reply { font-size: var(--text-sm); }
}
@media (min-width: 1024px) {
  .review-summary { grid-template-columns: 220px 1fr; gap: var(--space-7); padding: var(--space-6); }
  .score-badge { width: 72px; height: 72px; font-size: 24px; border-radius: var(--radius-lg); }
  .review-summary__word { font-size: 18px; }
  .score-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-7); }
  .score-bars__track { width: 100px; }
  .review-list { gap: var(--space-3); }
  .review { padding: var(--space-5); font-size: var(--text-md); }
}

/* House rules */
.rules { padding: var(--space-1) var(--space-4); box-shadow: none; font-size: var(--text-sm); }
.rules__row {
  display: flex; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.rules__row:last-child { border-bottom: 0; }
.rules dt { color: var(--color-ink-muted); }
.rules dd { font-weight: 600; text-align: right; }

@media (min-width: 768px) {
  .rules {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-7);
    padding: 6px var(--space-5);
    font-size: 0.9375rem;
  }
  .rules__row:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}
@media (min-width: 1024px) {
  .rules { column-gap: 40px; padding: var(--space-2) var(--space-6); }
  .rules__row { padding: 14px 0; }
}

/* ---- You might also like --------------------------------------------------- */
.similar-row {
  display: flex; gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.similar-row .mini-card { flex: 0 0 240px; scroll-snap-align: start; }

@media (min-width: 768px) {
  .similar-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); overflow: visible; }
  .similar-row .mini-card__photo { height: 160px; }
}
@media (min-width: 1024px) {
  .similar-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
  .similar-row .mini-card__photo { height: 170px; }
}
