/* Off The Tee — Application styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #16a34a;
  --green-light: #dcfce7;
  --green-mid: #4ade80;
  --green-dark: #0f7a38;
  --green-deeper: #0a5c2a;
  --ink: #0d1a0d;
  --ink-mid: #3a523a;
  --ink-light: #6b906b;
  --bg: #ffffff;
  --bg-tint: #f4fbf5;
  --border: rgba(34,197,94,0.15);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Outfit', system-ui, sans-serif;
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── NAV ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 48px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--sans); font-weight: 400; font-size: 15px;
  color: var(--ink); letter-spacing: 0.01em;
}
.nav-logo span { color: var(--green); font-weight: 500; }
.nav-links {
  display: flex; align-items: center; gap: 32px;
  font-size: 14px; color: var(--ink-mid);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--green); font-weight: 400; }
.btn-pill {
  display: inline-flex; align-items: center;
  background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 13px; font-weight: 400;
  padding: 10px 22px; border-radius: 100px; border: none;
  cursor: pointer; letter-spacing: 0.02em;
  transition: background .2s;
  text-decoration: none;
}
.btn-pill:hover { background: var(--green-deeper); color: #fff; }
.btn-pill.green { background: var(--green); }
.btn-pill.green:hover { background: var(--green-dark); }
.btn-pill.outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-pill.outline:hover { border-color: var(--green); color: var(--green); }

/* ─── PAGE HEADER ────────────────────────────────────── */
.page-header {
  padding: 56px 48px 40px;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 500; line-height: 1.05;
  letter-spacing: -0.5px; color: var(--ink);
  margin-bottom: 8px;
}
.page-header h1 .accent { color: var(--green); }
.page-header p {
  font-size: 15px; color: var(--ink-mid); font-weight: 300;
}

/* ─── FILTERS ────────────────────────────────────────── */
.filters {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 20px 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tint);
}
.filter-label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-light); font-weight: 500;
}
.filter-chip {
  display: inline-flex; align-items: center;
  padding: 7px 16px; border-radius: 100px;
  border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 300; color: var(--ink-mid);
  cursor: pointer; background: var(--bg);
  text-decoration: none; transition: all .15s;
}
.filter-chip:hover,
.filter-chip.active {
  border-color: var(--green); color: var(--green);
  background: var(--green-light);
}
.filter-chip.active { font-weight: 400; }
.filter-search {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}
.filter-search input {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 100px; padding: 8px 18px;
  color: var(--ink); font-family: var(--sans);
  font-size: 13px; font-weight: 300; outline: none;
  width: 220px;
  transition: border-color .2s;
}
.filter-search input:focus { border-color: var(--green); }
.filter-search input::placeholder { color: var(--ink-light); }

