/* HJ93 Demo - Estilos Modernos */

/* ===== CONTENEDOR PRINCIPAL ===== */
.hj93-demo-product-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
    max-width: 100%;
}

/* ===== HEADER ===== */
.demo-header {
    background: linear-gradient(135deg, #FF6B00, #DC143C);
    color: white;
    padding: 24px;
    text-align: center;
}

.demo-header h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.demo-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ===== CONTENIDO ===== */
.demo-content {
    padding: 24px;
}

/* ===== SELECTOR DE PRODUCTOS ===== */
.product-selector-section {
    margin-bottom: 24px;
}

.selector-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-icon {
    font-size: 1.2rem;
}

/* Input de búsqueda */
.hj93-demo-selector {
    position: relative;
    width: 100%;
}

.selector-input-container {
        position: relative;
}

.selector-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.selector-input:focus {
    outline: none;
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(157, 100, 237, 0.1);
}

/* Resultados del selector */
.selector-results {
            position: absolute;
    top: 100%;
            left: 0;
    right: 0;
    margin-top: 4px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.results-list {
    padding: 8px;
}

.product-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.product-option:hover {
    background: #f3f4f6;
}

.product-option.unavailable {
    opacity: 0.6;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.product-details {
    display: flex;
    gap: 12px;
    font-size: 0.875rem;
    color: #6b7280;
}

.product-code {
    font-weight: 500;
}

.product-price {
    color: #FF6B00;
    font-weight: 600;
}

.product-status {
    margin-left: 12px;
}

.status-available {
    color: #FF6B00;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-unavailable {
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 600;
}

.no-results {
    padding: 24px;
    text-align: center;
    color: #6b7280;
}

.no-results-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* ===== DETALLES DEL PRODUCTO ===== */
.product-details-section {
    margin-top: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.demo-product-info {
    margin-bottom: 24px;
}

.demo-product-info h3 {
    margin: 0 0 12px 0;
    color: #111827;
    font-size: 1.25rem;
}

.product-stats {
    display: flex;
    gap: 16px;
    font-size: 0.95rem;
}

.product-stats span.available {
    color: #FF6B00;
    font-weight: 600;
}

.product-stats span.unavailable {
    color: #ef4444;
    font-weight: 600;
}

/* ===== FORMULARIO ===== */
.demo-product-form {
    margin-top: 24px;
}

.form-header {
    margin-bottom: 20px;
}

.form-header h3 {
    margin: 0 0 8px 0;
    color: #111827;
    font-size: 1.1rem;
}

.form-header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.form-fields {
    display: grid;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.form-field input,
.form-field select {
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(157, 100, 237, 0.1);
}

.demo-form-info {
    margin-top: 16px;
    padding: 12px;
    background: #fef3c7;
    border-radius: 6px;
    border-left: 4px solid #fbbf24;
}

.info-text {
    margin: 0;
    color: #92400e;
    font-size: 0.875rem;
}

/* ===== BOTÓN DE CONSULTA ===== */
.form-submit-section {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.submit-btn {
    background: #FF6B00;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(157, 100, 237, 0.3);
}

.submit-btn:hover:not(:disabled) {
    background: #DC143C;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(157, 100, 237, 0.4);
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ===== ESTADO DE CARGA DEL FORMULARIO ===== */
.form-loading {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.form-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF6B00;
            border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== RESULTADOS ===== */
.form-result {
    margin-top: 24px;
    padding: 20px;
    background: #f0fdf4;
    border-radius: 8px;
    border-left: 4px solid #FF6B00;
}

.form-result h4 {
    margin: 0 0 12px 0;
    color: #111827;
    font-size: 1.1rem;
}

.result-content {
    display: grid;
    gap: 8px;
}

.result-content p {
    margin: 0;
    color: #374151;
    font-size: 0.95rem;
}

.result-content p.available {
    color: #FF6B00;
    font-weight: 600;
}

.result-content p.unavailable {
    color: #ef4444;
    font-weight: 600;
}

/* ===== TABLA DE RESULTADOS ===== */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.result-table th {
    text-align: left;
    padding: 8px 12px;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.result-table td {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    color: #6b7280;
}

.result-table tr.noAva {
    background: #fef2f2;
}

.result-table tr.noAva th,
.result-table tr.noAva td {
    color: #ef4444;
}

/* ===== OTRAS DISPONIBILIDADES ===== */
.more-availabilities-section {
    margin-top: 24px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.more-availabilities-section h5 {
    margin: 0 0 16px 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 600;
}

.availability-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.availability-list li {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 6px;
    border-left: 4px solid #FF6B00;
    color: #4a5568;
    font-size: 14px;
}

/* Estilos específicos para disponibilidades */
.availability-list li[data-available="true"] {
    background: #f0fff4;
    border-left-color: #48bb78;
    color: #22543d;
}

.availability-list li[data-available="false"] {
    background: #fff5f5;
    border-left-color: #fc8181;
    color: #742a2a;
}

/* ===== SECCIÓN DE RESERVA ===== */
.reserve-section {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.reserve-btn {
    background: #FF6B00;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.reserve-btn:hover:not(:disabled) {
    background: #DC143C;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(16, 185, 129, 0.4);
}

.reserve-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.reserve-loading {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.reserve-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF6B00;
            border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== RESULTADO DE RESERVA ===== */
.reserve-result {
    margin-top: 24px;
    padding: 20px;
    background: #f0fdf4;
    border-radius: 8px;
    border-left: 4px solid #FF6B00;
}

.reserve-result h4 {
    margin: 0 0 16px 0;
    color: #111827;
    font-size: 1.1rem;
}

.reserve-content {
    background: white;
    border-radius: 6px;
    padding: 16px;
}

.result-table td.success {
    color: #FF6B00;
    font-weight: 600;
}

.result-table tr.error {
    background: #fef2f2;
}

.result-table tr.error th,
.result-table tr.error td {
    color: #ef4444;
}

.result-table a {
    color: #FF6B00;
    text-decoration: none;
    word-break: break-all;
}

.result-table a:hover {
    text-decoration: underline;
}

/* ===== SECCIÓN DE CONFIRMACIÓN ===== */
.confirm-section {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.confirm-btn {
    background: #06b6d4;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(6, 182, 212, 0.3);
}

.confirm-btn:hover:not(:disabled) {
    background: #0891b2;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(6, 182, 212, 0.4);
}

.confirm-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.confirm-loading {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.confirm-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #06b6d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== RESULTADO DE CONFIRMACIÓN ===== */
.confirm-result {
    margin-top: 24px;
    padding: 20px;
    background: #ecfeff;
    border-radius: 8px;
    border-left: 4px solid #06b6d4;
}

.confirm-result h4 {
    margin: 0 0 16px 0;
    color: #111827;
    font-size: 1.1rem;
}

.confirm-content {
    background: white;
    border-radius: 6px;
    padding: 16px;
}

/* ===== SECCIÓN DE CANCELACIÓN ===== */
.cancel-section {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.cancel-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.cancel-btn:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(239, 68, 68, 0.4);
}

.cancel-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.cancel-loading {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.cancel-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ef4444;
            border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== RESULTADO DE CANCELACIÓN ===== */
.cancel-result {
    margin-top: 24px;
    padding: 20px;
    background: #fef2f2;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
}

.cancel-result h4 {
    margin: 0 0 16px 0;
    color: #111827;
    font-size: 1.1rem;
}

.cancel-content {
    background: white;
    border-radius: 6px;
    padding: 16px;
}

/* ===== DEBUG SECTION ===== */
.debug-section {
    margin-top: 24px;
    text-align: center;
}

.debug-btn {
    background: #f3f4f6;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
}

.debug-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== DEBUG MODAL ===== */
.debug-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.debug-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.debug-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.debug-modal-header h3 {
    margin: 0;
    color: #111827;
    font-size: 1.25rem;
}

.close-btn {
    background: #ef4444;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: #dc2626;
}

.debug-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.debug-section-request,
.debug-section-response {
    margin-bottom: 24px;
}

.debug-header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.debug-section-request h4,
.debug-section-response h4 {
    margin: 0;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 600;
}

.copy-btn {
    background: #FF6B00;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.copy-btn:hover {
    background: #DC143C;
    transform: translateY(-1px);
}

.debug-json {
    background: #1f2937;
    color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    font-family: 'Courier New', monospace;
}

/* ===== LOADING STATES ===== */
.hj93-demo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF6B00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ERROR STATES ===== */
.hj93-demo-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.error-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.retry-btn {
    background: #FF6B00;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 16px;
    transition: background 0.2s ease;
}

.retry-btn:hover {
    background: #DC143C;
}

/* ===== LOADER INICIAL ===== */
#hj93-DemoProduct .loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

#hj93-DemoProduct .loader .logo {
    max-width: 120px;
    opacity: 0.5;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .demo-content {
        padding: 16px;
    }
    
    .product-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .selector-results {
        max-height: 300px;
    }
}

/* ===== CARRITO STYLES ===== */
.hj93-carrito-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
    max-width: 100%;
}

.hj93-carrito-header {
    background: linear-gradient(135deg, #FF6B00, #DC143C);
    color: white;
    padding: 24px;
    text-align: center;
}

.hj93-carrito-header h1 {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.carrito-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    opacity: 0.9;
}

.carrito-header-info span:first-child {
    font-weight: 500;
}

.total-price {
    font-weight: 600;
    font-size: 1.1rem;
}

.hj93-carrito-content {
    padding: 24px;
}

.carrito-products {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.carrito-product-item {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
    position: relative;
}

.delete-item-btn {
    padding: 5px;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.delete-item-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.delete-item-btn:active {
    transform: scale(0.95);
}

.product-image-section {
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-image-apartment {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-apartment img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-apartment .apartment-icon {
    font-size: 3rem;
    line-height: 1;
}

.product-content-section {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.carrito-product-item:hover {
    border-color: #FF6B00;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.carrito-product-item .product-content-section .product-info h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 1.25rem;
}

.carrito-product-item .product-content-section .product-info h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.carrito-product-item .product-content-section .product-info h3 a:hover {
    color: #FF6B00;
    text-decoration: underline;
}

.carrito-product-item .product-content-section .product-info p {
    margin: 0 0 12px 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.carrito-product-item .product-content-section .product-details {
    display: grid;
    gap: 8px;
}

.carrito-product-item .product-content-section .product-details p {
    margin: 0;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 500;
}

.configuration-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.beneficiaries-section,
.questions-section {
    margin-top: 12px;
}

.beneficiaries-section strong,
.questions-section strong {
    display: block;
    margin-bottom: 6px;
    color: #1f2937;
    font-size: 0.9rem;
}

.beneficiaries-section ul,
.questions-section ul {
    margin: 0 0 0 20px;
    padding: 0;
    list-style: disc;
}

.beneficiaries-section li,
.questions-section li {
    margin: 4px 0;
    color: #6b7280;
    font-size: 0.85rem;
}

.carrito-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.carrito-empty p {
    margin: 8px 0;
    font-size: 1rem;
}

.hj93-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.hj93-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF6B00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.hj93-loading p {
    color: #6b7280;
    margin: 0;
}

.carrito-checkout-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #FF6B00;
}

.carrito-checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B00, #DC143C);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.carrito-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.5);
}

.carrito-checkout-btn:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE - CARRITO ===== */
@media (max-width: 768px) {
    .carrito-product-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .product-image-section {
        min-height: 250px;
    }
}

/* ===== CHECKOUT STYLES ===== */
.hj93-checkout-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
    max-width: 100%;
}

.hj93-checkout-header {
    background: linear-gradient(135deg, #FF6B00, #DC143C);
    color: white;
    padding: 24px;
    text-align: center;
}

.hj93-checkout-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.hj93-checkout-content {
    padding: 24px;
}

.checkout-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.checkout-column h2 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
}

.auto-filled-badge {
    padding: 6px 12px;
    background: linear-gradient(135deg, #FF6B00, #DC143C);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(255, 107, 0, 0.3);
}

.auto-account-badge {
    padding: 6px 12px;
    background: linear-gradient(135deg, #FF6B00, #DC143C);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(255, 107, 0, 0.3);
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkout-form .form-field {
    display: flex;
    flex-direction: column;
}

.checkout-form label {
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
}

.checkout-form input {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.checkout-form input:focus {
    outline: none;
    border-color: #FF6B00;
}

.checkout-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.summary-product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.summary-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.summary-product-image .apartment-icon {
    font-size: 2rem;
    line-height: 1;
}

.summary-product-info {
    flex: 1;
}

.summary-product-info h4 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 600;
}

.summary-product-info h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.summary-product-info h4 a:hover {
    color: #FF6B00;
    text-decoration: underline;
}

.summary-price {
    margin: 0;
    color: #DC143C;
    font-size: 1.1rem;
    font-weight: 700;
}

.summary-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
    text-align: right;
    font-size: 1.25rem;
    color: #1f2937;
}

.availability-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.availability-badge.available {
    background: #FF6B00;
    color: white;
}

.availability-badge.unavailable {
    background: #ef4444;
    color: white;
}

.summary-item.unavailable {
    opacity: 0.6;
    border-left: 4px solid #ef4444;
}

.checkout-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B00, #DC143C);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.checkout-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.checkout-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.checkout-empty p {
    margin: 8px 0;
    font-size: 1rem;
}

/* ===== RESPONSIVE - CHECKOUT ===== */
@media (max-width: 768px) {
    .checkout-two-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ===== USUARIO STYLES ===== */
.hj93-usuario-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
    max-width: 100%;
}

.hj93-usuario-header {
    background: linear-gradient(135deg, #FF6B00, #DC143C);
    color: white;
    padding: 24px;
    text-align: center;
}

.hj93-usuario-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.hj93-usuario-content {
    padding: 24px;
}

.usuario-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #FF6B00;
}

.tab-btn.active {
    color: #FF6B00;
    border-bottom-color: #FF6B00;
}

.usuario-form-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.usuario-form-section .form-field {
    display: flex;
    flex-direction: column;
}

.usuario-form-section .form-field label {
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
}

.usuario-form-section .form-field input {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.usuario-form-section .form-field input:focus {
    outline: none;
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.usuario-submit-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, #FF6B00, #DC143C);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.usuario-submit-btn:hover {
    background: linear-gradient(135deg, #DC143C, #c41234);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

.usuario-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.usuario-message.success {
    background: #f0fdf4;
    border: 2px solid #10b981;
    color: #059669;
}

.usuario-message.error {
    background: #fef2f2;
    border: 2px solid #ef4444;
    color: #dc2626;
}

/* ============================================
   FACTURA STYLES
   ============================================ */

.hj93-factura-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.factura-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #FF6B00;
}

.factura-header h1 {
    margin: 0;
    color: #1f2937;
    font-size: 2rem;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.status-badge.created {
    background: #dbeafe;
    color: #1e40af;
}

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

.status-badge.pendiente {
    background: #fef3c7;
    color: #92400e;
}

.factura-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.factura-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.factura-section h2 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 1.5rem;
}

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

.info-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.info-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.status-text {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.factura-products {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.factura-product-item {
    display: flex;
    gap: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #FF6B00;
}

.product-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
}

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

.product-details {
    flex: 1;
}

.product-details h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 1.2rem;
}

.product-code {
    margin: 4px 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FF6B00;
    margin-top: 8px;
}

.product-config {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.product-config p {
    margin: 4px 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.product-config ul {
    margin: 8px 0 0 20px;
    color: #6b7280;
    font-size: 0.85rem;
}

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

.qr-code {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.qr-code img {
    max-width: 200px;
    height: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .factura-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .factura-product-item {
        flex-direction: column;
    }

    .product-image {
        width: 100%;
        height: 200px;
    }
}

/* ===== Status Badges ===== */
.status-badge {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-badge.created {
    background: #dbeafe;
    color: #1e40af;
}

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

.status-badge.pendiente,
.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

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

.status-badge.cancelled,
.status-badge.canceled {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.issued {
    background: #e0e7ff;
    color: #1e40af;
}

/* ===== Loading Spinner ===== */
.hj93-loading .loading-spinner {
    border-top: 4px solid #FF6B00;
}

/* ===== Modal Styles ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

