/* ============================================================
   SlopeHouse — Shared Styles
   Design tokens from landing page
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --snow: #F8F9FA;
  --ice: #E8EDF2;
  --slate: #2D3436;
  --pine: #1B4332;
  --frost: #40916C;
  --sky: #74B9FF;
  --peak: #D8F3DC;
  --warm: #F4A261;
  --danger: #E17055;
  --white: #ffffff;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--slate);
  background: var(--snow);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
}

a {
  color: var(--frost);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---- SHARED NAV ---- */
.app-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(248,249,250,0.92);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.app-nav .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--pine);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.app-nav .logo span {
  color: var(--frost);
}

.app-nav .logo:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--frost);
  text-decoration: none;
}

.nav-links .btn-nav {
  background: var(--pine);
  color: white;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.nav-links .btn-nav:hover {
  background: var(--frost);
}

/* ---- MAIN CONTENT AREA ---- */
.page-content {
  padding-top: 5rem;
  min-height: 100vh;
}

/* ---- CONTAINER ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---- SECTION HEADERS ---- */
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--frost);
  margin-bottom: 0.5rem;
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--pine);
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #636E72;
  margin-bottom: 2rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--pine);
  color: white;
}

.btn-primary:hover {
  background: var(--frost);
  color: white;
}

.btn-secondary {
  background: var(--peak);
  color: var(--pine);
}

.btn-secondary:hover {
  background: #c7edce;
}

.btn-outline {
  background: transparent;
  color: var(--pine);
  border: 2px solid var(--ice);
}

.btn-outline:hover {
  border-color: var(--frost);
  color: var(--frost);
}

.btn-warm {
  background: var(--warm);
  color: white;
}

.btn-warm:hover {
  background: #e8913d;
  color: white;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  border-radius: 12px;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-full {
  width: 100%;
}

/* ---- CARDS ---- */
.card {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--ice);
}

.card-body {
  padding: 1.5rem;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--peak);
  color: var(--frost);
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.card-location {
  font-size: 0.85rem;
  color: #95A5A6;
  margin-bottom: 0.75rem;
}

.card-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.amenity-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
  background: var(--snow);
  color: #636E72;
  border: 1px solid var(--ice);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ice);
}

.card-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pine);
}

.card-price small {
  font-size: 0.8rem;
  font-weight: 400;
  color: #95A5A6;
}

.card-dates {
  font-size: 0.8rem;
  color: #95A5A6;
}

/* ---- LISTING GRID ---- */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* ---- FILTERS BAR ---- */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: white;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #95A5A6;
}

.filter-input {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--ice);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--slate);
  background: var(--snow);
  outline: none;
  transition: border-color 0.15s;
}

.filter-input:focus {
  border-color: var(--frost);
}

.filter-input::placeholder {
  color: #B2BEC3;
}

select.filter-input {
  cursor: pointer;
}

/* ---- FORM STYLES ---- */
.form-section {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--pine);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate);
}

.form-label .required {
  color: var(--danger);
}

.form-input {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--ice);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--slate);
  background: var(--snow);
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--frost);
  background: white;
}

textarea.form-input {
  min-height: 100px;
  resize: vertical;
}

.form-hint {
  font-size: 0.78rem;
  color: #95A5A6;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--slate);
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--frost);
}

/* ---- DETAIL PAGE ---- */
.detail-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2rem;
  max-height: 400px;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ice);
}

.detail-hero img:first-child {
  border-radius: 16px 0 0 16px;
}

.detail-hero img:last-child {
  border-radius: 0 16px 16px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}

.detail-info h1 {
  font-size: 1.8rem;
  color: var(--pine);
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #636E72;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.detail-description {
  font-size: 1rem;
  line-height: 1.75;
  color: #4A5568;
  margin-bottom: 2rem;
}

.detail-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.detail-amenity {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--peak);
  color: var(--pine);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Booking sidebar */
.booking-card {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 1.75rem;
  position: sticky;
  top: 5.5rem;
}

.booking-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--pine);
  margin-bottom: 0.25rem;
}

.booking-price small {
  font-size: 0.9rem;
  font-weight: 400;
  color: #95A5A6;
}

.booking-dates {
  font-size: 0.85rem;
  color: #636E72;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ice);
}

.booking-host {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.host-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--peak);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pine);
}

.host-info {
  font-size: 0.85rem;
}

.host-info strong {
  display: block;
  color: var(--slate);
}

.host-info span {
  color: #95A5A6;
}

/* ---- CONFIRMATION ---- */
.confirmation-card {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 2.5rem;
  text-align: center;
  max-width: 600px;
  margin: 3rem auto;
}

.confirmation-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--peak);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}

.confirmation-card h1 {
  font-size: 1.6rem;
  color: var(--pine);
  margin-bottom: 0.75rem;
}

.confirmation-card p {
  font-size: 1rem;
  color: #636E72;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.booking-summary {
  background: var(--snow);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.summary-row:not(:last-child) {
  border-bottom: 1px solid var(--ice);
}

.summary-row .label {
  color: #636E72;
}

.summary-row .value {
  font-weight: 600;
  color: var(--slate);
}

.summary-row.total .value {
  color: var(--pine);
  font-size: 1.1rem;
}

/* ---- ALERT MESSAGES ---- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert-success {
  background: var(--peak);
  color: var(--pine);
  border: 1px solid rgba(64,145,108,0.2);
}

.alert-error {
  background: #FEF0EE;
  color: #C0392B;
  border: 1px solid rgba(192,57,43,0.15);
}

.alert-info {
  background: #EBF5FB;
  color: #2471A3;
  border: 1px solid rgba(36,113,163,0.15);
}

/* ---- LOADING STATES ---- */
.loading {
  text-align: center;
  padding: 3rem;
  color: #95A5A6;
}

.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--ice);
  border-top-color: var(--frost);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- EMPTY STATES ---- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--slate);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.95rem;
  color: #95A5A6;
  margin-bottom: 1.5rem;
}

/* ---- FOOTER ---- */
.app-footer {
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--ice);
  border-top: 1px solid rgba(0,0,0,0.04);
  margin-top: 4rem;
}

.app-footer p {
  font-size: 0.8rem;
  color: #95A5A6;
}

.app-footer a {
  color: var(--frost);
  text-decoration: none;
}

/* ---- STEP INDICATOR ---- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ice);
}

.step-dot.active {
  background: var(--frost);
  width: 28px;
  border-radius: 5px;
}

.step-dot.completed {
  background: var(--pine);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .app-nav {
    padding: 0.85rem 1.25rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a:not(.btn-nav) {
    display: none;
  }

  .page-content {
    padding-top: 4.5rem;
  }

  .container, .container-narrow {
    padding: 0 1rem;
  }

  .listings-grid {
    grid-template-columns: 1fr;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .detail-hero img:first-child {
    border-radius: 16px 16px 0 0;
  }

  .detail-hero img:last-child {
    border-radius: 0 0 16px 16px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .booking-card {
    position: static;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.5rem;
  }

  .card-img {
    height: 180px;
  }
}