/* ─── COURSE GRID ────────────────────────────────────── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  padding: 40px 48px;
}
.course-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.course-card:hover {
  border-color: rgba(34,197,94,0.35);
  box-shadow: 0 4px 24px rgba(22,163,74,0.08);
}
.card-hero {
  height: 140px;
  display: flex; align-items: flex-end;
  padding: 20px;
  position: relative; overflow: hidden;
}
.card-hero-img {
  background-size: cover;
  background-position: center;
}
.card-hero-heathland { background: linear-gradient(135deg, #1a3a20 0%, #2d5a35 40%, #4a8a52 100%); }
.card-hero-links     { background: linear-gradient(135deg, #1a2e3a 0%, #2d4a5a 40%, #4a7a8a 100%); }
.card-hero-parkland  { background: linear-gradient(135deg, #1a3020 0%, #2d5230 40%, #4a8040 100%); }
.card-hero-downland  { background: linear-gradient(135deg, #2a3820 0%, #4a5e30 40%, #7a8a52 100%); }
.card-hero-moorland  { background: linear-gradient(135deg, #2a2820 0%, #4a4230 40%, #7a6a52 100%); }
.card-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 20px,
    rgba(255,255,255,0.02) 20px, rgba(255,255,255,0.02) 21px
  );
}
.card-type-badge {
  position: relative; z-index: 1;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500; color: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.25); padding: 5px 12px; border-radius: 100px;
}
.card-live-badge {
  position: absolute; top: 16px; right: 16px; z-index: 1;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 500; color: #fff;
  background: var(--green); padding: 5px 12px; border-radius: 100px;
  display: flex; align-items: center; gap: 6px;
}
.card-live-dot {
  width: 5px; height: 5px; border-radius: 50%; background: #fff;
  animation: blink 2.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.card-meta {
  font-size: 12px; color: var(--ink-light); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.card-meta-sep { opacity: 0.4; }
.card-name {
  font-family: var(--serif); font-size: 22px; font-weight: 500;
  color: var(--ink); line-height: 1.15; margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.card-desc {
  font-size: 13px; color: var(--ink-mid); line-height: 1.65;
  font-weight: 300; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--border);
}
.card-price {
  font-size: 13px; color: var(--ink-light);
}
.card-price strong { color: var(--ink); font-weight: 500; font-size: 15px; }
.card-wish-count {
  font-size: 12px; color: var(--ink-light);
  display: flex; align-items: center; gap: 5px;
}
.card-wish-count svg { color: var(--green); }

/* ─── WANT BUTTON ────────────────────────────────────── */
.want-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 13px; font-weight: 400;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.want-btn:hover {
  border-color: var(--green); color: var(--green);
  background: var(--green-light);
}
.want-btn.wanted {
  border-color: var(--green); color: var(--green);
  background: var(--green-light);
}
.want-btn svg { width: 14px; height: 14px; }

/* ─── COURSE DETAIL PAGE ─────────────────────────────── */
.course-detail { max-width: 900px; margin: 0 auto; padding: 48px 48px 80px; }
.course-detail-header { margin-bottom: 40px; }
.course-breadcrumb {
  font-size: 13px; color: var(--ink-light); margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.course-breadcrumb a:hover { color: var(--green); }
.course-detail-hero {
  height: 320px; border-radius: var(--radius);
  display: flex; align-items: flex-end;
  padding: 32px; position: relative; overflow: hidden;
  margin-bottom: 40px;
  background-size: cover;
  background-position: center;
}
.course-detail-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 60%);
}
.course-detail-hero-content {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; justify-content: space-between;
  width: 100%;
}
.course-detail-type {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500; color: rgba(255,255,255,0.7);
}
.course-detail-h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 500; color: #fff; line-height: 1.05;
  letter-spacing: -0.5px; margin: 6px 0;
}
.course-detail-loc {
  font-size: 14px; color: rgba(255,255,255,0.65);
}

.course-info-grid {
  display: grid; grid-template-columns: 1fr 300px; gap: 48px;
  align-items: start;
}
.course-description {
  font-size: 16px; color: var(--ink-mid); line-height: 1.8;
  font-weight: 300; margin-bottom: 28px;
}
.course-facts {
  display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 36px;
}
.fact {
  display: flex; flex-direction: column; gap: 2px;
}
.fact-label {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-light); font-weight: 500;
}
.fact-value { font-size: 18px; font-weight: 500; color: var(--ink); }
.fact-value.serif { font-family: var(--serif); font-size: 24px; }

.course-sidebar {
  position: sticky; top: 80px;
  background: var(--bg-tint); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.sidebar-title {
  font-family: var(--serif); font-size: 22px; font-weight: 500;
  color: var(--ink); margin-bottom: 6px; line-height: 1.15;
}
.sidebar-sub {
  font-size: 13px; color: var(--ink-mid); margin-bottom: 24px; line-height: 1.6;
}
.wish-count-big {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; padding: 16px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
}
.wish-count-big .num {
  font-family: var(--serif); font-size: 36px; font-weight: 500;
  color: var(--green); line-height: 1;
}
.wish-count-big .label { font-size: 13px; color: var(--ink-mid); line-height: 1.4; }
.want-btn-large {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 24px; border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; font-weight: 400;
  cursor: pointer; transition: all .2s; margin-bottom: 14px;
}
.want-btn-large:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }
.want-btn-large.wanted { border-color: var(--green); color: var(--green); background: var(--green-light); }
.want-btn-large svg { width: 18px; height: 18px; }
.sidebar-note { font-size: 12px; color: var(--ink-light); text-align: center; line-height: 1.5; }
.sidebar-live-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--green); font-weight: 400;
  margin-bottom: 16px; padding: 10px 14px;
  background: var(--green-light); border-radius: 8px;
}

