/**
 * FlexModifier - Property Details Page Styles
 * Modern redesign for FlexMLS property detail pages
 */

/* ============================================
   MAIN CONTAINER & LAYOUT
   ============================================ */

.flexmls-listing-details {
    max-width: 1400px !important;
    margin: 2rem auto !important;
    padding: 0 1.5rem !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* ============================================
   TOP INFO SECTION (Title, Status, Price)
   ============================================ */

.flexmls-listing-details .top-info-wrapper {
    background: #1D305E !important;
    padding: 3rem 2rem !important;
    border-radius: 16px !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.2) !important;
}

.flexmls-listing-details .property-title {
    color: #ffffff !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin: 0 0 1rem 0 !important;
    letter-spacing: -0.5px !important;
    line-height: 1.2 !important;
}

.flexmls-listing-details .new-listing-tag {
    display: inline-block !important;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4) !important;
    margin-left: 1rem !important;
}

.flexmls-listing-details .price-and-actions-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 1.5rem !important;
}

.flexmls-listing-details .flexmls-price {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 !important;
    letter-spacing: -1px !important;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.flexmls-listing-details .flexmls-actions-wrapper {
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    margin-bottom: 2rem !important;
}

.flexmls-listing-details .back-to-search-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 12px 20px !important;
    background: #f3f4f6 !important;
    color: #374151 !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.flexmls-listing-details .back-to-search-link:hover {
    background: #e5e7eb !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

/* Grupo de botones Contact + PDF */
.flexmls-actions-buttons-group {
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
}

.flexmls-listing-details .flexmls-btn-primary,
.flexmls-listing-details .flexmodifier-pdf-button {
    padding: 14px 28px !important;
    background: #1D305E !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3) !important;
    text-transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-width: 180px !important;
    height: 48px !important;
    line-height: 1 !important;
}

.flexmls-listing-details .flexmls-btn-primary:hover,
.flexmls-listing-details .flexmodifier-pdf-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.4) !important;
}

/* Asegurar que los iconos sean del mismo tamaño */
.flexmls-listing-details .flexmodifier-pdf-button i {
    font-size: 16px !important;
}

/* Mover el botón PDF al grupo correcto */
.flexmls-listing-details .flexmodifier-pdf-button-wrapper {
    display: inline-block !important;
    margin: 0 !important;
}

/* ============================================
   SLIDESHOW / CAROUSEL SUPERIOR
   ============================================ */

.flexmls-listing-details .slideshow-wrapper {
    margin-bottom: 2rem !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    position: relative !important;
}

.flexmls-listing-details #listing-slideshow {
    border-radius: 16px !important;
    overflow: hidden !important;
}

.flexmls-listing-details .owl-carousel img {
    width: 100% !important;
    height: 600px !important;
    object-fit: cover !important;
    display: block !important;
}

/* Navegación del carousel - Flechas modernas */
.flexmls-listing-details .owl-nav {
    display: block !important;
}

.flexmls-listing-details .owl-nav button {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 56px !important;
    height: 56px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #1f2937 !important;
    border-radius: 50% !important;
    border: none !important;
    font-size: 0 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.flexmls-listing-details .owl-nav button:hover {
    background: #ffffff !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

.flexmls-listing-details .owl-prev {
    left: 20px !important;
}

.flexmls-listing-details .owl-next {
    right: 20px !important;
}

/* Flechas como símbolos */
.flexmls-listing-details .owl-prev::before {
    content: '‹' !important;
    font-size: 40px !important;
    line-height: 1 !important;
    color: #1f2937 !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.flexmls-listing-details .owl-next::before {
    content: '›' !important;
    font-size: 40px !important;
    line-height: 1 !important;
    color: #1f2937 !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .flexmls-listing-details .owl-carousel img {
        height: 400px !important;
    }
    
    .flexmls-listing-details .owl-nav button {
        width: 48px !important;
        height: 48px !important;
        font-size: 28px !important;
    }
}

/* ============================================
   GALLERY GRID (Grid de galería)
   ============================================ */

.flexmls-gallery-grid-wrapper {
    background: #ffffff !important;
    padding: 3rem 2rem !important;
    border-radius: 16px !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.flexmls-gallery-grid-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin: 0 0 1.5rem 0 !important;
    letter-spacing: -0.5px !important;
}

.flexmls-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 1rem !important;
}

.flexmls-gallery-grid-item {
    position: relative !important;
    height: 250px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.flexmls-gallery-grid-item:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.flexmls-gallery-grid-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s ease !important;
}

.flexmls-gallery-grid-item:hover img {
    transform: scale(1.05) !important;
}

@media (max-width: 768px) {
    .flexmls-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 0.75rem !important;
    }
    
    .flexmls-gallery-grid-item {
        height: 200px !important;
    }
}

/* ============================================
   MAIN DETAILS SECTION
   ============================================ */

