body {
  padding-top: 110px;
}

body.panel-open {
  overflow: hidden;
}

.whatsapp-panel-trigger {
  position: fixed;
  top: 118px;
  right: 22px;
  z-index: 1300;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(var(--site-accent-rgb, 218, 35, 42), 0.75);
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.24);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  animation: notifyPulse 1.8s ease-in-out infinite;
}

.trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.whatsapp-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 10, 0.55);
  z-index: 1380;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.whatsapp-panel-backdrop.is-visible {
  opacity: 1;
}

.whatsapp-pref-panel {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: min(420px, 92vw);
  z-index: 1400;
  background: #0f1114;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.45);
  transform: translateX(-104%);
  transition: transform 0.25s ease;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.whatsapp-pref-panel.is-open {
  transform: translateX(0);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-head h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
}

.panel-close {
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.panel-form {
  overflow-y: auto;
  padding: 12px 14px 20px;
  display: grid;
  gap: 12px;
}

.panel-alert {
  margin: 10px 14px 0;
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 13px;
}

.panel-alert.success {
  border: 1px solid rgba(22, 163, 74, 0.55);
  background: rgba(22, 163, 74, 0.17);
}

.panel-alert.error {
  border: 1px solid rgba(220, 38, 38, 0.55);
  background: rgba(220, 38, 38, 0.17);
}

.panel-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px;
}

.panel-master-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
}

.panel-master-switch-copy {
  display: grid;
  gap: 4px;
}

.panel-master-switch-copy strong {
  font-size: 13px;
  font-weight: 700;
}

.panel-master-switch-copy small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.35;
}

.panel-master-switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
}

.panel-master-switch-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.panel-master-switch-slider {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.panel-master-switch-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.panel-master-switch-control input:checked + .panel-master-switch-slider {
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.95);
  border-color: rgba(var(--site-accent-rgb, 218, 35, 42), 1);
}

.panel-master-switch-control input:checked + .panel-master-switch-slider::after {
  transform: translateX(20px);
}

.panel-master-switch-control input:focus-visible + .panel-master-switch-slider {
  box-shadow: 0 0 0 3px rgba(var(--site-accent-rgb, 218, 35, 42), 0.35);
}

.panel-fields {
  display: none;
  gap: 10px;
}

.panel-fields.is-visible {
  display: grid;
}

.panel-field {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.panel-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-field label {
  font-size: 13px;
  font-weight: 600;
}

.panel-field input[type="text"],
.panel-field input[type="tel"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 13px;
}

.panel-field input[type="text"]::placeholder,
.panel-field input[type="tel"]::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.panel-field input[type="text"]:focus,
.panel-field input[type="tel"]:focus {
  outline: none;
  border-color: rgba(var(--site-accent-rgb, 218, 35, 42), 0.85);
  box-shadow: 0 0 0 2px rgba(var(--site-accent-rgb, 218, 35, 42), 0.22);
}

.panel-consent-field {
  gap: 6px;
}

.panel-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 500;
}

.panel-consent-label span {
  font-size: 12px;
  line-height: 1.45;
  color: #ececec;
}

.panel-consent-label a {
  color: #fff;
  text-decoration: underline;
}

.panel-consent-error {
  color: #fca5a5;
  font-size: 12px;
}

.select-all-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 11px;
  padding: 4px 9px;
  cursor: pointer;
}

.panel-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  padding-right: 2px;
}

.panel-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px;
}

.panel-option span {
  font-size: 12px;
  color: #f4f4f4;
}

.panel-save {
  border: 1px solid rgba(var(--site-accent-rgb, 218, 35, 42), 0.72);
  border-radius: 10px;
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.26);
  color: #fff;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.panel-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.panel-help {
  margin: 0;
  color: var(--gray-light);
  font-size: 12px;
}

@keyframes notifyPulse {
  0%,
  100% { box-shadow: 0 0 0 0 rgba(var(--site-accent-rgb, 218, 35, 42), 0.42); }
  55% { box-shadow: 0 0 0 10px rgba(var(--site-accent-rgb, 218, 35, 42), 0); }
}

.detail-wrap {
  max-width: 1120px;
  margin: 20px auto 48px;
  padding: 0 24px;
  display: grid;
  gap: 16px;
}

.detail-head h1 {
  margin: 4px 0 6px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  line-height: 1.12;
}

.detail-head .eyebrow {
  color: var(--site-accent);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.detail-head .meta {
  color: var(--gray-light);
}

.detail-price {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 2px;
}

.detail-price .price-currency {
  font-size: 13px;
  color: var(--gray-light);
  letter-spacing: 0.5px;
}

.detail-price strong {
  font-size: 44px;
  line-height: 1;
  font-family: 'Cormorant Garamond', serif;
  color: #fff;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(var(--site-accent-rgb, 218, 35, 42), 0.45);
  color: #fff;
  padding: 4px 12px;
  font-size: 12px;
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.22);
}

.badge.muted {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.gallery-section {
  display: grid;
  gap: 12px;
}

.gallery-main {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.gallery-main-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  position: relative;
  cursor: zoom-in;
}

.gallery-main-trigger img {
  width: 100%;
  min-height: 340px;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

.gallery-main-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  color: #fff;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  padding: 5px 12px;
}

.gallery-thumbs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gallery-thumbs-head h3 {
  margin: 0;
  font-size: 19px;
  font-family: 'Cormorant Garamond', serif;
}

.gallery-thumbs-head span {
  color: var(--gray-light);
  font-size: 12px;
  letter-spacing: 0.4px;
}

.gallery-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
}

