:root {
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --surface-alt: #EFECE6;
  --ink: #1E1D1B;
  --muted: #625F58;
  --border: #E2DFD7;
  --accent: #2E4F40;
  --accent-hover: #233D31;
  --sale-bg: #E7F0EB;
  --sale-ink: #24523B;
  --busy-bg: #F3EAE4;
  --busy-ink: #8A4A2B;
  --danger: #9B3628;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(30, 29, 27, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-whatsapp,
.btn-ghost-sm,
.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  border: 1px solid var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-primary:disabled {
  background: #CFCBC2;
  border-color: #CFCBC2;
  color: #6E6A62;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: #BDB8AC;
  background: var(--surface-alt);
}

.btn-whatsapp {
  background: #256847;
  color: #FFFFFF;
  border: 1px solid #256847;
}

.btn-whatsapp:hover {
  background: #1D5338;
}

.btn-ghost-sm {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 0.86rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost-sm:hover {
  color: var(--ink);
  border-color: #BDB8AC;
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1px solid #DFBEB8;
}

.btn-danger-outline:hover {
  background: #FAF1EF;
}

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
  padding: 4px 0;
  text-decoration: underline;
}

.btn-full {
  width: 100%;
}

.btn-lg {
  min-height: 50px;
  font-size: 1rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.55) brightness(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(247, 246, 242, 0.72) 0%, rgba(247, 246, 242, 0.86) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 72px;
  padding-bottom: 72px;
}

.hero-box {
  max-width: 640px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-subtitle {
  margin: 0 0 32px;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Sections */
.section {
  padding: 68px 0;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 34px;
}

.section-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-desc {
  margin: 0;
  color: var(--muted);
  max-width: 600px;
}

/* Models Grid */
.models-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--shadow);
}

.model-card.is-busy {
  opacity: 0.78;
}

.model-card.is-selected {
  border-color: var(--accent);
  background: #F4F8F5;
}

.btn-selected {
  background: var(--sale-bg);
  color: var(--sale-ink);
  border: 1px solid var(--accent);
}

.btn-selected:hover {
  background: #DCEAE2;
}

.model-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-badge {
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-sale {
  background: var(--sale-bg);
  color: var(--sale-ink);
}

.status-busy {
  background: var(--busy-bg);
  color: var(--busy-ink);
}

.model-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.model-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.model-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.model-price {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
}

/* Calculator */
.calc-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.calc-panel,
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.calc-group + .calc-group {
  margin-top: 24px;
}

.calc-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.calc-select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.addons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.addon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.addon-item:hover {
  border-color: #BDB8AC;
}

.addon-item.is-checked {
  background: #F1F6F3;
  border-color: var(--accent);
}

.addon-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.addon-left input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

.addon-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.addon-price {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.summary-card {
  position: sticky;
  top: 84px;
}

.summary-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.summary-models-block {
  margin-top: 8px;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.summary-empty {
  color: var(--muted);
  font-weight: 400;
}

/* Sticky Floating Selection Bar */
.selection-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(30, 29, 27, 0.08);
  padding: 12px 0;
}

.selection-bar[hidden] {
  display: none;
}

.selection-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.selection-bar-info {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.selection-bar-info strong {
  font-size: 1.05rem;
  color: var(--accent);
}

.summary-addons {
  margin: 14px 0 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-addons li + li {
  margin-top: 6px;
}

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

.summary-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.summary-total {
  font-size: 1.75rem;
  color: var(--accent);
}

/* Footer */
.site-footer {
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 29, 27, 0.48);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
}

.modal-dialog-lg {
  max-width: 760px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  margin: 0;
  font-size: 1.15rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
}

.modal-body {
  padding: 22px;
}

.modal-lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.message-preview {
  margin: 0 0 18px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wa-instruction {
  margin: 2px 0 4px;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
}

/* Admin Form & Tabs */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.admin-row input,
.admin-row select {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--ink);
  background: var(--bg);
}

.form-error {
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.tab-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-alt);
  display: grid;
  gap: 10px;
}

.admin-row-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.8fr auto;
  gap: 10px;
  align-items: center;
}

.admin-row-addon {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr auto;
  gap: 10px;
  align-items: center;
}

.admin-settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-page-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

/* Tablet & Mobile Responsiveness */
@media (max-width: 980px) {
  .models-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .summary-card {
    position: static;
  }
  .admin-row-grid,
  .admin-row-addon {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .nav-links a {
    display: none;
  }
  .hero {
    min-height: 64vh;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
  }
  .models-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-2,
  .admin-row-grid,
  .admin-row-addon {
    grid-template-columns: 1fr;
  }
}
