@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --cream: #FAF6EC;
  --cream-2: #F3EBDA;
  --gold: #B8985F;
  --gold-dark: #93794B;
  --ink: #2E2B28;
  --ink-soft: #5B5650;
  --white: #FFFFFF;
  --line: #E6DCC6;
  --error: #B5544A;
  --success: #5E8C6A;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(46, 43, 40, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Montserrat', sans-serif;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, .display {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { line-height: 1.65; color: var(--ink-soft); margin: 0 0 1em; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--ink); }

img { max-width: 100%; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--cream-2); }

.eyebrow {
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.lead { font-size: 1.15rem; max-width: 640px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--gold-dark); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Playfair Display', serif; font-weight: 600; font-size: 1.3rem; color: var(--ink); flex-shrink: 0; }
.brand img { height: 40px; width: 40px; object-fit: cover; border-radius: 50%; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--ink-soft); font-size: 0.92rem; font-weight: 500; }
.nav a:hover { color: var(--gold-dark); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; color: var(--ink);
  flex-shrink: 0; line-height: 1;
}
.mobile-only-link { display: none; }
.desktop-only { display: inline-flex; }

@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0;
    box-shadow: 0 12px 24px rgba(46,43,40,0.08);
  }
  .nav.nav-open { display: flex; }
  .nav a { padding: 14px 24px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a:last-child { border-bottom: none; }
  .mobile-only-link { display: block; }
  .desktop-only { display: none; }
  .nav-toggle { display: block; }
  .header-actions .btn-sm { padding: 10px 16px; font-size: 0.82rem; }
}

@media (max-width: 420px) {
  .brand span, .brand { font-size: 1.05rem; }
  .site-header .container { padding: 12px 16px; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 60px 0 90px;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-quick-contacts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.hero-quick-contacts a { font-size: 0.88rem; color: var(--ink-soft); font-weight: 500; }
.hero-quick-contacts a:hover { color: var(--gold-dark); }
.hero-photo-wrap {
  position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 4/5;
}
.hero-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; bottom: 20px; left: 20px;
  background: var(--white); padding: 14px 20px; border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex; gap: 12px; align-items: center;
}
.hero-badge .num { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--gold-dark); font-weight: 700; }
.hero-badge .lbl { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.2; }

/* ---- Stats strip ---- */
.stats-strip { display: flex; gap: 48px; margin-top: 40px; flex-wrap: wrap; }
.stat .num { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--gold-dark); font-weight: 700; }
.stat .lbl { font-size: 0.82rem; color: var(--ink-soft); }

/* ---- Cards ---- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.service-card { display: flex; flex-direction: column; gap: 10px; }
.service-card .price { font-family: 'Playfair Display', serif; color: var(--gold-dark); font-size: 1.4rem; font-weight: 700; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-item { border-radius: 14px; overflow: hidden; aspect-ratio: 1/1; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.06); }

.master-card { text-align: center; }
.master-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius); margin-bottom: 14px; }

.review-card .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 8px; }
.review-card .author { font-weight: 600; margin-top: 10px; }

.post-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); margin-bottom: 14px; }

/* ---- CTA band ---- */
.cta-band {
  background: linear-gradient(135deg, var(--ink) 0%, #423C34 100%);
  color: var(--white);
  border-radius: 28px;
  padding: 56px;
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.75); margin: 0 auto 24px; max-width: 560px; }

/* ---- Loyalty highlight ---- */
.loyalty-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  background: var(--white); border-radius: 28px; padding: 48px; box-shadow: var(--shadow);
}
@media (max-width: 860px) { .loyalty-box { grid-template-columns: 1fr; } }
.loyalty-perks { list-style: none; padding: 0; margin: 20px 0; }
.loyalty-perks li { padding: 10px 0 10px 30px; position: relative; color: var(--ink-soft); border-bottom: 1px dashed var(--line); }
.loyalty-perks li:before { content: "✦"; position: absolute; left: 0; color: var(--gold); }

