/* ===== PRODUCT WIDGET ===== */

.hj93-product-container {
    padding: 20px;
    max-width: 100%;
    background: #f9fafb;
    border-radius: 10px;
}

.hj93-product-container h1 {
    font-size: 28px;
    color: #333;
    margin: 0 0 10px 0;
}

.hj93-product-container h2 {
    font-size: 20px;
    color: #666;
    margin: 0 0 20px 0;
}

.hj93-product-container pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    margin: 15px 0;
}

.hj93-product-container p {
    color: #555;
    font-size: 14px;
}

/* Loader */
.loader {
    text-align: center;
    padding: 40px;
}

.loader .logo {
    width: 100px;
    height: 100px;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Header del producto */
.hj93-product-header {
    background: linear-gradient(135deg, var(--hj93-primary, #FF6B00) 0%, var(--hj93-primary-2, #DC143C) 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: white;
}

.hj93-product-header h1 {
    font-size: 24px;
    color: white;
    margin: 0 0 5px 0;
}

.hj93-product-code {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

/* Loading state */
.hj93-loading {
    text-align: center;
    padding: 40px;
}

.hj93-loading .loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--hj93-primary, #FF6B00);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error state */
.hj93-error {
    text-align: center;
    padding: 40px;
}

.hj93-error .error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.hj93-error p {
    color: #d32f2f;
    font-size: 16px;
    margin-bottom: 20px;
}

.retry-btn {
    background: var(--hj93-primary, #FF6B00);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.retry-btn:hover {
    background: var(--hj93-primary-2, #DC143C);
}

/* Formulario de disponibilidad */
.product-form-wrapper {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-section {
    padding: 20px;
}

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

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

.form-input,
.form-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 14px;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--hj93-primary, #FF6B00);
}

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

.form-question label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.submit-btn {
    background: linear-gradient(135deg, var(--hj93-primary, #FF6B00) 0%, var(--hj93-primary-2, #DC143C) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

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

.form-loading {
    text-align: center;
    padding: 20px;
}

/* Resultado de la consulta */
.form-result {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}

.form-result h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.result-table th,
.result-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.result-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

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

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

.more-availabilities-section {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.more-availabilities-section h5 {
    margin: 0 0 15px 0;
    color: #333;
}

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

.availability-list li {
    margin-bottom: 8px;
    padding: 10px 15px;
    background: #f7fafc;
    border-radius: 6px;
    border-left: 4px solid var(--hj93-primary, #FF6B00);
    color: #4a5568;
    font-size: 14px;
}

.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;
}

/* ===== PRODUCT SELECTOR ===== */
.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;
}

.hj93-product-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: var(--hj93-primary, #FF6B00);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.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 {
    display: flex;
    flex-direction: column;
}

.product-option {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s;
}

.product-option:hover {
    background-color: #f9fafb;
}

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

.product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name {
    font-weight: 600;
    color: #1f2937;
}

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

.product-code {
    color: #9ca3af;
}

.product-price {
    color: var(--hj93-primary, #FF6B00);
    font-weight: 600;
}

.product-status {
    margin-top: 4px;
}

.status-available {
    color: var(--hj93-primary, #FF6B00);
    font-weight: 500;
}

.status-unavailable {
    color: #ef4444;
    font-weight: 500;
}

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

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

/* ===== PRODUCT DETAILS ===== */
.product-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

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

.product-stats span.available {
    color: var(--hj93-primary, #FF6B00);
    font-weight: 500;
}

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

/* ===== FORM STYLES ===== */
.product-form {
    background: white;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

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

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

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

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

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

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--hj93-primary, #FF6B00);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-submit-section {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.debug-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.debug-btn:hover {
    background: #4b5563;
}

.form-loading {
    text-align: center;
    padding: 20px;
}

/* Reserve, Confirm, Cancel buttons */
.reserve-section,
.confirm-section,
.cancel-section {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.reserve-btn,
.confirm-btn {
    background: linear-gradient(135deg, var(--hj93-primary, #FF6B00) 0%, var(--hj93-primary-2, #DC143C) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.reserve-btn:hover:not(:disabled),
.confirm-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.cancel-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.reserve-loading,
.confirm-loading,
.cancel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.reserve-result,
.confirm-result,
.cancel-result {
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.reserve-result h4,
.confirm-result h4,
.cancel-result h4 {
    margin: 0 0 12px 0;
    color: #1f2937;
}

.result-table tr.success th,
.result-table tr.success td {
    color: var(--hj93-primary, #FF6B00);
    font-weight: 600;
}

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

.reserve-content,
.confirm-content,
.cancel-content {
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

/* ===== ALOJAMIENTO SINGLE WIDGET ===== */

.hj93-alojamiento-single-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background: #f9fafb;
    border-radius: 10px;
}

.hj93-alojamiento-single-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.hj93-alojamiento-single-header h1 {
    font-size: 28px;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.hj93-alojamiento-description {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

.hj93-alojamiento-single-dates {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.hj93-date-field {
    flex: 1;
    min-width: 200px;
}

.hj93-date-field label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.hj93-date-field input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.hj93-date-field input:focus {
    outline: none;
    border-color: var(--hj93-primary, #FF6B00);
}

.hj93-loading-values {
    text-align: center;
    padding: 24px;
    color: #6b7280;
    font-size: 16px;
}

/* Restricciones de estancia de WuBook (AlojamientoSingle.jsx) */
.hj93-alojamiento-min-noches {
    margin: 8px 0 0;
    color: #92400e;
    font-size: 14px;
}

.hj93-method-restriccion {
    margin: 8px 0;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 600;
}

.hj93-no-methods-message {
    padding: 30px;
    background: #fff3cd;
    border: 2px dashed #ffc107;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.hj93-no-methods-message p {
    margin: 0;
    color: #856404;
    font-size: 16px;
    font-weight: 500;
}

.hj93-methods-section {
    margin-top: 32px;
}

.hj93-methods-section h3 {
    font-size: 22px;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.hj93-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.hj93-method-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.hj93-method-card:hover {
    border-color: var(--hj93-primary, #FF6B00);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.15);
    transform: translateY(-2px);
}

.hj93-method-card.unavailable {
    opacity: 0.6;
    background: #f3f4f6;
}

.hj93-method-card h4 {
    font-size: 18px;
    color: #1f2937;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.method-description {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 16px 0;
    line-height: 1.5;
    flex-grow: 1;
}

.method-price {
    margin: 16px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-per-night {
    font-size: 18px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
}

.price-total {
    font-size: 28px;
    font-weight: 700;
    color: var(--hj93-primary, #FF6B00);
}

.price-period {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.price-dates {
    font-size: 12px;
    color: #9ca3af;
}

.price-original-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.price-original-label {
    font-size: 12px;
    color: #6b7280;
}

.price-original {
    font-size: 16px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
}

.price-percentage-info {
    font-size: 14px;
    font-weight: 600;
    color: var(--hj93-primary, #FF6B00);
    margin-bottom: 4px;
    padding: 2px 8px;
    background: #fff3e0;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.price-breakdown {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.price-breakdown summary {
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.price-breakdown summary:hover {
    color: var(--hj93-primary, #FF6B00);
}

.price-breakdown-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.breakdown-date {
    color: #6b7280;
}

.breakdown-price {
    color: #374151;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.breakdown-price-original {
    font-size: 11px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 400;
}

.breakdown-price-final {
    font-size: 12px;
    color: #374151;
    font-weight: 600;
}

.unavailable-text {
    color: #ef4444;
    font-weight: 600;
    font-size: 16px;
}

.unavailable-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    text-align: center;
}

.hj93-method-card.unavailable .method-price {
    background: #f9fafb;
}

.hj93-method-card.unavailable .price-total {
    color: #6b7280;
    opacity: 0.8;
}

.hj93-btn-select-method {
    width: 100%;
    padding: 12px 24px;
    background: var(--hj93-primary, #FF6B00);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: auto;
}

.hj93-btn-select-method:hover:not(:disabled) {
    background: var(--hj93-primary-2, #DC143C);
}

.hj93-btn-select-method:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.hj93-method-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
}

.hj93-method-actions .hj93-btn-add-to-cart,
.hj93-method-actions .hj93-btn-select-method {
    flex: 1;
    min-width: 120px;
}

.hj93-btn-add-to-cart {
    padding: 12px 16px;
    background: #059669;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hj93-btn-add-to-cart:hover:not(:disabled) {
    background: #047857;
}

.hj93-btn-add-to-cart:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Formulario de reserva */
.hj93-reservation-form-section {
    margin-top: 32px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 2px solid #e5e7eb;
}

.hj93-reservation-form-section h3 {
    font-size: 22px;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.hj93-selected-method-info {
    background: #f0f9ff;
    border-left: 4px solid var(--hj93-primary, #FF6B00);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.hj93-selected-method-info h4 {
    margin: 0 0 4px 0;
    color: #1f2937;
    font-size: 18px;
}

.hj93-selected-method-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.reservation-price-original {
    text-decoration: line-through;
    color: #9ca3af;
    margin-right: 8px;
}

.reservation-price-final {
    color: var(--hj93-primary, #FF6B00);
    font-weight: 600;
    font-size: 16px;
}

.reservation-price-percentage {
    color: #6b7280;
    font-size: 12px;
    margin-left: 4px;
}

.hj93-reservation-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

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

.hj93-form-field label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.hj93-form-field .required {
    color: #ef4444;
}

.hj93-form-field input,
.hj93-form-field select,
.hj93-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.hj93-form-field input:focus,
.hj93-form-field select:focus,
.hj93-form-field textarea:focus {
    outline: none;
    border-color: var(--hj93-primary, #FF6B00);
}

.hj93-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.hj93-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.hj93-btn-cancel {
    padding: 12px 24px;
    background: white;
    color: #374151;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.hj93-btn-cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.hj93-btn-submit {
    padding: 12px 24px;
    background: var(--hj93-primary, #FF6B00);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hj93-btn-submit:hover:not(:disabled) {
    background: var(--hj93-primary-2, #DC143C);
}

.hj93-btn-submit:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Error state */
.hj93-error {
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.hj93-error .error-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.hj93-error p {
    color: #991b1b;
    font-size: 16px;
    margin: 0 0 16px 0;
}

.retry-btn {
    padding: 10px 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

