/* Design A+B — Dashboard Crimea visual refresh
   Toggle: DESIGN_AB=false in .env → remove this stylesheet from layout
   Full restore: python deploy/restore_design_ab.py
*/

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --navy-deep: #021428;
  --navy: #052d54;
  --blue: #0a62aa;
  --blue-soft: #e8f3fb;
  --sky: #f2f7fb;
  --line: #dce6ef;
  --text: #102844;
  --muted: #5a7188;
  --coral: #e85745;
  --coral-dark: #d24838;
  --bg: #eef3f7;
  --white: #fff;
  --shadow-sm: 0 2px 10px rgba(5, 45, 84, 0.06);
  --shadow: 0 14px 36px rgba(5, 45, 84, 0.1);
  --radius: 14px;
  --radius-sm: 10px;
  --mp-bg: var(--bg);
  --mp-surface: #fff;
  --mp-border: var(--line);
  --mp-border-hover: #b9cddd;
  --mp-text: var(--text);
  --mp-muted: var(--muted);
  --mp-accent: var(--blue);
  --mp-cta: var(--coral);
  --mp-radius: var(--radius-sm);
  --mp-radius-lg: var(--radius);
  --container: 1140px;
  --page-gutter: 24px;
}

body.design-ab {
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg) !important;
  color: var(--text);
}

/* ── Hero: photo-first Crimea ── */
body.design-ab .hero {
  position: relative;
  min-height: min(72vh, 560px);
  height: auto;
  padding: 72px 0 88px;
  background: #0a2a4a;
  overflow: hidden;
}

body.design-ab .hero-art {
  inset: 0;
  width: 100%;
  background: url('hero-coast.webp') center/cover no-repeat;
  filter: saturate(1.05) contrast(1.02);
  mask-image: none;
  -webkit-mask-image: none;
  opacity: 1;
  z-index: 1;
}

body.design-ab .hero::before {
  background:
    linear-gradient(105deg, rgba(2, 20, 40, 0.88) 0%, rgba(2, 20, 40, 0.72) 42%, rgba(2, 20, 40, 0.35) 70%, rgba(2, 20, 40, 0.2) 100%);
  z-index: 2;
}

body.design-ab .hero::after {
  background:
    radial-gradient(circle at 80% 15%, rgba(232, 87, 69, 0.18), transparent 42%),
    radial-gradient(circle at 12% 85%, rgba(10, 98, 170, 0.25), transparent 40%);
  z-index: 2;
}

body.design-ab .hero-inner {
  position: relative;
  z-index: 3;
  max-width: 640px;
}

body.design-ab .hero-stack {
  position: relative;
  z-index: 3;
  width: min(100%, 760px);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

body.design-ab .hero-copy {
  margin-bottom: 4px;
}

body.design-ab .hero-brand {
  display: inline-block;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

body.design-ab .hero h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1.6px;
  line-height: 1.05;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

body.design-ab .hero p {
  color: rgba(235, 245, 255, 0.88);
  font-size: 17px;
  max-width: 460px;
}

body.design-ab .searchbar-modern-wrapper {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.22),
    0 2px 0 rgba(255, 255, 255, 0.65) inset;
  overflow: hidden;
}

body.design-ab .searchbar-modern {
  width: 100%;
  max-width: none;
  margin: 0;
}

body.design-ab .searchbar-modern-submit {
  border-radius: 0 !important;
  min-width: 132px;
}

body.design-ab .hero .city-chips {
  display: none;
}

body.design-ab .hero-cities {
  margin: 14px 0 0;
  position: relative;
  z-index: 4;
  width: 100%;
}

body.design-ab .hero-cities .city-chips {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

body.design-ab .hero-cities .chip {
  background: var(--blue-soft);
  border-color: transparent;
  color: var(--navy);
  border-radius: 999px;
  padding: 5px 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

body.design-ab .hero-cities .chip:hover {
  background: var(--blue);
  color: #fff;
}

body.design-ab .categories-wrap {
  margin-top: 20px;
}

/* ── Listing cards: blue/coral paid language ── */
body.design-ab .listing-card__badge {
  background: var(--navy);
  box-shadow: 0 4px 14px rgba(5, 45, 84, 0.28);
}

body.design-ab .listing-card__badge--top {
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  box-shadow: 0 4px 14px rgba(232, 87, 69, 0.35);
}

body.design-ab .listing-card__badge--urgent {
  top: 10px;
  left: 10px;
  right: auto;
  background: var(--navy);
}

body.design-ab .listing-card__media:has(.listing-card__badge--top) .listing-card__badge--urgent {
  top: 38px;
}

body.design-ab .listing-card--highlight {
  background: #fff;
  border-color: rgba(10, 98, 170, 0.35);
  box-shadow: inset 0 0 0 1px rgba(10, 98, 170, 0.08);
}

body.design-ab .listing-card--premium {
  background: #fff;
  border: 2px solid var(--navy);
  box-shadow: 0 10px 28px rgba(5, 45, 84, 0.12);
}

body.design-ab .listing-card--premium:hover {
  border-color: var(--coral);
  box-shadow: 0 14px 34px rgba(5, 45, 84, 0.16);
}

body.design-ab .listing-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.design-ab .listing-card__price {
  order: 1;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--navy);
  margin: 0;
}

body.design-ab .listing-card__title {
  order: 2;
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
  color: var(--text);
}

body.design-ab .listing-card__meta {
  order: 3;
  margin-top: 4px;
}

body.design-ab .listing-card__photo-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(2, 20, 40, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

body.design-ab .listing-card__fav-form {
  z-index: 3;
}

/* ── Listing detail mobile hierarchy ── */
@media (max-width: 820px) {
  body.design-ab .detail-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  body.design-ab .detail-layout > .seller {
    order: -1;
    position: static;
  }

  body.design-ab .detail-layout > .seller .detail-top {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  body.design-ab .detail-layout > div:first-child {
    order: 0;
  }
}

body.design-ab .seller .btn-coral {
  margin-top: 12px;
}

body.design-ab .phone-reveal-btn.btn-blue {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 8px 22px rgba(5, 45, 84, 0.18);
}

body.design-ab .phone-reveal-btn.btn-blue:hover {
  color: #fff !important;
  filter: brightness(1.05);
}

body.design-ab .detail-price {
  color: var(--navy);
  font-weight: 800;
}

@media (max-width: 570px) {
  body.design-ab .hero {
    min-height: 520px;
    padding: 48px 0 72px;
  }

  body.design-ab .hero-cities {
    margin-top: 12px;
  }
}

/* Soft motion */
@media (prefers-reduced-motion: no-preference) {
  body.design-ab .hero-stack {
    animation: designAbRise 0.7s ease both;
  }

  body.design-ab .listing-card {
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
  }

  @keyframes designAbRise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
}