/* ─── TEE TIMES ──────────────────────────────────────── */
.tee-times-section { margin-top: 40px; }
.tee-times-section h2 {
  font-family: var(--serif); font-size: 28px; font-weight: 500;
  color: var(--ink); margin-bottom: 20px;
}
.tee-time-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 10px; background: var(--bg-tint);
}
.tee-time-time { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--ink); }
.tee-time-date { font-size: 13px; color: var(--ink-light); }
.tee-time-price { font-size: 15px; font-weight: 500; color: var(--green); }

/* ─── AUTH FORMS ─────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
  background: var(--bg-tint);
}
.auth-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 24px; padding: 48px; width: 100%; max-width: 440px;
}
.auth-logo {
  font-family: var(--sans); font-weight: 400; font-size: 15px;
  color: var(--ink); margin-bottom: 32px; display: block;
}
.auth-logo span { color: var(--green); font-weight: 500; }
.auth-card h1 {
  font-family: var(--serif); font-size: 32px; font-weight: 500;
  color: var(--ink); margin-bottom: 6px; line-height: 1.1;
}
.auth-sub { font-size: 14px; color: var(--ink-mid); margin-bottom: 32px; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block; font-size: 12px; font-weight: 400;
  letter-spacing: 0.06em; color: var(--ink-mid);
  margin-bottom: 6px; text-transform: uppercase;
}
.form-row input,
.form-row select {
  width: 100%; background: var(--bg-tint);
  border: 1.5px solid var(--border);
  border-radius: 10px; padding: 12px 16px;
  color: var(--ink); font-family: var(--sans);
  font-size: 14px; font-weight: 300; outline: none;
  transition: border-color .2s;
}
.form-row input:focus,
.form-row select:focus { border-color: var(--green); }
.form-row input::placeholder { color: var(--ink-light); }
.form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error {
  background: #fef2f2; border: 1px solid #fecaca;
  color: #dc2626; font-size: 13px; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 20px;
}
.auth-submit {
  width: 100%;
  background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 15px; font-weight: 400;
  padding: 14px; border-radius: 100px; border: none;
  cursor: pointer; margin-top: 8px;
  transition: background .2s;
}
.auth-submit:hover { background: var(--green-deeper); }
.auth-switch {
  text-align: center; margin-top: 24px;
  font-size: 13px; color: var(--ink-light);
}
.auth-switch a { color: var(--green); }

/* ─── PROFILE & WISHLIST ─────────────────────────────── */
.profile-page { max-width: 800px; margin: 0 auto; padding: 48px 48px 80px; }
.profile-header { display: flex; align-items: center; gap: 24px; margin-bottom: 40px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green); display: flex; align-items: center;
  justify-content: center; font-family: var(--serif);
  font-size: 28px; font-weight: 500; color: #fff;
  flex-shrink: 0;
}
.profile-name { font-family: var(--serif); font-size: 28px; font-weight: 500; color: var(--ink); }
.profile-email { font-size: 13px; color: var(--ink-light); }
.profile-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border); margin-bottom: 40px;
}
.profile-tab {
  padding: 12px 24px; font-size: 14px; color: var(--ink-light);
  border-bottom: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: color .2s;
  margin-bottom: -1px;
}
.profile-tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: 400; }
.profile-tab:hover:not(.active) { color: var(--ink); }
.section-heading {
  font-family: var(--serif); font-size: 24px; font-weight: 500;
  color: var(--ink); margin-bottom: 24px;
}
.wishlist-grid {
  display: flex; flex-direction: column; gap: 16px;
}
.wishlist-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s;
}
.wishlist-row:hover { border-color: rgba(34,197,94,0.3); }
.wishlist-row-left { display: flex; flex-direction: column; gap: 3px; }
.wishlist-row-name {
  font-family: var(--serif); font-size: 20px; font-weight: 500;
  color: var(--ink); line-height: 1.1;
}
.wishlist-row-meta { font-size: 12px; color: var(--ink-light); }
.wishlist-row-right { display: flex; align-items: center; gap: 12px; }
.empty-state {
  text-align: center; padding: 64px 24px;
  color: var(--ink-mid);
}
.empty-state p { font-size: 15px; margin-bottom: 24px; }
.save-notice {
  background: var(--green-light); border: 1px solid rgba(34,197,94,0.3);
  color: var(--green-dark); font-size: 13px; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 24px; display: flex; align-items: center; gap: 8px;
}

