/* ============================================================
   БРИДЖ ХАУС — стили конкретных страниц
   ============================================================ */

/* ---------- СТРАНИЦА АПАРТАМЕНТА ---------- */
.apt-hero-wrap {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px;
  padding: calc(var(--header-h) + 40px) 0 0;
}
.apt-gallery { position: relative; display: flex; flex-direction: column; gap: 16px; }
.apt-gallery-main {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4 / 3; box-shadow: var(--shadow-soft); cursor: zoom-in;
  background: var(--sand-200);
}
.apt-gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.apt-gallery-main:hover img { transform: scale(1.04); }
.apt-gallery-main .zoom-hint {
  position: absolute; right: 16px; bottom: 16px;
  background: rgba(7, 24, 40, .72); color: var(--white);
  padding: 8px 15px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  backdrop-filter: blur(4px);
}
.apt-gallery-side { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(120px, auto); gap: 12px; }
.apt-thumb { position: relative; border-radius: var(--radius-md); overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow-card); background: var(--sand-200); }
.apt-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.apt-thumb:hover img { transform: scale(1.06); }
.apt-thumb.more::after {
  content: attr(data-more); position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 24, 40, .68); color: var(--white);
  font-weight: 800; font-size: 1.05rem; letter-spacing: .04em;
}
.apt-panel {
  align-self: start; position: sticky; top: calc(var(--header-h) + 18px);
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); border: 1px solid var(--sand-200);
  padding: 28px;
}
.apt-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.apt-panel-title { font-family: var(--ff-text); font-weight: 800; font-size: 1.55rem; color: var(--navy-900); }
.apt-panel h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.apt-panel .badge { margin: 0; }
.apt-panel-sub { color: var(--ink-500); font-size: .95rem; margin-bottom: 18px; }
.spec-rows { border-top: 1px solid var(--sand-200); margin-bottom: 18px; }
.spec-rows .row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--sand-200); font-size: .94rem; }
.spec-rows .row dt { color: var(--ink-500); display: flex; align-items: center; gap: 9px; }
.spec-rows .row dt svg { width: 17px; height: 17px; color: var(--gold-600); }
.spec-rows .row dd { margin: 0; font-weight: 700; text-align: right; }
.apt-panel .btn { width: 100%; margin-bottom: 10px; }
.apt-panel-note { text-align: center; font-size: .82rem; color: var(--ink-300); margin: 0; }

.apt-desc { max-width: 860px; }
.apt-desc p { color: var(--ink-700); }
.apt-content-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; padding: 48px 0 0; }

/* календарь занятости на странице апартамента */
.avail-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); border: 1px solid var(--sand-200);
  padding: 26px; position: sticky; top: calc(var(--header-h) + 18px);
}
.avail-card h3 { margin-bottom: 4px; }
.avail-card .muted { font-size: .84rem; margin-bottom: 16px; }
.avail-legend { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 14px; font-size: .78rem; color: var(--ink-500); }
.avail-legend span { display: inline-flex; align-items: center; gap: 6px; }
.avail-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* похожие апартаменты */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 22px; }

/* ---------- СТРАНИЦА БРОНИРОВАНИЯ ---------- */
.booking-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
.booking-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); border: 1px solid var(--sand-200);
  padding: 36px;
}
.booking-card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.booking-aside { position: sticky; top: calc(var(--header-h) + 18px); display: flex; flex-direction: column; gap: 22px; }
.aside-card {
  background: var(--navy-900); color: var(--white);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-soft);
}
.aside-card h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 14px; }
.aside-list li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .93rem; color: rgba(255,255,255,.82); }
.aside-list li:last-child { border-bottom: 0; }
.aside-list svg { width: 19px; height: 19px; color: var(--gold-400); flex: none; margin-top: 3px; }
.aside-phone { font-family: var(--ff-text); font-size: 1.7rem; font-weight: 800; color: var(--gold-400); display: inline-block; margin: 6px 0 14px; }

/* успех бронирования */
.booking-success {
  text-align: center; padding: 26px 10px 10px;
}
.success-mark {
  width: 92px; height: 92px; margin: 0 auto 24px; border-radius: 50%;
  background: var(--ok-100); color: var(--ok-600);
  display: flex; align-items: center; justify-content: center;
}
.success-mark svg { width: 44px; height: 44px; }
.booking-code {
  display: inline-block; font-family: var(--ff-text); font-weight: 800; font-size: 1.5rem;
  color: var(--navy-800); background: var(--gold-100); border: 1.5px dashed var(--gold-500);
  padding: 8px 26px; border-radius: 999px; margin: 12px 0 22px; letter-spacing: .06em;
}

