/* BulgariaRest — Airbnb-inspired clean white, mobile-first */
:root {
  --accent: #2E86AB;
  --accent-2: #1e6b8c;
  --text: #222222;
  --text-soft: #717171;
  --divider: #EBEBEB;
  --bg: #FFFFFF;
  --bg-soft: #F7F7F7;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 12px 28px rgba(0, 0, 0, 0.12);
  --shadow-search: 0 3px 12px rgba(0, 0, 0, 0.10);
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-pill: 999px;
  --tap: 44px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px; /* room for fixed bottom nav on mobile */
}
@media (min-width: 769px) { body { padding-bottom: 0; } }

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.container-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-soft); }

h1, h2, h3, h4 { color: var(--text); letter-spacing: -0.02em; font-weight: 800; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(28px, 6vw, 44px); }
h2 { font-size: clamp(22px, 4vw, 28px); }
h3 { font-size: 18px; }

/* === TOP NAV === */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--divider);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800; font-size: 20px; color: var(--text);
  letter-spacing: -0.02em;
}
.brand .dot { color: var(--accent); }
.nav-desktop { display: none; gap: 28px; align-items: center; }
.nav-desktop a { font-weight: 600; color: var(--text); font-size: 14px; }
.nav-desktop a:hover { color: var(--accent); }
.nav-desktop .nav-add {
  background: var(--accent); color: #fff !important;
  padding: 10px 16px; border-radius: var(--radius-pill); font-weight: 700;
}
.nav-desktop .nav-add:hover { background: var(--accent-2); }
@media (min-width: 769px) { .nav-desktop { display: flex; } }

/* === MOBILE BOTTOM NAV === */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #fff;
  border-top: 1px solid var(--divider);
  display: flex; justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; min-height: var(--tap);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 600;
  color: var(--text-soft);
}
.bottom-nav a svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a:hover { color: var(--accent); }
@media (min-width: 769px) { .bottom-nav { display: none; } }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: #fff;
  border: 0; cursor: pointer;
  padding: 14px 22px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 15px;
  min-height: var(--tap);
  transition: background .2s ease, transform .1s ease, box-shadow .2s ease;
}
.btn:hover { background: var(--accent-2); color: #fff; }
.btn:active { transform: scale(0.98); }
.btn.btn-block { width: 100%; }
.btn.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--divider);
}
.btn.btn-ghost:hover { border-color: var(--text); background: #fafafa; color: var(--text); }
.btn.btn-danger { background: #d93025; }
.btn.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }

/* === HERO + SEARCH === */
.hero {
  padding: 40px 0 28px;
  text-align: center;
}
.hero h1 { margin-bottom: 8px; }
.hero p { color: var(--text-soft); margin: 0 auto 24px; max-width: 540px; font-size: 16px; }

.search-bar {
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-search);
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 820px;
  margin: 0 auto;
}
.search-bar .field {
  padding: 12px 18px; border-radius: var(--radius-pill);
  cursor: text;
  transition: background .15s ease;
}
.search-bar .field:hover { background: #f1f1f1; }
.search-bar .field label {
  display: block; font-weight: 700; font-size: 11px; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px;
}
.search-bar input,
.search-bar select {
  width: 100%; border: 0; padding: 0; background: transparent;
  font: inherit; color: var(--text); outline: none;
  font-size: 14px;
}
.search-bar .field + .field { border-top: 1px solid var(--divider); }
.search-bar .submit-wrap {
  display: flex; align-items: center; justify-content: center; padding: 6px;
}
.search-bar button {
  width: 100%; height: 50px;
  background: var(--accent); color: #fff;
  border: 0; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 15px; cursor: pointer;
  transition: background .2s ease;
}
.search-bar button:hover { background: var(--accent-2); }

@media (min-width: 769px) {
  .search-bar {
    grid-template-columns: 1.4fr 1fr 1fr auto;
    border-radius: var(--radius-pill);
  }
  .search-bar .field + .field { border-top: 0; border-left: 1px solid var(--divider); }
  .search-bar .submit-wrap { padding: 0 6px 0 12px; }
  .search-bar button { width: auto; padding: 0 28px; }
}

/* === CATEGORY PILLS === */
.categories {
  margin: 28px 0 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.categories::-webkit-scrollbar { display: none; }
.cat-strip {
  display: flex; gap: 10px; padding: 4px 20px;
  width: max-content; min-width: 100%;
}
.cat {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--divider); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; min-height: 40px;
  transition: all .2s ease;
}
.cat:hover { border-color: var(--text); color: var(--text); }
.cat.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat.active:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.cat .emoji { font-size: 16px; }

/* === SECTION === */
.section { padding: 36px 0; }
.section .head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.section .head a { font-weight: 700; color: var(--text); font-size: 14px; }
.section .head a:hover { color: var(--accent); }

/* === CARD GRID === */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px 20px;
}
@media (min-width: 600px) { .grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.p-card {
  display: block;
  border-radius: var(--radius-card);
  transition: transform .2s ease;
}
.p-card .imgwrap {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-soft) center/cover no-repeat;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease;
}
.p-card .img {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  transition: transform .4s ease;
}
.p-card:hover .img { transform: scale(1.04); }
.p-card:hover .imgwrap { box-shadow: var(--shadow-card-hover); }
.p-card .heart {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.92); border: 0; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transition: transform .15s ease, background .15s ease;
  z-index: 2;
}
.p-card .heart:hover { transform: scale(1.08); }
.p-card .heart:active { transform: scale(0.94); }
.p-card .heart svg { width: 18px; height: 18px; }
.p-card .heart svg path { fill: rgba(0,0,0,0.5); stroke: #fff; stroke-width: 2; }
.p-card .heart.on svg path { fill: #FF385C; stroke: #fff; }
.p-card .tier-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.95); color: var(--text);
  font-weight: 700; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--radius-pill);
  z-index: 1;
}
.p-card .tier-tag.featured { background: #FF385C; color: #fff; }
.p-card .body { padding: 12px 4px 0; }
.p-card .name { font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--text); margin: 0; }
.p-card .meta { color: var(--text-soft); font-size: 14px; margin-top: 2px; }
.p-card .rating { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; font-size: 14px; }
.p-card .rating svg { width: 14px; height: 14px; fill: var(--text); }
.p-card .row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-top: 6px;
}
.p-card .price { font-weight: 700; color: var(--text); font-size: 15px; }
.p-card .price small { font-weight: 400; color: var(--text-soft); }

