/* RV Listing Detail Page Styles */

.back-button {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 90px;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: #e2e8f0;
    color: #2563eb;
    border-color: #cbd5e1;
}

.back-button i {
    font-size: 0.9rem;
}

.breadcrumb {
    background: #f8fafc;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-top: 0;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.breadcrumb-nav a {
    color: #dc2626;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #1d4ed8;
}

.separator {
    color: #64748b;
}

.current {
    color: #374151;
    font-weight: 500;
}

/* Loading State */
.loading-container {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
}

.loading-spinner i {
    font-size: 3rem;
    color: #dc2626;
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.1rem;
}

.error-state {
    text-align: center;
    color: #64748b;
}

.error-state i {
    font-size: 4rem;
    color: #ef4444;
    margin-bottom: 20px;
}

.error-state h3 {
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 10px;
}

.error-state p {
    font-size: 1rem;
    margin-bottom: 30px;
}

/* Listing Details */
.listing-details {
    padding: 80px 0 120px;
}

.listing-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Image Gallery */
.image-gallery {
    margin-bottom: 30px;
}

.main-image {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #f8fafc;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
}

.gallery-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
}

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

/* Listing Info */
.listing-info {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.listing-header h1 {
    font-size: 2rem;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    margin-right: 20px;
}

.listing-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #dc2626;
    white-space: nowrap;
}

.listing-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.95rem;
}

.meta-item i {
    color: #dc2626;
    width: 16px;
}

.listing-description,
.listing-features,
.listing-specs {
    margin-bottom: 30px;
}

.listing-description h3,
.listing-features h3,
.listing-specs h3 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 15px;
    font-weight: 600;
}

.listing-description p {
    color: #64748b;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Action Buttons */
.listing-actions {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.listing-actions .btn {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.listing-actions .btn-primary {
    grid-column: 1;
}

.listing-actions .btn-outline {
    grid-column: auto;
    flex: none;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #374151;
}

.feature-item i {
    color: #10b981;
    width: 16px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.spec-label {
    color: #64748b;
    font-weight: 500;
    font-size: 1rem;
}

.spec-value {
    color: #1e293b;
    font-weight: 600;
    font-size: 1rem;
}

/* Action Sidebar */
.action-sidebar {
    position: sticky;
    top: 90px;
}

.price-card {
    background: linear-gradient(135deg, #dc2626 0%, #1d4ed8 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 30px;
}

.price-card .price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.price-card .price-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.action-buttons .btn {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.seller-info {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.seller-info h4 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.seller-details {
    color: #64748b;
    line-height: 1.6;
}

.safety-tips {
    background: #fef3c7;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
}

.safety-tips h4 {
    color: #92400e;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.safety-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.safety-tips li {
    color: #92400e;
    padding: 5px 0;
    position: relative;
    padding-left: 20px;
}

.safety-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #f59e0b;
    font-weight: bold;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.gallery-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.close-gallery {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

.gallery-main {
    position: relative;
    max-width: 80%;
    max-height: 70%;
    margin-bottom: 20px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

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

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

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    max-width: 80%;
    overflow-x: auto;
    padding: 10px 0;
}

.gallery-thumbnails .thumbnail {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.gallery-thumbnails .thumbnail:hover,
.gallery-thumbnails .thumbnail.active {
    opacity: 1;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .listing-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .action-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .listing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .listing-price {
        font-size: 2rem;
    }
    
    .main-image {
        height: 300px;
    }
    
    .gallery-main {
        max-width: 95%;
        max-height: 60%;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .gallery-nav.prev {
        left: -20px;
    }
    
    .gallery-nav.next {
        right: -20px;
    }
}

@media (max-width: 480px) {
    .listing-info {
        padding: 20px;
    }
    
    .price-card {
        padding: 20px;
    }
    
    .price-card .price {
        font-size: 2.5rem;
    }
    
    .features-grid,
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .meta-item {
        font-size: 0.9rem;
    }
}

/* Button Styles */
.btn-outline {
    background: transparent;
    border: 2px solid #dc2626;
    color: #dc2626;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-2px);
}

/* Video Section */
.listing-video {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
}

.listing-video h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .listing-video {
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .listing-video h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
}

/* Floor Plan Section */
.listing-floor-plan {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
}

.listing-floor-plan h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.listing-floor-plan h3 i {
    color: #dc2626;
}

.floor-plan-container {
    position: relative;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.floor-plan-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: white;
    display: block;
}

.floor-plan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.floor-plan-container:hover .floor-plan-overlay {
    opacity: 1;
}

/* Floor Plan Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-floor-plan-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .listing-floor-plan {
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .listing-floor-plan h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .floor-plan-image {
        height: 300px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
}