/* ---------- ГАЛЕРЕЯ ---------- */
.masonry { columns: 3 320px; column-gap: 22px; }
.masonry .m-item {
  break-inside: avoid; margin: 0 0 22px; border-radius: var(--radius-md);
  overflow: hidden; position: relative; cursor: zoom-in; box-shadow: var(--shadow-card);
  background: var(--sand-200);
}
.masonry .m-item img { width: 100%; object-fit: cover; transition: transform .6s ease, filter .4s; }
.masonry .m-item:hover img { transform: scale(1.05); filter: brightness(1.06); }
.masonry .m-item::after {
  content: "＋"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.95); font-size: 2rem; background: rgba(7,24,40,.25); opacity: 0; transition: opacity .3s;
}
.masonry .m-item:hover::after { opacity: 1; }

/* ---------- ОПЛАТА ---------- */
.pay-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.pay-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); border: 1px solid var(--sand-200); padding: 32px;
}
.pay-card h3 { display: flex; align-items: center; gap: 12px; }
.pay-bank { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .82rem; letter-spacing: .04em; }
.pay-bank-t { background: #E8F7E2; color: #23751F; }
.pay-bank-b { background: #FFF3D6; color: #935F00; }
.pay-qr {
  display: block; width: 100%; max-width: 300px; margin: 20px auto 8px;
  border-radius: var(--radius-md); border: 1px solid var(--sand-300); padding: 12px; background: #fff;
}
.req-list li { padding: 11px 0 11px 34px; position: relative; border-bottom: 1px solid var(--sand-200); font-size: .95rem; }
.req-list li:last-child { border: 0; }
.req-list li::before {
  content: ""; position: absolute; left: 4px; top: 17px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-500);
}

/* ---------- КАК ДОБРАТЬСЯ ---------- */
.route-card {
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  border: 1px solid var(--sand-200); padding: 30px; text-align: center;
}
.route-card h3 { font-size: 1.15rem; }
.route-icon {
  width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 18px;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-400));
  color: var(--navy-800); display: flex; align-items: center; justify-content: center;
}
.route-icon svg { width: 28px; height: 28px; }
.route-schemes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.route-schemes img { border-radius: var(--radius-md); box-shadow: var(--shadow-card); width: 100%; }
.schedule-links li { margin-bottom: 10px; }
.schedule-links a { display: flex; justify-content: space-between; gap: 12px; padding: 13px 18px; background: var(--white); border: 1px solid var(--sand-200); border-radius: 12px; font-weight: 600; }
.schedule-links a:hover { border-color: var(--gold-400); }
.schedule-links a::after { content: "→"; color: var(--gold-600); }

/* ---------- КОНТАКТЫ ---------- */
.contacts-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.contact-item {
  display: flex; gap: 18px; align-items: flex-start; padding: 20px 0;
  border-bottom: 1px solid var(--sand-200);
}
.contact-item:last-of-type { border-bottom: 0; }
.contact-icon {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  background: var(--gold-100); color: var(--gold-600);
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 24px; height: 24px; }
.contact-item b { display: block; font-size: .84rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-300); margin-bottom: 4px; }
.contact-item .val { font-size: 1.12rem; font-weight: 700; color: var(--navy-800); }
.map-frame {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft);
  border: 1px solid var(--sand-200); background: var(--sand-100);
}
.map-frame iframe { display: block; width: 100%; height: 520px; border: 0; }
.qr-note { text-align: center; margin-top: 14px; font-size: .84rem; color: var(--ink-500); }

/* ---------- ПРАВИЛА / текстовые страницы ---------- */
.rules-list li { position: relative; padding: 0 0 14px 34px; margin-bottom: 6px; }
.rules-list li::before {
  content: ""; position: absolute; left: 6px; top: 9px; width: 9px; height: 9px;
  border-radius: 2px; background: var(--gold-500); transform: rotate(45deg);
}
.rules-list li:last-child { margin-bottom: 0; }
.text-content { max-width: 860px; }
.text-content p { color: var(--ink-700); }
.text-content h3 { margin-top: 34px; }