/* === MAP === */
.map-wrap {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
#map { height: 460px; width: 100%; background: var(--bg-soft); }
#stay-map { height: 320px; width: 100%; }
.leaflet-container { font-family: inherit; background: #f0f4f7; }

/* Dark Leaflet pin */
.bg-pin {
  background: #222; color: #fff;
  border: 2px solid #fff;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: transform .15s ease;
}
.bg-pin:hover { transform: scale(1.05); background: var(--accent); }
.bg-pin .count { background: #fff; color: var(--text); border-radius: 999px; padding: 0 6px; font-size: 11px; }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; }
.leaflet-popup-content a { font-weight: 700; }

/* === REGIONS SCROLL === */
.regions-scroll {
  display: flex; gap: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 20px 12px;
  scrollbar-width: none;
}
.regions-scroll::-webkit-scrollbar { display: none; }
.region-card {
  flex: 0 0 auto;
  min-width: 200px;
  padding: 18px;
  background: var(--bg-soft);
  border-radius: var(--radius-card);
  color: var(--text);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.region-card:hover { background: #fff; box-shadow: var(--shadow-card); color: var(--text); transform: translateY(-2px); }
.region-card .emo { font-size: 26px; }
.region-card .nm { font-weight: 700; font-size: 16px; }
.region-card .cnt { color: var(--text-soft); font-size: 13px; }

/* === STAY DETAIL === */
.stay-head { padding: 24px 0 12px; }
.stay-head h1 { font-size: clamp(22px, 4vw, 32px); }
.stay-head .meta { color: var(--text-soft); margin-top: 6px; font-size: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.stay-head .meta b { color: var(--text); font-weight: 700; }

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.gallery .g {
  background: var(--bg-soft) center/cover no-repeat;
  aspect-ratio: 4/3;
}
@media (min-width: 769px) {
  .gallery {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    aspect-ratio: 16/8;
  }
  .gallery .g { aspect-ratio: auto; }
  .gallery .g.main { grid-row: 1 / span 2; }
  .gallery .g:nth-child(n+6) { display: none; }
}

.stay-body { display: grid; grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
@media (min-width: 900px) { .stay-body { grid-template-columns: 1.6fr 1fr; gap: 56px; } }

.divider { height: 1px; background: var(--divider); margin: 24px 0; border: 0; }

.amenity-icons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (min-width: 600px) { .amenity-icons { grid-template-columns: repeat(3, 1fr); } }
.am-row { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text); }
.am-row svg { width: 26px; height: 26px; flex: 0 0 26px; stroke: var(--text); fill: none; stroke-width: 1.6; }

.booking-panel {
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px;
}
@media (min-width: 900px) { .booking-panel { position: sticky; top: 88px; align-self: start; } }
.booking-panel .price-big { font-size: 26px; font-weight: 800; }
.booking-panel .price-big small { font-size: 14px; color: var(--text-soft); font-weight: 400; }
.booking-panel .stars { font-size: 13px; color: var(--text-soft); margin-top: 4px; }
.booking-panel .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--divider); border-radius: 12px; overflow: hidden; margin: 18px 0; }
.booking-panel .field-grid .f { padding: 10px 14px; }
.booking-panel .field-grid .f label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.booking-panel .field-grid .f input { width: 100%; border: 0; padding: 0; background: transparent; font: inherit; outline: none; }
.booking-panel .field-grid .f + .f { border-left: 1px solid var(--divider); }
.booking-panel .field-grid .full { grid-column: 1 / -1; border-top: 1px solid var(--divider); border-left: 0; }
.booking-panel .totals { display: flex; justify-content: space-between; font-size: 14px; color: var(--text); margin: 10px 0; }
.booking-panel .totals.total { font-weight: 800; border-top: 1px solid var(--divider); padding-top: 10px; margin-top: 14px; }
.booking-panel .note { color: var(--text-soft); font-size: 12px; text-align: center; margin-top: 10px; }

.review {
  padding: 14px 0; border-top: 1px solid var(--divider);
}
.review:first-child { border-top: 0; }
.review .who { display: flex; gap: 10px; align-items: center; }
.review .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-soft) center/cover;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--text-soft);
}
.review .stars-row { color: #222; font-size: 13px; margin-top: 2px; }
.review .stars-row .off { color: var(--divider); }
.review p { margin: 8px 0 0; font-size: 15px; color: var(--text); }

/* === FORMS === */
.form-card {
  background: #fff; border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.form-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px;
}
@media (min-width: 600px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.f { display: flex; flex-direction: column; gap: 6px; }
.f.full { grid-column: 1 / -1; }
.f label { font-weight: 700; font-size: 14px; }
.f input, .f select, .f textarea {
  border: 1px solid var(--divider);
  background: #fff;
  padding: 14px 16px;
  border-radius: var(--radius-input);
  font: inherit; color: var(--text);
  min-height: var(--tap);
  outline: none;
  transition: border-color .15s ease;
}
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--text); }
.f textarea { min-height: 110px; resize: vertical; }
.f small { color: var(--text-soft); font-size: 13px; }
.f .err { color: #d93025; font-size: 13px; }

/* Choice tiles (used in add-listing) */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 600px) { .choice-grid { grid-template-columns: repeat(3, 1fr); } }
.choice {
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-card);
  padding: 18px;
  cursor: pointer; user-select: none;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 110px;
  transition: all .2s ease;
}
.choice:hover { border-color: var(--text); }
.choice input { display: none; }
.choice .emo { font-size: 28px; }
.choice .lbl { font-weight: 700; font-size: 15px; }
.choice.is-checked { border-color: var(--accent); background: rgba(46,134,171,.05); }

