/* ==========================================================================
   Page-specific styling for the single-property detail template.
   Shared rules (reset, variables, nav shell, buttons, hero skeleton,
   section headers, etc.) live in ../style.css. Reuses the same
   filter/amenity component styles as the main Suffolk Lets listing
   page (../suffolk-lets.css) where relevant.
   ========================================================================== */

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--soft-gray);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--primary);
}

/* ==========================================================================
   Photo gallery - hero photo + thumbnail grid
   ========================================================================== */
.property-gallery {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

.property-gallery-hero {
  position: relative;
  min-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
}

.property-gallery-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.property-gallery-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 1rem;
}

.property-gallery-thumb {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}

.property-gallery-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.property-gallery-hero:hover img,
.property-gallery-thumb:hover img {
  transform: scale(1.04);
}

.property-gallery-more-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: rgba(20, 18, 16, 0.55);
  color: var(--white);
  font-family: "Outfit", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
  transition: background 0.3s ease;
}

.property-gallery-more-btn:hover {
  background: rgba(20, 18, 16, 0.7);
}

.property-unavailable-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: var(--charcoal);
  color: var(--white);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  z-index: 5;
}

.property-gallery-unavailable .property-gallery-hero img,
.property-gallery-unavailable .property-gallery-thumb img {
  filter: grayscale(0.5) brightness(0.75);
}

/* ==========================================================================
   Two-column layout - info column + sticky booking sidebar
   ========================================================================== */
.property-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  align-items: start;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(184, 173, 152, 0.2);
}

.property-location {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft-gray);
  margin-bottom: 0.75rem;
}

.property-let-type {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.property-info h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.property-tagline {
  font-size: 1.05rem;
  color: var(--soft-gray);
  margin-bottom: 1.75rem;
}

.property-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  border-top: 1px solid rgba(184, 173, 152, 0.25);
  border-bottom: 1px solid rgba(184, 173, 152, 0.25);
}

.property-meta-row span {
  font-size: 0.9rem;
  color: var(--soft-gray);
  letter-spacing: 0.02em;
}

.property-full-description p {
  color: var(--soft-gray);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.property-amenities {
  margin-top: 2.5rem;
}

.property-amenities h2 {
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
}

.property-amenities-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  list-style: none;
}

.property-amenities-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--soft-gray);
  font-size: 0.95rem;
}

.amenity-bullet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(184, 173, 152, 0.15);
  color: var(--primary-dark);
  font-size: 0.75rem;
}

/* ==========================================================================
   Booking sidebar (calendar) + booking form section (below everything)
   ========================================================================== */
.property-sidebar {
  position: sticky;
  top: 2rem;
}

.property-booking-section {
  max-width: 720px;
  margin: 2.5rem auto 0;
}

.calendar-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.booking-form-card {
  padding: 2.5rem;
}

.calendar-card .eyebrow,
.booking-form-card .eyebrow {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft-gray);
  margin-bottom: 0.5rem;
}

.calendar-card h2,
.booking-form-card h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.calendar-nav-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.2rem;
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.2s ease;
}

.calendar-nav-btn:hover {
  background: var(--cream);
}

.calendar-month-year {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  color: var(--charcoal);
}

.calendar-min-stay-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--primary-dark);
  background: rgba(184, 173, 152, 0.12);
  border-radius: 8px;
  padding: 0.5rem;
  margin-bottom: 1.25rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day-header {
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--soft-gray);
  font-weight: 600;
  padding-bottom: 0.5rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--charcoal);
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-day:hover:not(:disabled) {
  background: var(--cream);
}

.calendar-day-empty {
  visibility: hidden;
  cursor: default;
}

.calendar-day-disabled {
  color: rgba(107, 107, 107, 0.35);
  text-decoration: line-through;
  cursor: not-allowed;
}

/* Selectable in principle, but too soon after check-in to satisfy
   the property's minimum stay - dimmed, but not struck through like
   a genuinely blocked or past date. */
.calendar-day-too-soon {
  color: rgba(107, 107, 107, 0.4);
  cursor: not-allowed;
}

.calendar-day-in-range {
  background: rgba(184, 173, 152, 0.2);
  border-radius: 0;
}

.calendar-day-selected {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(184, 173, 152, 0.2);
}

.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--soft-gray);
}

.calendar-legend .dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
}

.dot-available {
  background: var(--white);
  border: 1px solid rgba(184, 173, 152, 0.4);
}