/* ─── FOOTER ─────────────────────────────────────────── */
.footer {
  padding: 24px 48px;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--ink-light);
}
.footer-logo span { color: var(--green); }

/* ─── UTILITIES ──────────────────────────────────────── */
.results-count { font-size: 13px; color: var(--ink-light); padding: 0 48px 0; margin-top: -28px; margin-bottom: 4px; }
.empty-courses { padding: 80px 48px; text-align: center; color: var(--ink-mid); }
.empty-courses p { font-size: 16px; margin-bottom: 20px; }

@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .nav-links .hide-mobile { display: none; }
  .page-header, .courses-grid, .filters, .results-count, .empty-courses { padding-left: 20px; padding-right: 20px; }
  .courses-grid { grid-template-columns: 1fr; gap: 16px; }
  .course-detail, .profile-page { padding: 32px 20px 64px; }
  .course-info-grid { grid-template-columns: 1fr; }
  .course-sidebar { position: static; }
  .filters { gap: 8px; }
  .filter-search { margin-left: 0; width: 100%; }
  .filter-search input { width: 100%; }
  .footer { padding: 20px; flex-direction: column; gap: 8px; text-align: center; }
}

/* ─── MAP / LIST TOGGLE ───────────────────────────────────── */
.view-toggle-wrap {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 200;
  display: flex;
  background: var(--ink);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.view-toggle {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.view-toggle.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* ─── MAP CONTAINER ───────────────────────────────────────── */
#map-view {
  position: fixed;
  inset: 0;
  top: 64px; /* below nav */
  z-index: 10;
}
#map {
  width: 100%;
  height: 100%;
  background: #0D1A0D;
}
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right { display: none !important; }
.mapboxgl-ctrl-logo          { display: none !important; }

/* ─── COURSE PIN ──────────────────────────────────────────── */
.course-pin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0D1A0D;
  border: 2.5px solid #4ADE80;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
}
.course-pin:hover { transform: scale(1.12); }
.course-pin span {
  color: #4ADE80;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--sans);
  white-space: nowrap;
}

/* ─── BOTTOM SHEET ────────────────────────────────────────── */
#sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: transparent;
  pointer-events: none;
  transition: background 0.2s;
}
#sheet-backdrop.visible {
  pointer-events: auto;
  background: rgba(0,0,0,0.35);
}

#bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 32px;
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
}
#bottom-sheet.open { transform: translateY(0); }

#sheet-photo-wrap { margin-bottom: 14px; }
#sheet-photo {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

#sheet-name {
  font-size: 15px;
  font-weight: 500;
  color: #0D1A0D;
  margin-bottom: 3px;
}
#sheet-location {
  font-size: 12px;
  color: #6B906B;
  margin-bottom: 12px;
}
#sheet-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}
#sheet-original-price {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}
#sheet-ott-price {
  font-size: 18px;
  font-weight: 500;
  color: #16A34A;
}
#sheet-cta {
  display: block;
  width: 100%;
  background: #0D1A0D;
  color: #fff;
  text-align: center;
  padding: 14px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--sans);
  text-decoration: none;
  transition: opacity 0.15s;
}
#sheet-cta:hover { opacity: 0.85; }