/* Amenity selector chips */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--divider); border-radius: var(--radius-pill);
  padding: 10px 16px; min-height: var(--tap);
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 14px;
  cursor: pointer; user-select: none;
  transition: all .2s ease;
}
.chip input { display: none; }
.chip:hover { border-color: var(--text); }
.chip.is-checked { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Progress steps */
.progress {
  display: flex; gap: 6px;
  margin-bottom: 24px;
}
.progress .bar {
  flex: 1; height: 4px; background: var(--divider); border-radius: 999px;
  transition: background .2s ease;
}
.progress .bar.done { background: var(--accent); }
.step-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.step-head .counter { color: var(--text-soft); font-size: 13px; font-weight: 600; }
.step { display: none; }
.step.is-active { display: block; }
.step-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }

/* Alerts */
.alert {
  background: #eaf6ee; color: #1b5e20; padding: 14px 16px;
  border-radius: var(--radius-input); font-weight: 600; margin-bottom: 14px;
}
.alert.err { background: #fde7e7; color: #a51d1d; }

/* Pagination */
.pagination {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
  margin: 28px 0 8px;
}
.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: var(--radius-pill);
  font-size: 14px; border: 1px solid var(--divider); color: var(--text);
  background: #fff;
}
.pagination a:hover { border-color: var(--text); color: var(--text); }
.pagination span[aria-current="page"] {
  background: var(--text); color: #fff; border-color: var(--text);
}

/* Admin (kept simple, consistent with new tokens) */
.admin-shell { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 24px 0; }
@media (min-width: 800px) { .admin-shell { grid-template-columns: 220px 1fr; } }
.admin-side {
  background: #fff; border: 1px solid var(--divider);
  border-radius: var(--radius-card); padding: 14px;
  height: max-content;
}
.admin-side a {
  display: block; padding: 11px 14px; border-radius: 10px;
  color: var(--text); font-weight: 600; font-size: 14px;
}
.admin-side a:hover, .admin-side a.active { background: var(--bg-soft); color: var(--accent); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
@media (min-width: 600px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: #fff; border: 1px solid var(--divider);
  border-radius: var(--radius-card); padding: 16px;
}
.stat .lbl { color: var(--text-soft); font-size: 13px; font-weight: 600; }
.stat .val { font-size: 26px; font-weight: 800; margin-top: 4px; }
.table-wrap {
  background: #fff; border: 1px solid var(--divider);
  border-radius: var(--radius-card); overflow: auto;
}
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 12px 14px; text-align: left; }
table.tbl thead { background: var(--bg-soft); color: var(--text-soft); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
table.tbl tr { border-top: 1px solid var(--divider); }
table.tbl tr:first-child { border-top: 0; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.badge.featured { background: #ffe8ec; color: #b00026; }
.badge.premium  { background: #e3f2ff; color: #1b4d77; }
.badge.free     { background: var(--bg-soft); color: var(--text-soft); }

/* Footer */
.site-footer {
  margin-top: 56px; border-top: 1px solid var(--divider);
  padding: 28px 0; color: var(--text-soft); font-size: 13px;
}
.site-footer .inner { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.site-footer a { color: var(--text-soft); }
.site-footer a:hover { color: var(--text); }
