/* ==========================================================================
   PESTAÑA PEDIDOS.HTML / ENCARGOS - ESTILOS NEOMÓRFICOS
   ========================================================================== */

/* --- CONTENEDOR PRINCIPAL --- */
.main-wrapper {
    padding: 4rem 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-container {
    width: 100%;
    max-width: 700px;
    padding: 3rem 4rem;
    margin-bottom: 5rem;
    background: var(--bg-color);
    border-radius: 30px;
    box-shadow: 
        15px 15px 30px var(--shadow-dark),
        -15px -15px 30px var(--shadow-light);
}

.form-container h2 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.form-container .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* --- ALERTAS (Mensajes de éxito o error) --- */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
}

.alert-success {
    color: #2e6644;
    background: #e0efe6;
    box-shadow: inset 4px 4px 8px #c8d6ce, inset -4px -4px 8px #f8ffff;
}

.alert-error, .alert-danger {
    color: #a8465d;
    background: #fce8e6;
    box-shadow: inset 4px 4px 8px #e2d1cf, inset -4px -4px 8px #ffffff;
}

/* --- GRUPOS DE FORMULARIO --- */
.form-group {
    margin-bottom: 1.8rem;
    scroll-margin-top: 120px; /* Evita que el header fijo tape el campo al hacer auto-scroll */
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.05rem;
}

/* --- INPUTS Y SELECTS HUNDIDOS (Inset) --- */
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    border-radius: 15px;
    background: var(--bg-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    box-shadow: 
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);
    transition: all 0.3s ease;
}

.form-group input[type="email"]::placeholder,
.form-group textarea::placeholder {
    color: #a89ca0;
}

.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 
        inset 8px 8px 16px var(--shadow-dark),
        inset -8px -8px 16px var(--shadow-light);
    border-left: 3px solid var(--accent); /* Un toque sutil al escribir */
}

/* --- RADIO BUTTONS (Pedido / Presupuesto) --- */
.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-weight: normal;
    color: var(--text-light);
}

.radio-option input[type="radio"] {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-color);
    box-shadow: 
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
    cursor: pointer;
    position: relative;
    outline: none;
}

.radio-option input[type="radio"]:checked {
    box-shadow: 
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
}

/* --- CHECKBOX (Incluir Nota) --- */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    color: var(--text-light);
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--bg-color);
    box-shadow: 
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
    cursor: pointer;
    position: relative;
    outline: none;
}

.checkbox-group input[type="checkbox"]:checked {
    box-shadow: 
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent);
    font-size: 14px;
    font-weight: bold;
}

/* --- TEXTAREA Y CONTADOR --- */
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.8rem;
}

/* --- BOTÓN ENVIAR 3D --- */
.btn-submit {
    display: block;
    width: 100%;
    margin-top: 2.5rem;
    padding: 1.2rem;
    background: var(--bg-color);
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 
        12px 12px 20px var(--shadow-dark),
        -12px -12px 20px var(--shadow-light);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);
}

/* Ocultamos la caja de la nota por defecto */
#nota-section {
    display: none;
}

/* Usamos CSS puro para mostrarla INSTANTÁNEAMENTE cuando la casilla es marcada */
body:has(#incluye_nota:checked) #nota-section {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- SECCIÓN FAQ (Preguntas Frecuentes) --- */
.faq-section {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 4rem auto;
}

.faq-title {
    text-align: center;
    color: var(--accent);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.faq-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: var(--bg-color);
    border-radius: 20px;
    box-shadow: 
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
    padding: 1.5rem 2rem;
    transition: all 0.3s ease;
}

.faq-item[open] {
    box-shadow: 
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);
}

.faq-question {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    list-style: none; /* Quita flecha nativa */
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
}

.faq-question::-webkit-details-marker {
    display: none; /* Quita flecha nativa en Chrome/Safari */
}

.faq-question .icon {
    color: var(--accent);
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-question .icon {
    transform: rotate(45deg); /* Gira el '+' para que parezca una 'x' al abrir */
}

.faq-answer {
    padding-top: 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
    animation: slideDown 0.3s ease-out;
}

.faq-answer p {
    margin-bottom: 1rem;
}

.faq-answer ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .form-container {
        padding: 2.5rem 1.5rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }

    .faq-item {
        padding: 1.5rem;
    }
}