.dot-selected {
  background: var(--primary);
}

.dot-unavailable {
  background: rgba(107, 107, 107, 0.2);
}

.inline-booking-dates {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--cream);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--charcoal);
}

.inline-booking-dates strong {
  font-weight: 600;
}

.clear-dates-btn {
  background: transparent;
  border: 1px solid var(--soft-gray);
  color: var(--soft-gray);
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 1rem;
  width: 100%;
}

.clear-dates-btn:hover {
  background: var(--cream);
  color: var(--charcoal);
}

/* Booking Form */
.booking-form {
  display: grid;
  gap: 1.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  /* Without this, a grid column sized 1fr won't shrink below its
     content's default min-content width (an <input>'s intrinsic
     ~20-character size), so 2-up rows here would overflow the card
     instead of the input just filling its column. */
  min-width: 0;
}

/* Matches the "Get In Touch" form on the homepage (home.css) -
   underlined, transparent inputs rather than filled boxes. */
.form-group label {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--soft-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-bottom: 1px solid rgba(184, 173, 152, 0.4);
  padding: 0.9rem 0;
  background: transparent;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  color: var(--charcoal);
  transition: border-color 0.3s ease;
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: var(--primary);
}

.form-group textarea {
  min-height: 100px;
}

/* The sidebar is narrower than the old side-by-side booking layout,
   so these stay 2 columns but with a tighter gap than the shared
   default - just enough for name/email and phone/additional to sit
   side by side without cramping. */
.booking-form-card .form-row {
  gap: 1.25rem;
}

.guest-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.guest-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  background: var(--cream);
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

.guest-label {
  font-size: 0.9rem;
  color: var(--charcoal);
  font-weight: 500;
}

.guest-buttons {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 1rem;
}

.guest-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 0px;
  background: var(--white);
  color: var(--charcoal);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.guest-btn:hover:not(:disabled) {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(184, 173, 152, 0.3);
}

.guest-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.guest-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--charcoal);
  min-width: 32px;
  text-align: center;
}

.booking-summary {
  width: 100%;
  background: linear-gradient(
    135deg,
    var(--cream) 0%,
    rgba(248, 246, 243, 0.5) 100%
  );
  padding: 1.5rem;
  border-radius: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
  color: var(--soft-gray);
}

.summary-row span:last-child {
  font-weight: 500;
  color: var(--charcoal);
}

#nightlyRate .rate-original {
  text-decoration: line-through;
  color: var(--soft-gray);
  font-weight: 400;
  margin-right: 0.35rem;
}

#nightlyRate .rate-discounted {
  color: var(--primary);
  font-weight: 600;
}

.summary-row.total {
  font-weight: 600;
  padding-top: 0.85rem;
  border-top: 2px solid rgba(184, 173, 152, 0.2);
  margin-top: 0.6rem;
  color: var(--charcoal);
}

.summary-row.total span:last-child {
  color: var(--primary);
}

/* Honeypot field - hidden from humans, visible to bots */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

/* Base look (color, radius, hover) comes from the shared .book-btn
   class (style.css), same as the homepage's "Get In Touch" submit
   button - this just makes it full-width within the booking card. */
.submit-booking {
  width: 100%;
}

.submit-booking.disabled,
.submit-booking:disabled {
  background: var(--soft-gray);
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

/* Footer override */
.footer-bottom {
  padding-top: 2rem;
}

/* Photo Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-image {
  width: min(1100px, 90vw);
  height: min(750px, 80vh);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 1024px) {
  .property-gallery {
    grid-template-columns: 1fr;
  }

  .property-gallery-hero {
    min-height: 320px;
  }

  .property-gallery-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }

  .property-layout {
    grid-template-columns: 1fr;
  }

  .property-sidebar {
    position: static;
  }

  .property-info h1 {
    font-size: 2.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .property-info h1 {
    font-size: 2.1rem;
  }

  .property-gallery-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }

  .property-amenities-list {
    grid-template-columns: 1fr;
  }

  /* Below this width the 2-up guest counters and form fields no
     longer have room to sit side by side without clipping - stack
     them like the shared .form-row default already does elsewhere
     on the site. */
  .guest-selector,
  .booking-form-card .form-row {
    grid-template-columns: 1fr;
  }

  .calendar-card,
  .booking-form-card {
    padding: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .lightbox-image {
    width: 95vw;
    height: 70vh;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
  }
}
