/**
 * AutoCRM Templates CSS - Diseño Limpio y Moderno
 * Galería funcional completa
 */

.autocrm-vehicle-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===================================
   HEADER
=================================== */

.autocrm-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.autocrm-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.autocrm-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 8px 0;
}

.autocrm-subtitle {
    font-size: 18px;
    color: #718096;
    margin: 0;
}

.autocrm-status-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status-badge,
.condition-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-available {
    background: #d1fae5;
    color: #065f46;
}

.status-reserved {
    background: #fed7aa;
    color: #92400e;
}

.status-sold {
    background: #bfdbfe;
    color: #1e40af;
}

.condition-badge {
    background: #e5e7eb;
    color: #374151;
}

/* ===================================
   GALERÍA MEJORADA
=================================== */

.autocrm-gallery-section {
    margin-bottom: 30px;
}

.autocrm-main-gallery {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.main-image-container {
    position: relative;
    background: #f7fafc;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
}

/* Botón Fullscreen */
.btn-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-fullscreen:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

/* Flechas de navegación */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-nav:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-50%) scale(1.1);
}

/* Contador */
.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
}

/* Thumbnails */
.thumbnails-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 15px;
    background: white;
}

.thumbnail-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.thumbnail-item:hover {
    border-color: var(--autocrm-primary, #3b82f6);
    transform: scale(1.05);
}

.thumbnail-item.active {
    border-color: var(--autocrm-primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

.no-gallery {
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    padding: 100px 40px;
    text-align: center;
    border-radius: 12px;
}

.no-gallery svg {
    margin: 0 auto 20px;
    color: #cbd5e0;
}

.no-gallery p {
    color: #718096;
    font-size: 16px;
    margin: 0;
}

/* ===================================
   MODAL FULLSCREEN
=================================== */

.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fullscreen-modal.active {
    display: flex;
}

.fullscreen-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: #1a202c;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000;
}

.modal-close:hover {
    transform: scale(1.1) rotate(90deg);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000;
}

.modal-prev {
    left: 30px;
}

.modal-next {
    right: 30px;
}

.modal-nav:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-50%) scale(1.1);
}

.modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    color: #1a202c;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    z-index: 100000;
}

/* ===================================
   CONTENIDO PRINCIPAL
=================================== */

.autocrm-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

.autocrm-main-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Precio */
.price-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.price-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid var(--autocrm-primary, #3b82f6);
}

.price-label {
    display: block;
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.price-amount {
    font-size: 40px;
    font-weight: 900;
    color: var(--autocrm-primary, #3b82f6);
    line-height: 1;
    margin-bottom: 8px;
}

.price-suffix {
    font-size: 16px;
    color: #64748b;
    font-weight: 600;
    margin-left: 10px;
}

.price-note {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

/* Especificaciones */
.specs-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.specs-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 20px 0;
}

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

.spec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.spec-item:hover {
    background: #f1f5f9;
    transform: translateX(3px);
}

.spec-icon {
    font-size: 28px;
}

.spec-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.spec-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-value {
    font-size: 16px;
    color: #1a202c;
    font-weight: 700;
}

/* Descripción */
.description-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.description-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 20px 0;
}

.description-content {
    line-height: 1.8;
    font-size: 16px;
    color: #475569;
}

.description-content p {
    margin-bottom: 15px;
}

/* Info adicional */
.additional-info {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #fbbf24;
}

.additional-info h2 {
    font-size: 20px;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 15px 0;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
}

.info-item strong {
    color: #92400e;
    font-size: 14px;
}

.info-item code {
    background: #f7fafc;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
}

/* ===================================
   SIDEBAR
=================================== */

.autocrm-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.contact-card {
    background: linear-gradient(135deg, var(--autocrm-primary, #3b82f6) 0%, #1e40af 100%);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    color: white;
}

.contact-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.contact-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0 0 25px 0;
}

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--autocrm-accent, #f59e0b);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.form-textarea {
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: white;
    color: var(--autocrm-primary, #3b82f6);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    background: var(--autocrm-accent, #f59e0b);
    color: white;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.autocrm-success-message,
.autocrm-error-message {
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

.autocrm-success-message {
    background: #10b981;
}

.autocrm-error-message {
    background: #ef4444;
}

.sold-notice {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sold-notice svg {
    margin: 0 auto 15px;
    color: var(--autocrm-primary, #3b82f6);
}

.sold-notice h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
}

.sold-notice p {
    color: #64748b;
    margin: 0;
}

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

@media (max-width: 1024px) {
    .autocrm-content-wrapper {
        grid-template-columns: 1fr;
    }

    .autocrm-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .autocrm-vehicle-single {
        padding: 15px;
    }

    .autocrm-header {
        padding: 20px;
    }

    .autocrm-title {
        font-size: 24px;
    }

    .autocrm-subtitle {
        font-size: 16px;
    }

    .price-amount {
        font-size: 32px;
    }

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

    .thumbnails-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .modal-nav {
        width: 50px;
        height: 50px;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .autocrm-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .price-amount {
        font-size: 28px;
    }
}
