:root {
  --bg: #ffffff;
  --surface: #f8f9fc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0f172a;
  --accent: #b88a2c;
  --ok: #059669;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 18px;
  --max: 1140px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

svg,
.bottom-nav a svg {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  flex-shrink: 0 !important;
}

.topbar {
  display: none !important;
}

svg {
  width: 1.5rem !important;
  height: 1.5rem !important;
  flex-shrink: 0;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65
}

a {
  color: inherit;
  text-decoration: none
}

img,
svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

svg:not([width]) {
  width: 24px;
}

svg:not([height]) {
  height: 24px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .logo {
    height: 38px;
  }

  .brand span {
    font-size: 14px;
    background: linear-gradient(90deg, #0f172a 0%, #b88a2c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  h1 {
    font-size: 25px !important;
    line-height: 1.35 !important;
    letter-spacing: -0.01em;
  }

  h2 {
    font-size: 21px;
  }

  .container {
    padding: 0 24px;
  }

  .section {
    padding: 30px 0;
  }
}

.topbar {
  background: var(--brand);
  color: #fff;
  font-size: 14px
}

.topbar .container {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px
}

.pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  padding: 6px 10px;
  border-radius: 999px
}

.pill b {
  font-weight: 900
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  height: 80px;
  display: flex;
  align-items: center;
}

.menu-close-icon {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 2005;
}

.header .container {
  width: 100%;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
  white-space: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: .2px;
  transition: transform 0.2s;
  text-align: left;
}

.brand:hover {
  transform: scale(1.02)
}

.logo {
  height: 48px;
  width: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.brand span {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  font-size: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #b88a2c 60%, #eab308 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  font-weight: 900;
}

.navlinks {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.navlinks a {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.2s
}

.navlinks a:hover {
  background: var(--surface)
}

.navlinks a.active {
  background: var(--surface);
  border-color: var(--line);
  font-weight: 700
}

.navcta {
  display: flex;
  gap: 10px;
  align-items: center
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  z-index: 2001;
  width: 44px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: 0.3s;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 85%;
  max-width: 300px;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 100000;
  box-shadow: 10px 0 50px rgba(0, 0, 0, 0.2);
  display: flex !important;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-overflow-scrolling: touch;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.menu-open .mobile-menu-overlay {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-content {
  flex: 1;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  padding: 100px 24px 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu a {
  font-size: 17px;
  font-weight: 700;
  color: #334155;
  padding: 14px 8px;
  margin-bottom: 4px;
  opacity: 0;
  transform: translateX(-15px);
  transition: 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chevron-icon {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 900;
}

.mobile-menu.open a {
  opacity: 1;
  transform: none;
}

.mobile-menu.open a:nth-child(1) {
  transition-delay: 0.1s;
}

.mobile-menu.open a:nth-child(2) {
  transition-delay: 0.15s;
}

.mobile-menu.open a:nth-child(3) {
  transition-delay: 0.2s;
}

.mobile-menu.open a:nth-child(4) {
  transition-delay: 0.25s;
}

.mobile-menu.open a:nth-child(5) {
  transition-delay: 0.3s;
}

.mobile-menu.open a:nth-child(6) {
  transition-delay: 0.35s;
}

.mobile-menu.open a:nth-child(7) {
  transition-delay: 0.4s;
}

.mobile-menu.open a:nth-child(8) {
  transition-delay: 0.45s;
}

.mobile-menu.open a:nth-child(9) {
  transition-delay: 0.5s;
}

.mobile-menu.open a:nth-child(11) {
  transition-delay: 0.55s;
}

.mobile-menu .divider {
  margin: 10px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .02);
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent
}

.btn.accent {
  background: var(--accent);
  color: #0b1020;
  border-color: transparent
}

.btn.small {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px
}

.btn.link {
  background: transparent;
  border-color: transparent;
  padding: 10px 0;
  color: var(--brand)
}

main {
  min-height: 60vh
}

.hero {
  padding: 38px 0 18px;
  background: radial-gradient(1100px 550px at 10% -10%, rgba(184, 138, 44, .1), transparent 60%), radial-gradient(900px 520px at 90% 5%, rgba(0, 0, 0, .05), transparent 60%), var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: flex-start
}

.hero-house {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-house:hover {
  transform: translateY(-5px);
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.card.pad {
  padding: 24px;
}

.kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: rgba(184, 138, 44, .12);
  border: 1px solid rgba(184, 138, 44, .25);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  color: var(--brand)
}

h1 {
  font-size: 38px;
  line-height: 1.25;
  margin: 16px 0 20px
}

h2 {
  font-size: 26px;
  margin: 0 0 10px
}

h3 {
  font-size: 18px;
  margin: 0 0 8px
}

p {
  margin: 0 0 16px;
  line-height: 1.65;
}

.muted {
  color: var(--muted)
}

.small {
  font-size: 13px;
  color: var(--muted)
}

.hidden {
  display: none !important
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0
}

.section {
  padding: 40px 0;
}

.section .head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 12px
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px
}

.feature {
  padding: 16px
}

.tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand);
}

.model-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px) calc(var(--radius) - 4px) 0 0;
  margin-bottom: 0;
}

.card.model {
  overflow: hidden;
  padding: 0;
}

.card.model .pad-content {
  padding: 20px;
}

.price {
  font-size: 20px;
  font-weight: 1000;
  color: var(--brand);
  margin-top: 6px
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px
}

.form {
  padding: 24px
}

.controls {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.control:focus {
  border-color: var(--accent);
}

.form label {
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin: 10px 0 6px
}

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  outline: none;
  background: #fff
}

.form textarea {
  min-height: 110px;
  resize: vertical
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.notice {
  padding: 12px;
  border-radius: 14px;
  background: rgba(5, 150, 105, .08);
  border: 1px solid rgba(5, 150, 105, .22);
  color: #064e3b
}

.warn {
  padding: 12px;
  border-radius: 14px;
  background: rgba(180, 83, 9, .08);
  border: 1px solid rgba(180, 83, 9, .22);
  color: #7c2d12
}

details {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

details:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(184, 138, 44, 0.3);
}

details+details {
  margin-top: 10px
}

summary {
  cursor: pointer;
  font-weight: 1000
}

.footer {
  margin-top: 26px;
  background: var(--brand);
  color: #fff
}

.footer .container {
  padding: 26px 18px
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px
}

.footer a {
  color: rgba(255, 255, 255, .9)
}

.footer .small {
  color: rgba(255, 255, 255, .7)
}

.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #0b2a12;
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 1000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, .06)
}

.wa-float span {
  background: rgba(255, 255, 255, .22);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px
}

.chat-btn {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-weight: 1000
}

.chat-panel {
  position: fixed;
  left: 16px;
  bottom: 72px;
  z-index: 80;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none
}

.chat-head {
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center
}

.chat-body {
  padding: 12px 14px
}

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px
}

