/* ===================================
   PÁGINA DE DETALHES - DESIGN RESPONSIVO
   =================================== */

.details-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.details-page {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

/* Header da Página */
.details-header {
    padding: 14px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #222;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.back-link:hover {
    color: #FF385C;
}

.details-title h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px 0;
}

/* Center the badges row beneath the title */
.details-title {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 6px auto 0;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    background: #10b981;
    color: white;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Layout Principal */
.details-content {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    padding: 0 0 28px 0;
}

.details-main {
    min-width: 0;
}

/* Galeria de Imagens */
.image-gallery {
    margin-bottom: 40px;
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 15px;
}

.gallery-main.single {
    height: 600px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

.image-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.thumbnail-wrapper {
    position: relative;
}

.thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    display: block;
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: #FF385C;
}

.thumbnail.active {
    border-color: #FF385C;
    opacity: 1;
}

.destaque-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 5;
}

.no-image-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f5f5f5;
    border-radius: 12px;
    color: #999;
}

.no-image-large span {
    font-size: 4rem;
    margin-bottom: 10px;
}

/* Descrição */
.details-description {
    margin-bottom: 40px;
}

.details-description h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 12px;
}

.details-description p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
}

/* Características */
.details-features {
    margin-bottom: 40px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 12px;
}

.details-features h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #f9f9f9;
    border-radius: 10px;
    transition: all 0.3s;
}

.feature-item:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-info {
    flex: 1;
}

.feature-info strong {
    display: block;
    font-size: 0.9rem;
    color: #222;
    margin-bottom: 4px;
}

.feature-info p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

/* Comodidades */
.details-amenities {
    margin-bottom: 40px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 12px;
}

.details-amenities h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f2937; /* slate-800 */
    margin-bottom: 14px;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.amenity-item:hover {
    border-color: #cbd5e1; /* slate-300 */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.amenity-icon {
    font-size: 1.35rem;
}

.amenity-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937; /* slate-800 */
}

/* Localização (Google Maps) */
.details-location {
    margin-bottom: 40px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 12px;
}

.details-location h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f2937; /* slate-800 */
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.location-map-container {
    width: 100%;
    height: 450px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.location-map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
}

/* Sidebar de Reserva */
.details-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.booking-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.booking-price {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.price-label {
    font-size: 0.85rem;
    color: #666;
}

.price-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #FF385C;
}

.price-per-person {
    font-size: 0.8rem;
    color: #999;
}

.booking-info {
    margin-bottom: 25px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.9rem;
    color: #666;
}

.info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #222;
}

.booking-form h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF385C;
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 12px 18px;
    font-size: 0.95rem;
}

.booking-note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

/* Alertas de Sucesso e Erro */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: slideDown 0.3s ease-out;
}

.alert strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

.alert-success {
    background: #d1fae5;
    border: 2px solid #10b981;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border: 2px solid #ef4444;
    color: #991b1b;
}

/* Valor Total Calculado */
.valor-total-preview {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 10px;
}

.valor-total-preview strong {
    display: block;
    font-size: 0.9rem;
    color: #065f46;
    margin-bottom: 5px;
}

.valor-total-preview #valorTotal {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
}

/* Small text */
.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #666;
}

/* Animação */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVIDADE
   =================================== */

@media (max-width: 1024px) {
    .details-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .details-sidebar {
        position: static;
    }
    
    .booking-card {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .details-container {
        padding: 15px;
    }
    
    .details-title h1 {
        font-size: 1.5rem;
    }
    /* keep badges on one centered row below title */
    .title-meta {
        flex-wrap: nowrap;
        gap: 8px;
        justify-content: center;
        margin: 6px auto 0;
    }
    .category-badge,
    .verified-badge {
        padding: 6px 10px;
        font-size: 0.78rem;
        white-space: nowrap;
    }
    
    .gallery-main {
        height: 300px;
    }
    
    .gallery-main.single {
        height: 400px;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .thumbnail {
        height: 60px;
    }
    
    .destaque-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .amenities-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .amenity-item {
        padding: 12px 15px;
    }
    
    .details-features h2,
    .details-amenities h2,
    .details-location h2,
    .details-description h2 {
        font-size: 1.3rem;
    }
    
    .location-map-container {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .details-title h1 {
        font-size: 1.3rem;
    }

    /* Keep badges on one centered horizontal row */
    .title-meta {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 6px;
    }

    .category-badge,
    .verified-badge {
        width: auto;
        font-size: 0.68rem;
        padding: 4px 8px;
        white-space: nowrap;
    }
    
    .gallery-main {
        height: 250px;
        border-radius: 8px;
    }
    
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .gallery-nav.prev {
        left: 10px;
    }
    
    .gallery-nav.next {
        right: 10px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        padding: 15px;
    }
    
    .amenities-grid {
        grid-template-columns: 1fr;
    }
    
    .location-map-container {
        height: 300px;
    }
    
    .details-location {
        padding: 12px;
    }
    
    .details-location h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .booking-card {
        padding: 20px;
    }
    
    .price-value {
        font-size: 1.5rem;
    }
}