.gallery-thumb {
  flex: 0 0 180px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb.is-active {
  border-color: rgba(var(--site-accent-rgb, 218, 35, 42), 0.95);
  box-shadow: 0 0 0 1px rgba(var(--site-accent-rgb, 218, 35, 42), 0.8);
}

.gallery-thumbs::-webkit-scrollbar {
  height: 7px;
}

.gallery-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.34);
  border-radius: 999px;
}

@media (min-width: 901px) {
  .gallery-section {
    grid-template-columns: 290px minmax(0, 1fr);
    grid-template-areas:
      'thumb-head main'
      'thumbs main';
    column-gap: 14px;
    row-gap: 10px;
    align-items: start;
  }

  .gallery-main {
    grid-area: main;
  }

  .gallery-thumbs-head {
    grid-area: thumb-head;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .gallery-thumbs {
    grid-area: thumbs;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 460px;
    padding-right: 4px;
    padding-bottom: 0;
  }

  .gallery-thumb {
    flex: 0 0 94px;
    width: 100%;
  }

  .gallery-thumbs::-webkit-scrollbar {
    width: 7px;
    height: 7px;
  }
}

.gallery-empty,
.detail-empty {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  padding: 24px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-stage {
  max-width: min(1200px, calc(100vw - 130px));
  max-height: calc(100vh - 90px);
  display: grid;
  gap: 10px;
}

.lightbox-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  border-radius: 12px;
}

.lightbox-counter {
  justify-self: center;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.4);
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.lightbox-close {
  position: absolute;
  right: 16px;
  top: 16px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.detail-card {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 18px;
}

.detail-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-family: 'Cormorant Garamond', serif;
}

.detail-card p {
  color: #f2f2ee;
  line-height: 1.65;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.manager-card {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
  display: grid;
  gap: 14px;
  position: sticky;
  top: 120px;
}

.manager-card h3 {
  margin: 0;
  font-size: 22px;
  font-family: 'Cormorant Garamond', serif;
}

.manager-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.manager-profile img,
.manager-fallback {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.manager-profile img {
  object-fit: cover;
}

.manager-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.45);
}

.manager-meta {
  display: grid;
  gap: 3px;
}

.manager-meta strong {
  font-size: 15px;
  color: #fff;
}

.manager-meta span {
  font-size: 12px;
  color: var(--gray-light);
}

.manager-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(var(--site-accent-rgb, 218, 35, 42), 0.6);
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.2);
}

.manager-phone.disabled {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--gray-light);
}

.manager-actions {
  display: flex;
  gap: 10px;
}

.manager-action-btn {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(var(--site-accent-rgb, 218, 35, 42), 0.6);
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.manager-action-btn svg {
  width: 20px;
  height: 20px;
}

.manager-action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--site-accent-rgb, 218, 35, 42), 0.85);
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.3);
}

.manager-action-btn.whatsapp {
  border-color: rgba(34, 197, 94, 0.65);
  background: rgba(34, 197, 94, 0.2);
}

.manager-action-btn.whatsapp:hover {
  border-color: rgba(34, 197, 94, 0.9);
  background: rgba(34, 197, 94, 0.3);
}

.manager-action-btn.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.related-listings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.related-listing-link {
  display: grid;
  gap: 4px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-listing-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 4px;
}

.related-listing-link:hover {
  border-color: rgba(var(--site-accent-rgb, 218, 35, 42), 0.72);
  transform: translateY(-2px);
}

.related-listing-link strong {
  color: #fff;
  font-size: 14px;
}

.related-listing-link span {
  color: var(--gray-light);
  font-size: 12px;
}

.related-listing-link em {
  color: #fff;
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.spec-item {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 4px;
}

.spec-item span {
  color: var(--gray-light);
  font-size: 12px;
}

.spec-item strong {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.detail-actions {
  display: flex;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
}

@media (max-width: 900px) {
  .gallery-main-trigger img {
    min-height: 320px;
  }

  .gallery-thumb {
    flex-basis: 150px;
  }

  .lightbox-stage {
    max-width: calc(100vw - 70px);
  }

  .spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-info-grid {
    grid-template-columns: 1fr;
  }

  .manager-card {
    position: static;
  }

  .related-listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    padding-top: 86px;
  }

  .whatsapp-panel-trigger {
    top: 92px;
    right: 12px;
    left: 12px;
    justify-content: center;
    font-size: 12px;
    padding: 10px 12px;
  }

  .panel-options-grid {
    grid-template-columns: 1fr;
  }

  .detail-wrap {
    padding: 0 14px;
    margin-top: 14px;
  }

  .detail-head h1 {
    font-size: 32px;
  }

  .detail-price strong {
    font-size: 34px;
  }

  .related-listings-grid {
    grid-template-columns: 1fr;
  }

  .gallery-main-trigger img {
    min-height: 230px;
    max-height: 360px;
  }

  .gallery-thumb {
    flex-basis: 128px;
  }

  .gallery-thumbs-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox-stage {
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 120px);
  }

  .lightbox-stage img {
    max-height: calc(100vh - 190px);
  }

  .lightbox-close,
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 26px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }
}