.flexmls-listing-details .main-details-section {
    background: #ffffff !important;
    padding: 2rem !important;
    border-radius: 16px !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.flexmls-listing-details .flexmls-details {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-bottom: 2rem !important;
}

.flexmls-listing-details .flexmls-detail {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

.flexmls-listing-details .detail-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.flexmls-listing-details .detail-value {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
}

.flexmls-listing-details .price-and-dates {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 1.5rem !important;
    padding-top: 2rem !important;
    border-top: 2px solid #f3f4f6 !important;
}

/* ============================================
   DESCRIPTION / OVERVIEW SECTION
   ============================================ */

.flexmls-listing-details .overview-section {
    background: #ffffff !important;
    padding: 2rem !important;
    border-radius: 16px !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.flexmls-listing-details .overview-section h2 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin: 0 0 1.5rem 0 !important;
    letter-spacing: -0.5px !important;
}

.flexmls-listing-details .flexmls-description {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #4b5563 !important;
}

.flexmls-listing-details .flexmls-description p {
    margin: 0 0 1rem 0 !important;
}

.flexmls-listing-details .flexmls-description strong {
    color: #1f2937 !important;
    font-weight: 700 !important;
}

/* ============================================
   MORE INFORMATION TOGGLE
   ============================================ */

.flexmls-listing-details .more-information-toggle {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
    padding: 1.5rem 2rem !important;
    border-radius: 12px !important;
    margin-bottom: 2rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.flexmls-listing-details .more-information-toggle:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

.flexmls-listing-details .more-information-toggle h2 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.flexmls-listing-details .mls-id {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    background: #ffffff !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
}

/* ============================================
   FEATURES SECTION (General Description, etc.)
   ============================================ */

.flexmls-listing-details .features-section {
    background: #ffffff !important;
    padding: 3rem !important;
    border-radius: 16px !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.flexmls-listing-details .details-section {
    margin-bottom: 3.5rem !important;
    padding: 2rem !important;
    background: #f9fafb !important;
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
}

.flexmls-listing-details .details-section:last-child {
    margin-bottom: 0 !important;
}

.flexmls-listing-details .detail-section-header {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1D305E !important;
    margin: 0 0 1.5rem 0 !important;
    padding-bottom: 1rem !important;
    border-bottom: 3px solid #1D305E !important;
    letter-spacing: -0.5px !important;
}

.flexmls-listing-details .property-details-wrapper {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 1.25rem !important;
    margin-top: 1.5rem !important;
}

.flexmls-listing-details .property-details-wrapper .detail-value {
    background: #ffffff !important;
    padding: 16px 20px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    color: #374151 !important;
    font-weight: 500 !important;
    border-left: 4px solid #1D305E !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
    line-height: 1.6 !important;
    transition: all 0.3s ease !important;
}

.flexmls-listing-details .property-details-wrapper .detail-value:hover {
    transform: translateX(4px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.flexmls-listing-details .property-details-wrapper .detail-value b {
    color: #1f2937 !important;
    font-weight: 700 !important;
    margin-right: 8px !important;
    display: block !important;
    margin-bottom: 4px !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #6b7280 !important;
}

/* ============================================
   MAP SECTION
   ============================================ */

.flexmls-listing-details .map-section {
    background: #ffffff !important;
    padding: 2rem !important;
    border-radius: 16px !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.flexmls-listing-details #flexmls_connect__map_canvas {
    height: 500px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

/* ============================================
   DISCLOSURE SECTION
   ============================================ */

.flexmls-listing-details .disclosure-section {
    background: #f9fafb !important;
    padding: 2rem !important;
    border-radius: 16px !important;
    margin-bottom: 2rem !important;
    border: 2px solid #e5e7eb !important;
}

.flexmls-listing-details .listing-req {
    font-size: 13px !important;
    color: #6b7280 !important;
    margin-bottom: 1rem !important;
    font-weight: 600 !important;
}

.flexmls-listing-details .disclosure-section img {
    max-width: 200px !important;
    height: auto !important;
    margin: 1rem 0 !important;
    border-radius: 8px !important;
}

.flexmls-listing-details .disclosure-text {
    font-size: 13px !important;
    color: #6b7280 !important;
    line-height: 1.6 !important;
    font-style: italic !important;
}

.flexmls-listing-details .fbs-branding {
    margin-top: 1rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid #e5e7eb !important;
}

.flexmls-listing-details .fbs-branding a {
    color: #1D305E !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.flexmls-listing-details .fbs-branding a:hover {
    color: #1D305E !important;
    text-decoration: underline !important;
}

/* ============================================
   OVERRIDE FLEXMLS WIDTH RESTRICTIONS
   ============================================ */

.flexmls-listing-details.flexmls-v2-widget.flexmls-width-768 .features-section .property-details-wrapper .detail-value,
.flexmls-listing-details.flexmls-v2-widget .features-section .property-details-wrapper .detail-value {
    width: 100% !important;
    max-width: 100% !important;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .flexmls-listing-details .property-title {
        font-size: 1.5rem !important;
    }
    
    .flexmls-listing-details .flexmls-price {
        font-size: 2rem !important;
    }
    
    .flexmls-listing-details .owl-carousel img {
        height: 400px !important;
    }
    
    .flexmls-listing-details .flexmls-details {
        grid-template-columns: 1fr !important;
    }
    
    .flexmls-listing-details .property-details-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .flexmls-listing-details .owl-nav button {
        width: 48px !important;
        height: 48px !important;
        font-size: 24px !important;
    }
}

/* ============================================
   HIDE ADMIN BAR OFFSET
   ============================================ */

body.admin-bar .flexmls-listing-details {
    margin-top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .flexmls-listing-details {
        margin-top: 46px !important;
    }
}