.chat-quick button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  z-index: 9999;
  display: none;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 0;
}

#modelsGrid {
  transition: opacity 0.3s ease;
}

#modelsGrid.loading {
  opacity: 0.5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.model-card,
.card.model {
  animation: fadeIn 0.4s ease forwards;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  display: none;
  justify-content: space-around;
  padding: 10px 5px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.04);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  transition: 0.2s;
  flex: 1;
}

.bottom-nav a.active {
  color: var(--accent);
  background: radial-gradient(circle at center, rgba(184, 138, 44, 0.15) 0%, transparent 70%);
  border-radius: 12px;
}

.bottom-nav a svg {
  width: 24px !important;
  height: 24px !important;
  stroke-width: 2px;
  flex-shrink: 0;
  display: block;
  margin: 0 auto;
}

.bottom-nav a.wa svg {
  stroke: #25D366;
}

@media (max-width: 960px) {
  .wa-float {
    display: none !important;
  }

  .header {
    height: 70px;
  }

  h1 {
    font-size: 30px
  }

  .hero-grid {
    grid-template-columns: 1fr
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr
  }

  .navlinks,
  .navcta {
    display: none !important;
  }

  .brand {
    margin: 0;
    align-items: center;
    text-align: left;
    flex-direction: row;
    gap: 10px;
  }

  .logo {
    height: 40px;
  }

  .hamburger {
    display: flex;
    order: 2;
  }

  .bottom-nav {
    display: flex !important;
    z-index: 9999 !important;
  }
}

body {
  padding-bottom: 90px;
}

@media (max-width: 960px) {

  .footer .footer-grid,
  .footer p.small {
    display: none !important;
  }

  .footer .container {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .footer .container::after {
    content: "Casas Prefabricadas JAAR";
    display: block;
    text-align: center;
    padding: 10px;
    font-weight: 900;
    opacity: 0.3;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .row {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .card.pad {
    padding: 20px !important;
  }

  h1 {
    font-size: 25px !important;
    line-height: 1.3 !important;
  }

  .mobile-menu {
    left: -100% !important;
    right: auto !important;
    background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%) !important;
  }

  .mobile-menu.open {
    left: 0 !important;
  }
}