/* === CONTENEDOR OPCIONES ENTREGA === */
.forma-entrega-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

/* === CARD ENTREGA === */
.entrega-card {
    flex: 1 1 160px;
    min-width: 140px;
    max-width: 240px;
    padding: 16px 14px;
    border-radius: 14px;
    border: 2px solid #1a1a1a;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    position: relative;
}

/* Hover */
.entrega-card:hover {
    border-color: #e10600;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Seleccionado */
.entrega-card.selected {
    border-color: #e10600;
    background: #fff5f5;
    box-shadow: 0 4px 14px rgba(225, 6, 0, 0.25);
}

/* Indicador visual seleccionado */
.entrega-card.selected::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 10px;
    background: #e10600;
    color: #fff;
    font-size: 0.75rem;
    padding: 3px 6px;
    border-radius: 50%;
}

/* Icono */
.entrega-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e10600;
    font-size: 1.3rem;
}

/* Texto */
.entrega-txt {
    font-size: 0.98rem;
    color: #111;
    font-weight: 500;
    line-height: 0.80 !important;
}

/* === MODAL === */
.modal-envio {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    display: none;
    /* hidden by default; JS toggles to flex */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Contenido modal */
.modal-content-envio {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 22px;
    min-width: 320px;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: fadeSlide 0.3s ease;
    position: relative;
    border-top: 4px solid #e10600;
    /* allow vertical scrolling when content is tall */
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Botón cerrar */
.close-modal-envio {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.4em;
    color: #e10600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-modal-envio:hover {
    transform: scale(1.2);
}

/* Form */
#form-envio-modal {
    margin-top: 16px;
}

/* BOTÓN */
.btn-success {
    background: linear-gradient(135deg, #e10600, #a80000);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 20px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 18px;
    transition: all 0.25s ease;
    width: 100%;
    font-weight: 600;
}

/* Hover botón */
.btn-success:hover {
    background: linear-gradient(135deg, #c00500, #7a0000);
    transform: translateY(-1px);
}

/* Precio envío */
#precio-envio {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    color: #e10600;
    font-size: 1.05rem;
}

/* Animación */
@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === OPCIONES DENTRO DEL MODAL === */
.modal-opciones {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* Opción individual */
.modal-opcion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.25s ease;
}

/* Hover en opción */
.modal-opcion:hover {
    border-color: #e10600;
    background: #fff5f5;
    box-shadow: 0 4px 12px rgba(225, 6, 0, 0.15);
}

/* Opción seleccionada */
.modal-opcion.selected {
    border-color: #e10600;
    background: #fff5f5;
    box-shadow: 0 4px 14px rgba(225, 6, 0, 0.25);
}

/* Icono de la opción */
.modal-opcion-icon {
    font-size: 1.4rem;
    color: #e10600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Texto de la opción */
.modal-opcion-text {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

/* === CAMPOS DE FORMULARIO === */
.form-group {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group:first-child {
    margin-top: 0;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #e10600;
    box-shadow: 0 0 4px rgba(225, 6, 0, 0.25);
    outline: none;
}

/* Botón de envío */
.btn-submit {
    background: #e10600;
    color: #fff;
    padding: 12px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #a80000;
}

/* Contenedor de horario en modal de sucursal */
#horario-sucursal-box {
    margin-top: 0.75rem;
    padding: 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    font-size: 0.90rem;
    color: var(--primary-color);
    transition: all 0.25s ease;
    display: none;
    /* oculto cuando no hay datos */
}

#horario-sucursal-box.show {
    display: block;
}

#horario-sucursal-box .sucursal-info {
    margin-bottom: 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #f0f0f0;
}

/* Título de sección (opcional) */
#horario-sucursal-box h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-gray);
}

/* Tabla de horarios */
.horario-local-tabla {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.horario-local-tabla td {
    padding: 0.4rem 0.6rem;
    vertical-align: top;
    border-bottom: 1px solid #e8e8e8;
}

.horario-local-tabla tr:last-child td {
    border-bottom: none;
}

.horario-local-tabla td:first-child {
    width: 40%;
    font-weight: 600;
    color: var(--primary-color);
}

.horario-local-tabla td:last-child {
    color: var(--dark-gray);
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .forma-entrega-row {
        flex-direction: column;
        gap: 10px;
    }

    .entrega-card {
        max-width: 100%;
        padding: 14px 10px;
    }

    .entrega-txt {
        font-size: 0.95rem;
    }

    .modal-opciones {
        gap: 10px;
    }

    .modal-opcion {
        padding: 10px 12px;
    }

    .modal-opcion-text {
        font-size: 0.95rem;
    }
}