/* ---- Map ---- */
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-wrap iframe { width: 100%; height: 420px; border: 0; display: block; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,0.68); display: block; margin-bottom: 8px; font-size: 0.9rem; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 40px; padding-top: 20px; font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  margin: 0;
}
.social-row a:hover { background: var(--gold); }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-control {
  width: 100%; padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--white);
  font-family: 'Montserrat', sans-serif; font-size: 0.95rem; color: var(--ink);
}
.form-control:focus { outline: none; border-color: var(--gold); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }
.form-error { color: var(--error); font-size: 0.85rem; margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---- Account / Points ---- */
.points-hero {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white); border-radius: 24px; padding: 40px; text-align: center;
}
.points-hero .big-num { font-family: 'Playfair Display', serif; font-size: 3.2rem; font-weight: 700; }
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn { padding: 12px 18px; background: none; border: none; cursor: pointer; font-family: 'Montserrat'; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--ink); border-color: var(--gold); }
.tx-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.tx-amount.credit { color: var(--success); font-weight: 700; }
.tx-amount.debit { color: var(--error); font-weight: 700; }
.referral-box { background: var(--cream-2); border-radius: 14px; padding: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.referral-code { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--gold-dark); letter-spacing: 0.05em; }

/* ---- Loyalty tier badge ---- */
.tier-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-size: 0.9rem; box-shadow: var(--shadow); flex-wrap: wrap;
}
.tier-badge-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tier-color, var(--gold)); display: inline-block; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tier-color, var(--gold)) 25%, transparent); }
.tier-badge-rate { color: var(--ink-soft); font-size: 0.8rem; margin-left: 6px; }

/* ---- Admin ---- */
.admin-shell { display: flex; min-height: 100vh; background: var(--cream); }
.admin-sidebar { width: 240px; background: var(--ink); color: rgba(255,255,255,0.85); padding: 24px 16px; flex-shrink: 0; }
.admin-sidebar .brand { color: var(--white); margin-bottom: 30px; padding: 0 8px; }
.admin-sidebar a { display: block; padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,0.75); font-size: 0.9rem; margin-bottom: 4px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.08); color: var(--white); }
.admin-sidebar .badge { background: var(--gold); color: var(--white); font-size: 0.7rem; padding: 1px 7px; border-radius: 10px; margin-left: 6px; }
.admin-main { flex: 1; padding: 36px 40px; max-width: 1200px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.admin-table th { background: var(--cream-2); font-weight: 600; color: var(--ink); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table a.row-link { color: var(--ink); font-weight: 600; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 32px; }
@media (max-width: 900px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--white); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.stat-card .num { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 700; color: var(--gold-dark); }
.stat-card .lbl { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.pill-pending { background: #FBEBD6; color: #92601C; }
.pill-applied { background: #DFF0E1; color: #2E6B39; }
.admin-search { max-width: 340px; }
.settings-section { background: var(--white); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); margin-bottom: 24px; }
.settings-section h3 { margin-bottom: 4px; }
.settings-section .form-hint { margin-bottom: 18px; }
.flash-success { background: #DFF0E1; color: #2E6B39; padding: 12px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 0.9rem; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

@media (max-width: 860px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; overflow-x: auto; gap: 4px; }
  .admin-sidebar .brand { display: none; }
  .admin-main { padding: 24px; }
}

/* ==================== ОБЩИЙ МОБИЛЬНЫЙ ПРОХОД ==================== */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .section-tight { padding: 32px 0; }
  h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  h2 { font-size: clamp(1.35rem, 6vw, 1.7rem); }
  .lead { font-size: 1rem; }

  .hero { padding: 32px 0 48px; }
  .hero-photo-wrap { aspect-ratio: 5/4; }
  .hero-badge { padding: 10px 14px; bottom: 12px; left: 12px; }
  .hero-badge .num { font-size: 1.2rem; }
  .hero-cta-row .btn { flex: 1 1 auto; text-align: center; }
  .stats-strip { gap: 24px; }
  .stat .num { font-size: 1.5rem; }

  .card { padding: 20px; }
  .cta-band { padding: 32px 20px; border-radius: 20px; }
  .loyalty-box { padding: 28px 20px; border-radius: 20px; }

  .points-hero { padding: 28px 20px; }
  .points-hero .big-num { font-size: 2.4rem; }
  .tabs { gap: 2px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tab-btn { flex-shrink: 0; padding: 10px 14px; font-size: 0.85rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* Таблицы шире экрана — даём горизонтальный скролл, а не ломаем макет */
  .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
  .admin-table thead, .admin-table tbody, .admin-table tr { display: table; width: 100%; table-layout: fixed; }

  .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .num { font-size: 1.5rem; }

  .map-wrap iframe { height: 300px; }
  .referral-box { flex-direction: column; align-items: flex-start; }
}
