:root {
   --primary: #1b1b50;

   --secondary: #010128;

   --accent: #050e8b;

   --bg-light: #f8fafc;
   --border: #e2e8f0;
   --radius: 12px;
   --container-width: 1440px;
}

* {
   padding: 0;
   margin: 0;
   box-sizing: border-box;
   font-family: "Plus Jakarta Sans", sans-serif;
   font-optical-sizing: auto;
}



a {
   color: black;
   text-decoration: none;
   transition: none;
}

.cb-detail-container {
   max-width: var(--container-width);
   margin: 0 auto;
   padding-top: 80px;
   padding-inline: 2rem;
   display: flex;
   flex-direction: column;
   gap: 32px;
}

/* === 1. HEADER === */
.cb-header {
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
   margin-bottom: 20px;
   flex-wrap: wrap;
   gap: 24px;
}

.cb-header-info__title {
   color: var(--secondary);
   text-transform: uppercase;
}

.cb-header-info__subtitle {
   color: #6b6a6a;
}

.cb-ref-container {
   width: 100%;
}

.cb-ref {
   font-size: 0.9rem;
   color: #696969;
   background: #f0f0f3;
   padding: 8px 16px;
   border-radius: 50px;
   display: inline-block;
   font-weight: 500;
}

.cb-address {
   color: var(--secondary);
   font-size: 1rem;
   display: flex;
   align-items: center;
   gap: 5px;
}

.cb-price-tag {
   font-size: 1.8rem;
   font-weight: 700;
   color: var(--accent);
   text-align: right;
}

.cb-price-sub {
   font-size: 0.9rem;
   color: var(--secondary);
   display: block;
   text-align: right;
}




/* === 2. GALERÍA MOSAICO === */
.cb-gallery-mosaic {
   display: grid;
   grid-template-columns: 2fr 1fr;
   grid-template-rows: 250px 250px;
   gap: 10px;
   margin-bottom: 30px;
   border-radius: var(--radius);
   overflow: hidden;
}

.cb-gallery-item {
   position: relative;
   cursor: pointer;
   overflow: hidden;
}

.cb-gallery-item img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   transition: transform 0.4s ease;
}

.cb-gallery-item:hover img {
   transform: scale(1.05);
}

.cb-item-main {
   grid-column: 1 / 2;
   grid-row: 1 / 3;
}

.cb-more-overlay {
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgba(0, 0, 0, 0.5);
   color: white;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   font-weight: 700;
   transition: background 0.3s;
}

.cb-gallery-item:hover .cb-more-overlay {
   background: rgba(0, 0, 0, 0.3);
}

.cb-count {
   font-size: 2.5rem;
}

.cb-text-view {
   text-transform: uppercase;
   letter-spacing: 1px;
   font-size: 0.8rem;
}

/* === LIGHTBOX STYLES === */
.lightbox-modal {
   display: none;
   position: fixed;
   z-index: 2000;
   /* Mayor que el mapa */
   padding-top: 50px;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   overflow: auto;
   background-color: rgba(0, 0, 0, 0.95);
   backdrop-filter: blur(5px);
}

.lightbox-content-wrapper {
   position: relative;
   margin: auto;
   max-width: 90%;
   max-height: 85vh;
   display: flex;
   flex-direction: column;
   align-items: center;
}

.lightbox-image {
   max-width: 100%;
   max-height: 80vh;
   object-fit: contain;
   border-radius: 4px;
   box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
   animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
   from {
      opacity: 0;
      transform: scale(0.95);
   }

   to {
      opacity: 1;
      transform: scale(1);
   }
}

.lightbox-caption {
   color: #f1f1f1;
   text-align: center;
   padding: 15px 0;
   font-size: 1.1rem;
}

.close-btn {
   position: absolute;
   top: 20px;
   right: 30px;
   color: #f1f1f1;
   font-size: 40px;
   font-weight: bold;
   cursor: pointer;
   z-index: 1001;
}

.lb-prev,
.lb-next {
   cursor: pointer;
   position: absolute;
   top: 50%;
   width: auto;
   padding: 16px;
   margin-top: -50px;
   color: white;
   font-weight: bold;
   font-size: 24px;
   transition: 0.3s ease;
   user-select: none;
   background-color: rgba(0, 0, 0, 0.3);
   border-radius: 50%;
   width: 50px;
   height: 50px;
   display: flex;
   align-items: center;
   justify-content: center;
}

.lb-next {
   right: 20px;
}

.lb-prev {
   left: 20px;
}

.lb-prev:hover,
.lb-next:hover {
   background-color: var(--accent);
}