/* ---------- КАРТА САЙТА ---------- */
.sitemap-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.sitemap-card { background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--sand-200); padding: 26px; box-shadow: var(--shadow-card); }
.sitemap-card h3 { font-size: 1.1rem; margin-bottom: 14px; }
.sitemap-card a { display: block; padding: 7px 0; color: var(--ink-700); font-weight: 600; }
.sitemap-card a:hover { color: var(--sea-600); }

/* ---------- АДМИН-ПАНЕЛЬ ---------- */
body.admin-page { background: #EDF1F5; }
.admin-shell { max-width: 1280px; margin: 0 auto; padding: 26px 20px 60px; }
.admin-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 26px; }
.admin-top h1 { font-size: 1.5rem; margin: 0; }
.admin-top .spacer { flex: 1; }
.admin-card { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 26px; margin-bottom: 24px; }
.admin-tabs { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; padding-top: 40px; }
.admin-tab { padding: 10px 22px; border-radius: 999px; font-weight: 800; font-size: .92rem; background: var(--white); color: var(--ink-700); border: 1.5px solid var(--sand-300); text-decoration: none; }
.admin-tab.active, .admin-tab:hover { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.admin-stat { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 20px 24px; }
.admin-stat b { display: block; font-size: 1.9rem; font-family: var(--ff-text); font-weight: 800; color: var(--navy-800); }
.admin-stat span { font-size: .82rem; color: var(--ink-500); font-weight: 700; }
.bookings-table-wrap { overflow-x: auto; }
.bookings-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 980px; }
.bookings-table th { text-align: left; padding: 12px 14px; background: var(--navy-800); color: var(--white); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.bookings-table td { padding: 12px 14px; border-bottom: 1px solid var(--sand-200); vertical-align: top; }
.bookings-table tr:hover td { background: var(--sand-100); }
.bookings-table .b-code { font-weight: 800; color: var(--navy-800); white-space: nowrap; }
.bookings-table .b-dates { white-space: nowrap; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-mini { padding: 7px 14px; font-size: .8rem; border-radius: 999px; font-weight: 800; display: inline-flex; text-decoration: none; }
.btn-mini-ok { background: var(--ok-100); color: var(--ok-600); }
.btn-mini-ok:hover { background: var(--ok-600); color: #fff; }
.btn-mini-busy { background: var(--busy-100); color: var(--busy-600); }
.btn-mini-busy:hover { background: var(--busy-600); color: #fff; }
.btn-mini-dim { background: var(--sand-200); color: var(--ink-700); }
.btn-mini-dim:hover { background: var(--ink-700); color: #fff; }
.login-box { max-width: 420px; margin: 60px auto; }
.admin-form-row { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.admin-form-row .field { margin: 0; }
.price-base-grid { display: flex; flex-direction: column; gap: 10px; }
.price-base-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sand-200); }
.price-base-row:last-child { border-bottom: 0; }
.price-base-name { flex: 1; min-width: 200px; }
.price-base-row .input { width: 160px; }
.block-tag { display: inline-flex; align-items: center; gap: 8px; background: var(--sand-100); border: 1px solid var(--sand-300); padding: 7px 14px; border-radius: 999px; font-size: .86rem; font-weight: 700; margin: 0 8px 8px 0; }
.block-tag form { display: inline; }
.block-tag button { border: 0; background: none; color: var(--busy-600); font-weight: 800; cursor: pointer; padding: 0; font-size: .86rem; }

@media (max-width: 1060px) {
  .apt-hero-wrap { grid-template-columns: 1fr; }
  .apt-panel { position: static; }
  .apt-content-grid { grid-template-columns: 1fr; gap: 34px; }
  .avail-card { position: static; }
  .booking-layout { grid-template-columns: 1fr; }
  .booking-aside { position: static; }
  .pay-grid { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .map-frame iframe { height: 380px; }
}
@media (max-width: 720px) {
  .apt-gallery-side { grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(76px, auto); }
  .booking-card { padding: 24px 20px; }
  .pay-card { padding: 24px 20px; }
  .masonry { columns: 2 160px; column-gap: 12px; }
  .masonry .m-item { margin-bottom: 12px; }
  .apt-hero-wrap { padding-top: calc(var(--header-h) + 20px); }
}