/* === 3. BARRA DE DATOS === */
.cb-stats-bar {
   display: flex;
   gap: 30px;
   padding: 20px 0;
   border-top: 1px solid var(--border);
   border-bottom: 1px solid var(--border);
   margin-bottom: 30px;
   flex-wrap: wrap;
}

.cb-stat-item {
   display: flex;
   align-items: center;
   gap: 10px;
   font-size: 1.1rem;
   font-weight: 600;
   color: var(--primary);
}

.cb-stat-icon {
   font-size: 1.4rem;
}

/* === 4. CONTENIDO PRINCIPAL === */
.cb-content-layout {
   display: grid;
   grid-template-columns: 2fr 1fr;
   gap: 40px;
   margin-bottom: 50px;
}

.cb-section-title {
   font-size: 1.4rem;
   margin-bottom: 15px;
   color: var(--primary);
   border-left: 4px solid var(--accent);
   padding-left: 10px;
}

.cb-description p {
   margin-bottom: 15px;
   color: var(--secondary);
   font-size: 1rem;
}

.cb-features-group {
   margin-bottom: 30px;
}

.cb-group-name {
   font-family: "Manrope", sans-serif;
   font-optical-sizing: auto;
   padding-block-start: 42px;
   font-size: 1rem;
   font-weight: 500;
   color: var(--secondary);
}

.cb-features-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
   gap: 24px;
   padding-block-start: 24px;
}

.cb-feature-item {
   display: flex;
   align-items: center;
   gap: 8px;
   font-size: 0.95rem;
   color: var(--secondary);
   background: var(--bg-light);
   padding: 8px 12px;
   border-radius: 6px;
}

.cb-check-icon {
   color: #10b981;
   font-weight: bold;
}

/* === 5. FORMULARIO SIDEBAR === */
.cb-sidebar {
   position: sticky;
   top: 20px;
   height: fit-content;
   z-index: 10;
}

.cb-contact-card {
   background: white;
   padding: 25px;
   border-radius: var(--radius);
   box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
   border: 1px solid var(--border);
}

.cb-contact-card h3 {
   margin-bottom: 20px;
   color: var(--primary);
   font-size: 1.3rem;
   border-bottom: 2px solid var(--bg-light);
   padding-bottom: 10px;
}

.cb-form-group {
   margin-bottom: 15px;
}

.cb-form-label {
   display: block;
   margin-bottom: 6px;
   font-size: 0.9rem;
   font-weight: 600;
   color: var(--primary);
}

.cb-form-input,
.cb-form-textarea {
   width: 100%;
   padding: 10px 12px;
   border: 1px solid #cbd5e1;
   border-radius: 8px;
   font-family: inherit;
   font-size: 0.95rem;
   transition: border-color 0.2s;
}

.cb-form-input:focus,
.cb-form-textarea:focus {
   outline: none;
   border-color: var(--accent);
}

.cb-form-submit {
   width: 100%;
   padding: 12px;
   background-color: var(--accent);
   color: white;
   border: none;
   border-radius: 8px;
   font-weight: 700;
   font-size: 1rem;
   cursor: pointer;
   transition: background-color 0.2s;
   margin-top: 10px;
}

.cb-form-submit:hover {
   background-color: #1d4ed8;
}

.cb-checkbox-group {
   display: flex;
   align-items: flex-start;
   gap: 10px;
   font-size: 0.85rem;
   color: var(--secondary);
   margin-top: 10px;
}

/* === 6. MAPA FULL WIDTH (LEAFLET) === */
.cb-map-full-section {
   width: 100%;
   background: #eef2f6;
   margin-bottom: 40px;
}

.cb-map-header {
   max-width: var(--container-width);
   margin: 0 auto;
   padding: 20px 20px 10px 20px;
}

.cb-map-wrapper {
   width: 100%;
   height: 450px;
   z-index: 1;
   /* Asegurar que no tape el sidebar si colisionan */
}

#leaflet-map {
   width: 100%;
   height: 100%;
}

/* === 7. INMUEBLES RELACIONADOS === */
.cb-related-section {
   padding-top: 30px;
   border-top: 1px solid var(--border);
}

.cb-related-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
   gap: 25px;
   margin-top: 20px;
}

.cb-related-card {
   background: white;
   border-radius: var(--radius);
   overflow: hidden;
   border: 1px solid var(--border);
   text-decoration: none;
   color: inherit;
   transition: transform 0.2s, box-shadow 0.2s;
   display: flex;
   flex-direction: column;
}

.cb-related-card:hover {
   transform: translateY(-5px);
   box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.cb-related-img-container {
   height: 200px;
   position: relative;
}

.cb-related-img {
   width: 100%;
   height: 100%;
   object-fit: cover;
}

.cb-related-badge {
   position: absolute;
   top: 10px;
   left: 10px;
   background: rgba(30, 41, 59, 0.9);
   color: white;
   padding: 4px 8px;
   font-size: 0.8rem;
   border-radius: 4px;
   font-weight: 600;
}

.cb-related-body {
   padding: 15px;
   display: flex;
   flex-direction: column;
   gap: 5px;
}

.cb-related-price {
   font-weight: 700;
   color: var(--accent);
   font-size: 1.1rem;
}

.cb-related-title {
   font-size: 1rem;
   font-weight: 600;
   color: var(--primary);
   line-height: 1.4;
   display: -webkit-box;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   overflow: hidden;
}

.cb-related-meta {
   font-size: 0.85rem;
   color: var(--secondary);
   margin-top: 8px;
   display: flex;
   gap: 12px;
}


/* === RESPONSIVE === */
@media (max-width: 768px) {
   .cb-detail-container {
      max-width: var(--container-width);
      margin: 0 auto;
      padding-inline: 1rem;
      display: flex;
      flex-direction: column;
      gap: 32px;
   }

   .cb-header {
      flex-direction: column;
      gap: 5px;
   }

   .cb-gallery-mosaic {
      grid-template-columns: 1fr;
      grid-template-rows: 250px 150px 150px;
   }

   .cb-item-main {
      grid-column: 1;
      grid-row: 1;
   }

   .cb-content-layout {
      grid-template-columns: 1fr;
   }

   .cb-stats-bar {
      justify-content: space-between;
      font-size: 0.9rem;
   }

   .cb-map-wrapper {
      height: 350px;
   }




}

section.contenedor-inmuebles {
   container-type: inline-size;
   container-name: inmuebles-container;
   background: red;
}

.cards-inmuebles_container {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
}


.inmueble-card {
   max-width: 450px;
   border-radius: 0.5rem;
   background: rgba(255, 255, 255, 0.27);
   width: 360px;
   background: #fff;
   border-radius: 15px;
   box-shadow: 0 5px 20px rgba(0, 0, 0, .1);
   transition: .3s;
   font-family: 'Segoe UI', sans-serif;
   margin: 20px auto;
   overflow: hidden;
   position: relative;
   cursor: pointer
}

.inmueble-card:hover {
   transform: translateY(-5px);
   box-shadow: 0 10px 25px rgba(0, 0, 0, .15)
}

.prop-img {
   width: 100%;
   object-fit: cover;
}

.prop-body {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
   align-items: flex-start;
   align-self: stretch;
   padding: 1.5rem;
   gap: 12px;
}

.prop-container-data {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
   align-items: flex-start;
   align-self: stretch;
   width: 100%;
   gap: 0.5rem;
}

.prop-id {
   font-size: 0.8rem;
}

.prop-zona {
   font-size: 1rem;
   text-transform: capitalize !important;
}

.container-data__title,
.prop-details {
   display: flex;
   flex-direction: row;
   justify-content: space-between;
   align-items: flex-start;
   align-self: stretch;
}


.prop-price {
   padding-block: 0.5rem;
   font-size: 1.5rem;
   font-weight: 500;
}



/* LIGHTBOX agregados gpt */
.cb-lightbox {
   position: fixed;
   top: 0;
   left: 0;
   width: 100vw;
   height: 100vh;
   background: rgba(0, 0, 0, 0.85);
   display: none;
   align-items: center;
   justify-content: center;
   z-index: 9999;
}

.cb-lightbox-img {
   max-width: 90%;
   max-height: 90%;
   border-radius: 10px;
}

.cb-lightbox-close {
   position: fixed;
   top: 30px;
   right: 40px;
   font-size: 40px;
   color: #fff;
   cursor: pointer;
}

.cb-lightbox-prev,
.cb-lightbox-next {
   position: absolute;
   top: 50%;
   font-size: 40px;
   color: #fff;
   cursor: pointer;
   padding: 10px;
}

.cb-lightbox-prev {
   left: 30px;
}

.cb-lightbox-next {
   right: 30px;
}

.cb-lightbox-prev:hover,
.cb-lightbox-next:hover,
.cb-lightbox-close:hover {
   color: #00e4b5;
}



@container inmuebles-container (min-width: 768px) {
   .cards-inmuebles_container {
      display: flex;
      flex-direction: row;
   }

}